---
source: apollo-router/src/plugins/telemetry/config_new/instruments.rs
description: Custom counter with conditions
expression: "&metrics.all()"
info:
  telemetry:
    instrumentation:
      instruments:
        router:
          http.server.active_requests: false
          http.server.request.duration: false
          custom.histogram:
            description: histogram of requests
            type: histogram
            unit: unit
            value: unit
            attributes:
              http.request.method: true
              custom_attribute:
                request_header: custom_header
            condition:
              eq:
                - request_header: custom_header
                - allowed
---
- name: custom.histogram
  description: histogram of requests
  unit: unit
  data:
    datapoints:
      - sum: 1
        count: 1
        attributes:
          custom_attribute: allowed
          http.request.method: GET
