File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/OpenTelemetry.Exporter.OpenTelemetryProtocol Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -350,6 +350,14 @@ services.AddOpenTelemetry()
350350 }));
351351```
352352
353+ > [ !NOTE]
354+ > ` DefaultRequestHeaders ` can be used for [ HTTP Basic Access
355+ Authentication] ( https://en.wikipedia.org/wiki/Basic_access_authentication ) . For
356+ more complex authentication requirements,
357+ [ ` System.Net.Http.DelegatingHandler ` ] ( https://learn.microsoft.com/dotnet/api/system.net.http.delegatinghandler )
358+ can be used to handle token refresh, as explained
359+ [ here] ( https://stackoverflow.com/questions/56204350/how-to-refresh-a-token-using-ihttpclientfactory ) .
360+
353361For users using
354362[ IHttpClientFactory] ( https://docs.microsoft.com/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests )
355363you may also customize the named "OtlpTraceExporter" and/or "OtlpMetricExporter"
@@ -362,8 +370,9 @@ services.AddHttpClient(
362370 client .DefaultRequestHeaders .Add (" X-MyCustomHeader" , " value" ));
363371```
364372
365- Note: The single instance returned by ` HttpClientFactory ` is reused by all
366- export requests.
373+ > [ !NOTE]
374+ > The single instance returned by ` HttpClientFactory ` is reused by all export
375+ requests.
367376
368377## Troubleshooting
369378
You can’t perform that action at this time.
0 commit comments