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 setting metric attributes from a context sub key #4750

Open
Geal opened this issue Mar 5, 2024 · 2 comments
Open

Allow setting metric attributes from a context sub key #4750

Geal opened this issue Mar 5, 2024 · 2 comments

Comments

@Geal
Copy link
Contributor

Geal commented Mar 5, 2024

metric attributes can be set from a context key: https://www.apollographql.com/docs/router/configuration/telemetry/exporters/metrics/overview/#attributes

But it only supports the key to a top level object. It would be useful to get data from sub keys from an object like:

telemetry:
  exporters:
    metrics:
      common:
        attributes:
          supergraph:
            context:
              - named: toplevelobject.sub_key
@BrynCooke
Copy link
Contributor

I think this will be solved by the work that @bnjjj is working on.

@bnjjj
Copy link
Contributor

bnjjj commented Mar 11, 2024

Yes it will be possible to do this using selectors and custom instruments cc #4319 #4771

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

No branches or pull requests

3 participants