Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define span events to events mapping #4023

Closed
wants to merge 4 commits into from

Conversation

lmolkova
Copy link
Contributor

Changes

Introduces mapping from Span Events to Events (along with open-telemetry/semantic-conventions#954).

This mechanism allows

The end-to-end case:

  1. Instrumentation emits Span Events using existing Trace API.
    • it provides payload in a dedicated attribute (event.data). It's serialized to JSON (Note: "plain string" is a valid JSON)
    • we may define a mapping for severity as well
  2. Mapping component (e.g. a span processor or a collector processor) transforms span events to events using the defined mapping.
    • the current version of this PR defines API-level mapping (for in-process component such as span processor)
    • it should be possible to define a mapping to LogRecords and/or on the OTLP level
  3. [Out of scope of this PR] Such component can be implemented
    • as a part of OTel SDK Span implementation and used to deprecate Span Events. It can then follow Event sampling rules rather than Span sampling.
    • as an opt-in contrib span processor/collector processor or on the backend. Then it will follow Span sampling decisions

@lmolkova
Copy link
Contributor Author

lmolkova commented May 7, 2024

Based on the discussions in the Spec and Semconv WG, we'd try to leverage Event API (or log API in the short term) to emit events with body instead of adding mapping to span events.
The would help us to retire span events sooner and invest into Event API where it's lacking.

The attribute like event.data that would be essential for Event API -> log-based events mapping (if it's ever needed).

So I'm going to close this PR.

@lmolkova lmolkova closed this May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant