Is there a way to add custom headers to all http requests and then add them to metrics? #7704
-
For traces we can create a custom ResourceProvider in extensions, can we do the same for metrics? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey @tuhao1020 ,
The same resource attributes are attached to all telemetry signals; if you register a
Like, append extra headers to outgoing HTTP client requests? You can also use baggage and the baggage propagator for that.
If you're using baggage, you can append chosen baggage attributes to the metrics; that requires using an internal/experimental API though. |
Beta Was this translation helpful? Give feedback.
-
@mateuszrzeszutek can you show me how to register SdkMeterProvider to AutoConfigurationCustomizerProvider and then use |
Beta Was this translation helpful? Give feedback.
Try the following: