Forces to export all finished spans
Called when a ReadableSpan is ended, if the span.isRecording()
returns true.
the Span that just ended.
Called when a Span is started, if the span.isRecording()
returns true.
the Span that just started.
Shuts down the processor. Called when SDK is shut down. This is an opportunity for processor to do any cleanup required.
Propagates
microsoft.gen_ai.main_agent.*attributes onto spans.onStart: copies main-agent attributes from the parent span (or falls back to the parent'sgen_ai.agent.*/gen_ai.conversation.idattributes) onto the new span.onEnd: when the span is itself aninvoke_agentoperation and has not already been enriched, copies its owngen_ai.agent.*/gen_ai.conversation.idattributes ontomicrosoft.gen_ai.main_agent.*so the top-level agent identifies itself as the main agent.