Skip to content

[telemetry] Align GDPR measurement metadata with emitted telemetry types #9689

Description

@hemarina

Problem

The GDPR metadata exporter uses AttributeKey.IsMeasurement to choose between $.Measurements and $.Properties, while the Application Insights exporter chooses the destination from the emitted OpenTelemetry value type. Several field declarations do not match their runtime value types:

  • exegraph.max_concurrency, tool.exitCode, and agent.fix.attempts are emitted as integers but are not declared as measurements.
  • service.errorCode is emitted as a string but is declared as a measurement.
  • service.statusCode is intentionally dual-shaped: numeric HTTP/service statuses are measurements, while AAD OAuth statuses are strings.

This can cause newly generated GDPR catalog rows to use the wrong property path and leaves the telemetry reference inconsistent with runtime behavior.

Proposed changes

  • Align IsMeasurement with the emitted value type for the definite mismatches.
  • Preserve and document the existing dual-shaped service.statusCode behavior.
  • Correct the public telemetry reference and metrics-audit schema.
  • Add regression coverage for the corrected GDPR metadata.

Parent tracking

This work belongs to #9385.

Metadata

Metadata

Labels

area/telemetryTelemetry, tracing, observability

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions