Fix: Start/StopOperation does not work when W3C is enabled#1031
Conversation
| } | ||
|
|
||
| [TestMethod] | ||
| public void StopOperationWhenTelemetryIdDoesNotMatchActivityId() |
There was a problem hiding this comment.
May it break manual telemetry correlation that customer implemented on their own? We had multiple users doing manual setup of IDs/ParentIDs before. With us matching IDs to Activity, it looks like we may drop something user intended to track with custom IDs. Is it the case here or I'm overthinking this? :)
There was a problem hiding this comment.
it was the behavior we had for years. nothing has changed with this pr, except I added test that verifies it ;)
Also, while users play with operationids, and parents, this only checks for telemtery id.
| CoreEventSource.Log.InvalidOperationToStopError(); | ||
|
|
||
| // this are details with unique ids for debugging | ||
| CoreEventSource.Log.InvalidOperationToStopDetails( |
There was a problem hiding this comment.
This message does not go into the default diagnostic traces, right? It seems to be "Warning", but not "Info"/"Verbose". Still not "Error" but enough to raise a question on it's relative severity.
There was a problem hiding this comment.
nothing new here too. There are two messages:
- AI Internal error that says that ids do not match - this shows up in users telemetry and our telemetry
- details that include ids - this is warning for debugging with perfview
* Fix: Start/StopOperation does not work when W3C is enabled * build and changelog
When W3C is enabled in AspNetCore or Web SDK, W3COperationCorrelationTelemetryInitializer changes telemetry.Id, so it no it no longer matches Activity.Id.
So StopOperation fails and telemetry is not tracked.
This change checks if W3C initializer added
ai_legacyRequestIdinto the properties with former it.Unfortunately, it's another temporary change that will have to go away when Activity supports W3C natively.