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

Allow extending instrumentation-undici with custom labels for metrics #2597

Open
lionskape opened this issue Dec 10, 2024 · 2 comments · May be fixed by #2598
Open

Allow extending instrumentation-undici with custom labels for metrics #2597

lionskape opened this issue Dec 10, 2024 · 2 comments · May be fixed by #2598

Comments

@lionskape
Copy link

Is your feature request related to a problem? Please describe

Today there is no way to add custom attributes for instrumentation-undici histograms.
But it may be necessary to add some application-specific values

Describe the solution you'd like to see

I want to add a custom "record metric" hook, that will allow to add some extra labels based on request-response pair

Describe alternatives you've considered

Looks like the only one alternative here is to implement own metrics, by forking instrumentation-undici plugin.

Additional context

Imagine a situation, where u want to add some application-specific values, like "cluster name" of destination service or something mapped from response request headers. Or split metric as anonymous / authorized user requests. Or something else.

@pichlermarc
Copy link
Member

Hi @lionskape - this feature is blocked for the same reasons as in @opentelemetry/instrumentation-http. See open-telemetry/opentelemetry-js#5135

lionskape added a commit to lionskape/opentelemetry-js-contrib that referenced this issue Dec 10, 2024
@lionskape
Copy link
Author

@pichlermarc oh, so sad. Looks like there is a very long-living blocker: open-telemetry/opentelemetry-js#4096

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants