Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add per quest customized attribute to http metrics instrumentation #5382

Open
NickiHua opened this issue Apr 14, 2024 · 0 comments
Open

Add per quest customized attribute to http metrics instrumentation #5382

NickiHua opened this issue Apr 14, 2024 · 0 comments
Labels
area: instrumentation Related to an instrumentation package enhancement New feature or request instrumentation: otelhttp

Comments

@NickiHua
Copy link

NickiHua commented Apr 14, 2024

Problem Statement

We are trying to add instrumentation to our http server and client with go opentelemetry http instrumentation. Our caller will have some special header sets indicating the caller identity and we would like to emit that in the http metrics, e.g. http.server.duration then we can have statistics of the latency for the specific user.

It looks like labeler can only set some static customized attributes but not per request attributes.

Is there a way to do that? Let the meter to read the http request header and set that in the metrics for every request? Or we have to implement our own otel http instrumentation?

@NickiHua NickiHua added area: instrumentation Related to an instrumentation package enhancement New feature or request instrumentation: otelhttp labels Apr 14, 2024
@NickiHua NickiHua changed the title Add customized attribute to http metrics instrumentation Add per quest customized attribute to http metrics instrumentation Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: instrumentation Related to an instrumentation package enhancement New feature or request instrumentation: otelhttp
Projects
None yet
Development

No branches or pull requests

1 participant