Skip to content

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

Open
@lionskape

Description

@lionskape

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions