opentelemetry-specification
opentelemetry-specification copied to clipboard
Define SpanProcessor emitting span lifecycle events
Define SpanProcessor emitting span lifecycle events. Related to:
- https://github.com/open-telemetry/semantic-conventions/issues/2133
I think we could also explore defining a SpanProcessor in Trace SDK that emits events via Logs API when a span is started and ended.
I would like to add that in our current implementation of such a
SpanProcessor, we are also exporting heartbeat logs on an interval so that we know that the process is still running and the span is active. Furthermore, we can set whatever data we want on the log body in order to gain more visibility during the heartbeat export.
Originally posted by @xBis7 in #373
It seems like there's some consensus on this, so let me summarize.
- There's a general agreement that we should have a way to send events about span lifecycle (e.g., started, stopped, in process) out-of-band of the normal span export pipeline.
- These events could be codified as semantic events in semantic conventions
- A span processor could be defined as a part of the trace SDK that enables this functionality
I feel like that's a solid enough definition of what people are looking for here and it's achievable enough that we should go ahead and accept it. WDYT?
Originally posted by @austinlparker in #373