Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Operation IDs are being duplicated under load #342

Closed
pharring opened this issue Feb 5, 2017 · 0 comments
Closed

Operation IDs are being duplicated under load #342

pharring opened this issue Feb 5, 2017 · 0 comments
Labels

Comments

@pharring
Copy link
Member

pharring commented Feb 5, 2017

I notice that, under load, my ASP.NET Core website generates request telemetry with duplicate Operation IDs.

It appears that HostingDiagnosticListener isn't written with multiple simultaneous requests in mind.
In particular, this.client.Context.Operation.Id gets overwritten by each new request (line 44)
(Also beginRequestTimestamp)

Rather that setting the Operation ID in the client's context (which is like setting it globally), I believe it should be set in the RequestTelemetry object that is added to HttpContext.Features
One would think that the timestamp could also be recorded in the RequestTelemetry object (indeed it already has fields for recording start time, so it's odd that it's not initialized here)

dnduffy pushed a commit that referenced this issue Feb 16, 2017
…343)

* Add tests to illustrate issue #342
* Fix issue #342
* Incorporate review feedback:
Set timestamp in OnBeginRequest.
Add a test for issue #340
Set Id instead of OperationId (Fixes #340)

* Add test for issue #333
* Implement OperationCorrelationTelemetryInitializer
Fixes issue #333

* Use UTC for start time epoch
* Use Start()/Stop() extension methods
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants