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

router config: Adding attributes to telemetry instrumentation failing to apply #6175

Open
chriscerk opened this issue Oct 18, 2024 · 1 comment

Comments

@chriscerk
Copy link

Describe the bug

A clear and concise description of what the bug is.

Adding attributes to instrumentation settings are failing to be applied to metrics.

To Reproduce

  1. Configure the following instrumentation
instrumentation:
    instruments:
      subgraph:
        http.client.request.duration:
          attributes:
            subgraph.graphql.errors: # attribute containing a boolean set to true if response.errors is not empty
              subgraph_on_graphql_error: true
            subgraph.graphql.operation.kind: # capture if the operation is a query, mutation, or subscription
              subgraph_operation_kind: string
        requests.timeout: # apollo_router_timeout_total doesn't have enough metadata to be useful, so we're creating a new metric
            value: unit
            type: counter
            unit: request
            description: "subgraph requests containing subgraph timeout"
            attributes:
              subgraph.name: true
              subgraph.graphql.operation.name: true
              subgraph.graphql.operation.type: true
            condition:
              eq:
                - "request timed out"
                - error: reason
  1. Deploy
  2. Lacking of instrumentation applying

Expected behavior

A clear and concise description of what you expected to happen.

  • Attributes added to metrics
    • apollo_router_timeout_total to have labels based on the following attributes since we have configuration for requests.timeout
      • subgraph.name
      • subgraph.graphql.operation.name: true
      • subgraph.graphql.operation.type: true
    • apollo_router_http_request_duration (with corresponding suffixes) to have labels based on the following attributes since we have configuration for http.client.request.duration
      • subgraph_on_graphql_error
      • subgraph_operation_kind
  • Clear documentation on how to apply instrumentation - the above instrumentation is syntactically correct via jsonschema checks against the yaml but seemingly fails to apply - there is a large lack of documentation on how instrumentation affects OTEL metrics

Output

If applicable, add output to help explain your problem.

n/a - and not seeing any issues deploying or errs/warning in router logs

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

n/a

Additional context

Add any other context about the problem here.

@chriscerk chriscerk changed the title Adding attributes to telemetry Instrumentation failing to apply router config: Adding attributes to telemetry instrumentation failing to apply Oct 22, 2024
@chriscerk
Copy link
Author

chriscerk commented Dec 12, 2024

bump on this issue

to re-iterate with a quick summary - we are an Enterprise customer that would like our custom instrumentation to work.

so requests.timeout above we'd expect a requests_timeout metric being created - if that is an incorrect assumption please advise.

this is directly from the Apollo example here

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

No branches or pull requests

1 participant