Commit 88b6b0e 1 parent 09dd46f commit 88b6b0e Copy full SHA for 88b6b0e
File tree 1 file changed +11
-2
lines changed
src/OpenTelemetry.Exporter.OpenTelemetryProtocol
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -350,6 +350,14 @@ services.AddOpenTelemetry()
350
350
}));
351
351
```
352
352
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
+
353
361
For users using
354
362
[ IHttpClientFactory] ( https://docs.microsoft.com/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests )
355
363
you may also customize the named "OtlpTraceExporter" and/or "OtlpMetricExporter"
@@ -362,8 +370,9 @@ services.AddHttpClient(
362
370
client .DefaultRequestHeaders .Add (" X-MyCustomHeader" , " value" ));
363
371
```
364
372
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.
367
376
368
377
## Troubleshooting
369
378
You can’t perform that action at this time.
0 commit comments