Skip to content

Align extension encoding (nested struct vs flat fields) across ETW and user-events exporters #589

@utpilla

Description

@utpilla

The ETW and user-events exporters use different encoding styles for Common Schema PartA extensions. The discrepancy is limited to PartA — PartB and PartC are flat in all exporters.

Current state

PartA Field ETW Logs (nested struct) User-Events Logs (flat) User-Events Trace (flat)
trace ID ext_dt struct → traceId ext_dt_traceId ext_dt_traceId
span ID ext_dt struct → spanId ext_dt_spanId ext_dt_spanId
cloud role ext_cloud struct → role ext_cloud_role ext_cloud_role
cloud role instance ext_cloud struct → roleInstance ext_cloud_roleInstance ext_cloud_roleInstance

As per the spec, both forms are valid, but the spec recommends nested structs and does not guarantee agents handle both identically.

Proposal

Align all exporters on the preferred nested struct convention for PartA extensions.

Affected crates:

  • opentelemetry-user-events-logs — switch ext_dt_traceId, ext_dt_spanId, ext_cloud_role, ext_cloud_roleInstance to nested structs
  • opentelemetry-user-events-trace — same fields

The opentelemetry-etw-logs crate already uses nested structs (after #588) and does not need changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions