Skip to content

Latest commit

 

History

History
76 lines (62 loc) · 1.73 KB

File metadata and controls

76 lines (62 loc) · 1.73 KB

Registry

A registry defines telemetry using a schema.

The official OTel Semantic Conventions are defined in a registry located at open-telemetry/semantic-conventions/model.

Format

Full reference at https://github.com/open-telemetry/weaver/blob/main/schemas/semconv-syntax.md

# yaml-language-server: $schema=https://raw.githubusercontent.com/open-telemetry/weaver/refs/heads/main/schemas/semconv.schema.json
groups:
- id: string
  type: metric | span | event | attribute_group | ...
  stability: development | stable | ...
  brief: string
  ...

Metrics

- id: metric.container.uptime
  type: metric
  metric_name: container.uptime
  stability: development
  brief: "The time the container has been running"
  instrument: gauge
  unit: s

Traces

- id: span.http.client
  type: span
  extends: attributes.http.client
  stabilit: stable
  brief: "This span represents an outbound HTTP request"
  attributes:
    - ref: http.request.method
      sampling_relevant: true

Attributes

Attributes can be defined either inline at the metric/span/etc. or centrally in a group:

- id: registry.http
  type: attribute_group
  brief: "Describes HTTP attributes"
  attributes:
  - id: http.request.method
    stability: stable
    type:
      members:
      - id: get
        value: GET
      - id: head
        value: HEAD

Once defined, they can be referred to by id:

- id: metric.http.server.active_requests
  type: metric
  metric_name: http.server.active_requests
  instrument: updowncounter
  unit: "{request}"
  attributes:
  - ref: http.request.method    # defined in registry.http above
    requirement_level: required