You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.
We currently scope TelemetryClient to the entire application, which can lead to hard to diagnose problems when developers change its request-specific properties, like TelemetryClient.Context.Session.Id. I think the TelemetryClient service should be request-scoped and rely on the container to inject the application-scoped TelemetryConfiguration (see issue #10).
The instrumentation key is easy - you can set it on the application scoped TelemetryConfiguration (see #10). Other application scoped properties like ComponentContext.Version can be set with a context initializer, perhaps hidden by a nice extension method.
The reason I believe we should not use the Active singleton is because it wont work in multitenant apps like Orchard. Plus we don't know how many RequestDelegate pipelines per AppDomain there could be.
We currently scope TelemetryClient to the entire application, which can lead to hard to diagnose problems when developers change its request-specific properties, like TelemetryClient.Context.Session.Id. I think the TelemetryClient service should be request-scoped and rely on the container to inject the application-scoped TelemetryConfiguration (see issue #10).
cc: @SergKanz , @abaranch, @upendras, @sergei-nikitin
The text was updated successfully, but these errors were encountered: