-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Start/StopOperation does not work when W3C is enabled #1031
Conversation
@@ -282,12 +282,37 @@ public void StartOperationWithOperationTelemetrySetsOperationHolderTelemetry() | |||
Assert.AreEqual(requestTelemetry, this.sendItems[0]); | |||
} | |||
|
|||
[TestMethod] | |||
public void StopOperationWhenTelemetryIdDoesNotMatchActivityId() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_legacyRequestId
into the properties with former it.Unfortunately, it's another temporary change that will have to go away when Activity supports W3C natively.