Skip to content

Latest commit

History

History
43 lines (36 loc) 路 1.37 KB

feat_bnjjj_feat_4319.md

File metadata and controls

43 lines (36 loc) 路 1.37 KB

Add support of instruments in configuration for telemetry (Issue #4319)

Add support for custom and standard instruments through the configuration file. You'll be able to add your own custom metrics just using the configuration file. They may:

  • be conditional
  • get values from selectors, for instance headers, context or body
  • have different types like histogram or counter.

Example:

telemetry:
  instrumentation:
    instruments:
      router:
        http.server.active_requests: true
        acme.request.duration:
          value: duration
          type: counter
          unit: kb
          description: "my description"
          attributes:
            http.response.status_code: true
            "my_attribute":
              response_header: "x-my-header"
  
      supergraph:
        acme.graphql.requests:
          value: unit
          type: counter
          unit: count
          description: "supergraph requests"
          
      subgraph:
        acme.graphql.subgraph.errors:
          value: unit
          type: counter
          unit: count
          description: "my description"

Documentation

By @bnjjj in #4771