---
source: apollo-router/src/plugins/telemetry/config_new/instruments.rs
description: Custom counter with conditions
expression: "&metrics.all()"
info:
  telemetry:
    instrumentation:
      instruments:
        default_requirement_level: none
        supergraph:
          custom_counter:
            description: count of requests
            type: counter
            unit: unit
            value: unit
            attributes:
              graphql.document: true
              custom_attribute:
                request_header: custom_header
            condition:
              eq:
                - request_header: custom_header
                - allowed
---
- name: custom_counter
  description: count of requests
  unit: unit
  data:
    datapoints:
      - value: 1
        attributes:
          custom_attribute: allowed
          graphql.document: "query { hello }"
