Skip to content

[WIP] Schema v2: proposal #824

@lmolkova

Description

@lmolkova

Part of open-telemetry/opentelemetry-specification#4427

Harmonize identity property names

Principles:

  • same as OTLP property when possible/makes sense
  • default to name
signal/object current id semconv proposal in proto
attributes id (unresolved schema) and name (resolved) key key
metrics metric_name name name
events name name event_name, no name for log records
spans - type will propose type, spans already have name, kind and spanId
entity name type type
profiles - - -
scopes - - name

Have dedicated types for different objects/signals

attributes: # instead of `registry.*` attribute groups
- key: foo.name
  ...
- key: foo.target
metrics:  # instead of group.type: metric
- name: foo.duration
entities:
- type: foo
events:
- name: foo.ended
spans:
- type: foo.client.request # new
  kind: client
  name: {foo.name} {foo.target}  # new

References have different types as well

(referencing is only available in unresolved schema)

metric_refs:
- id: my_flavor.foo.duration
  extends: foo.duration # or fully-qualified otel.foo.duration, namespace delimiter tbd
  attributes:
  - ref: azure.resource.id 
    brief: ...

each _ref instance has to be identifiable. There could be multiple favors of the same metric that have the same name, but different ids.

Imports

no changes, works naturally and looks consistent

imports:
- attributes: foo.*
- spans: foo.*

Stages

  1. weaver supports new unresolved schema format
    • unresolved schema is still pretty much contained within semconv, easy to change
    • weaver should probably support old schema for the time being and convert it to the same internal representation
      --- we're here on 8/18/25 --
  2. new resolution format is produced behind feature flag - resolved schema is extensively used by codegen
    • need to socialize among maintainers
    • jq helpers used by codegen produce something close to the proposal (group by attributes/metrics/etc), so we can probably keep back-compat
  3. default to the new format

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions