---
source: apollo-router/src/plugins/telemetry/config_new/instruments.rs
description: Custom counter should be incremented on timeout error with operation_name attribute
expression: "&metrics.all()"
info:
  telemetry:
    instrumentation:
      instruments:
        router:
          http.server.active_requests: false
          http.server.request.duration: false
          http.server.request.timeout:
            type: counter
            value: unit
            description: request in timeout
            unit: request
            attributes:
              graphql.operation.name:
                response_context: operation_name
            condition:
              eq:
                - request timed out
                - error: reason
---
- name: http.server.request.timeout
  description: request in timeout
  unit: request
  data:
    datapoints:
      - value: 1
        attributes:
          graphql.operation.name: TestQuery
