Skip to content

Make http metrics attribute extensible #13961

Open
@Munken

Description

@Munken

Is your feature request related to a problem? Please describe.

We are running a multi tenant setup, where the tenant ID is propagated as a JWT claim.
We would like to capture this tenant ID and have it is an attribute on the http server and client metrics.

This is similar to the http header capture, except that further processing is required (decode + map extract).

Describe the solution you'd like

There several possible options:

  1. Add JWT claim in a similar fashion to http header capturing.
  2. Possible to add an AttributeExtractor to the http client/server instrument builders. This would most likely need a HeaderGetter helper.
  3. Possible to add header transformers

Describe alternatives you've considered

We could use the existing header capture functionality, if the tenant ID were available in a header.
However, that would require:

  • The header is set on first call
  • The header is propagated

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds triageNew issue that requires triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions