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

Provide HTTP client message handler to propagate dependency ID (option #1) #257

Closed
stijnmoreels opened this issue Oct 12, 2021 · 2 comments · Fixed by #346
Closed

Provide HTTP client message handler to propagate dependency ID (option #1) #257

stijnmoreels opened this issue Oct 12, 2021 · 2 comments · Fixed by #346
Assignees
Labels
area:telemetry All issues related to telemetry service-to-service-correlation Issues related to service to service correlation.
Milestone

Comments

@stijnmoreels
Copy link
Member

stijnmoreels commented Oct 12, 2021

Is your feature request related to a problem? Please describe.
When sending out a HTTP message, we need to track it as a HTTP dependency in Application Insights. To link the correlation between services, we need to propagate the dependency ID to the HTTP telemetry model and enrich the HTTP headers with the correlation information.

Describe the solution you'd like
Option 1 is to create an HTTP message handler that we can register in the Dependency Injection container, so the IHttpClient that is used throughout the application is enriched with this custom message handler.
These message handlers are scoped dependencies, so we can inject our ICorrelationInfoAccessor easily to have access to the current correlation information.

Describe alternatives you've considered
Option 2: where we provide and extension on the HttpClient #258.

Additional context
https://thomaslevesque.com/2016/12/08/fun-with-the-httpclient-pipeline/
https://github.com/arcus-azure/arcus-service-to-service-correlation-poc
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/http-requests?view=aspnetcore-5.0

@stijnmoreels
Copy link
Member Author

This issue is now dependent on the outcome of this discussion probably: arcus-azure/arcus-service-to-service-correlation-poc#6

@stijnmoreels
Copy link
Member Author

So, I'm guessting this will be low-prio too together with #258 bc we will first focus on receival?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:telemetry All issues related to telemetry service-to-service-correlation Issues related to service to service correlation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant