fix(telemetry): add common gen_ai attributes to event loop cycle spans#1877
fix(telemetry): add common gen_ai attributes to event loop cycle spans#1877giulio-leone wants to merge 1 commit intostrands-agents:mainfrom
Conversation
460da10 to
77a8f42
Compare
|
Friendly ping — adds standard |
start_event_loop_cycle_span() was missing the _get_common_attributes() call that all other span start methods (start_model_invoke_span, start_tool_call_span, start_agent_span, start_multiagent_span) include. This caused event_loop_cycle spans to carry gen_ai.input.messages (via _add_event_messages) but lack gen_ai.system/gen_ai.provider.name and gen_ai.operation.name, which downstream OTEL tooling (collectors, exporters, redaction processors) may rely on for filtering/policy. Closes #1876
77a8f42 to
7eeab90
Compare
|
Refreshed onto Root cause confirmed still live: Fix: Call Runtime proof on rebased branch
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
start_event_loop_cycle_span()was the only span start method that did not call_get_common_attributes(), causing event loop cycle spans to lackgen_ai.system/gen_ai.provider.nameandgen_ai.operation.nameattributes.This is inconsistent with
start_model_invoke_span,start_tool_call_span,start_agent_span, andstart_multiagent_span, all of which include these common attributes. Downstream OTEL tooling (collectors, exporters, redaction processors) may rely on these attributes for filtering or policy decisions.Changes
_get_common_attributes(operation_name="execute_event_loop_cycle")call instart_event_loop_cycle_span()Testing
All 74 tracer tests pass (including 5 event_loop_cycle-specific tests).
Closes #1876