Does OpenTelemetry support a custom Http handler (DelegatingHandler) for logs/metrics/traces? #7183
Unanswered
pcfountain77
asked this question in
Q&A
Replies: 1 comment
-
|
You can either assign a delegate to a method to create Or there's an HttpClientFactory integration (code). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We're implementing OpenTelemetry in our Azure-hosted .NET apps. We currently use app insights for log analytics, but the plan is to send OTel logs to a collector that will then be ingested by SumoLogic. By examining our logs in Azure app insights, we've discovered that around 10% of our metrics calls to the collector are failing. In an attempt to gather more information, we used AI tools to implement a
DelegatingHandlerthat logs any failed calls. However, we didn't see any additional logs for failed calls. So I'm curious if the OpenTelemetry libraries even support this approach.Here is our setup for the
DelegatingHandler:And here is the handler itself:
Again, this code was AI-generated. From my understanding, this will only work if the OpenTelemetry libraries are using named
HttpClients with the specific namesOtlpMetricExporterandOtlpTraceExporter. I'm not sure if this is the case. Any suggestions or feedback is welcome. Thank you!Beta Was this translation helpful? Give feedback.
All reactions