Skip to content
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

Merged
merged 4 commits into from
Dec 17, 2018

Conversation

lmolkova
Copy link
Member

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.

@@ -282,12 +282,37 @@ public void StartOperationWithOperationTelemetrySetsOperationHolderTelemetry()
Assert.AreEqual(requestTelemetry, this.sendItems[0]);
}

[TestMethod]
public void StopOperationWhenTelemetryIdDoesNotMatchActivityId()
Copy link
Member

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? :)

Copy link
Member Author

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(
Copy link
Member

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.

Copy link
Member Author

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:

  1. AI Internal error that says that ids do not match - this shows up in users telemetry and our telemetry
  2. details that include ids - this is warning for debugging with perfview

@lmolkova lmolkova merged commit 2105bf9 into develop Dec 17, 2018
lmolkova pushed a commit that referenced this pull request Dec 28, 2018
* Fix: Start/StopOperation does not work when W3C is enabled

* build and changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants