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

Request tracking configuration improvements #709

Closed
lmolkova opened this issue Jun 22, 2018 · 1 comment
Closed

Request tracking configuration improvements #709

lmolkova opened this issue Jun 22, 2018 · 1 comment
Assignees
Milestone

Comments

@lmolkova
Copy link
Member

lmolkova commented Jun 22, 2018

In some cases, injection and auto-config via AddApplicationInsights is not convenient: not all features are needed or some very specific config needs to be done.

It's complicated for request collection:

  1. RequestTrackingTelemetryModule configures HostingDiagnosticListener and MvcDiagnosticsListener.

Hosting is responsible for

  • request tracking
  • appId injection into the response

Mvc listener is responsible for exception tracking.

In some cases I want to configure only requests, but not exceptions or vice versa (e.g. for functions I want to configure requests only, but exceptions are tracked in a different way), so I suggest:

  • configure them in a DI way: register list of IApplicationInsightDiagnosticListener in DI and pass the list as a parameter for RequestTrackingTelemetryModule
    OR
  • split requests and exception tracking into 2 different modules.
  1. OperationCorrelaitonTelemetryIntitializer extracts appId from the incoming request. It should be removed and done in hosting diagnostic listener.
    Also, the initializer is internal so configuring it in the app explicitly via DI is not possible
@lmolkova lmolkova self-assigned this Jul 6, 2018
@cijothomas cijothomas added this to the 2.4.0 milestone Jul 6, 2018
@cijothomas cijothomas modified the milestones: 2.4.0, 2.5.0 Aug 3, 2018
@cijothomas cijothomas modified the milestones: 2.5.0, 2.6.0 Oct 3, 2018
@lmolkova
Copy link
Member Author

fixed in #716

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants