Skip to content

How to add arbitrary attributes to the exported metrics #11220

Answered by laurit
WesselAtWork asked this question in Q&A
Discussion options

You must be logged in to vote

But more generally, how do we export arbitrary attributes with the metrics?

you don't

I want to add the url.path to the metrics being exported.

So you wish to add url.path to http.client.request.duration metric. This can be achieved configuring a metric view https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/incubator either programmatically in an agent extension or using a configuration file. Agent limits the set of attributes added to metrics using advice in

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
3 replies
@WesselAtWork
Comment options

@laurit
Comment options

@WesselAtWork
Comment options

Answer selected by WesselAtWork
Comment options

You must be logged in to vote
8 replies
@trask
Comment options

@laurit
Comment options

@laurit
Comment options

@trask
Comment options

@trask
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants