8000 Workflow root span for openai agents by nagkumar91 · Pull Request #3825 · open-telemetry/opentelemetry-python-contrib · GitHub
[go: up one dir, main page]

Skip to content

Conversation

nagkumar91
Copy link
Contributor
@nagkumar91 nagkumar91 commented Oct 9, 2025

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Unit tests: pytest opentelemetry-instrumentation-openai-agents/tests/test_tracer.py
  • Why: Covers span-kind assignment with the new workflow root span, attribute propagation for generation/response/agent/function spans, and the various overrides.
  • Repro steps:
    1. cd instrumentation-genai/opentelemetry-instrumentation-openai-agents
    2. python3 -m pytest tests/test_tracer.py

Manual verification (optional but recommended)

  • Run the multi-agent handoff sample: Shows the emitted workflow SERVER span plus multiple invoke_agent and execute_tool spans.
    1. cd instrumentation-genai/opentelemetry-instrumentation-openai-agents/examples/handoffs
    2. python3 -m venv .venv && source .venv/bin/activate
    3. pip install "python-dotenv[cli]" and pip install -r requirements.txt
    4. Copy .env.example → .env, set OPENAI_API_KEY, adjust OTLP settings if needed
    5. dotenv run -- python main.py (or export the vars and run python main.py)

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@nagkumar91 nagkumar91 marked this pull request as ready for review October 9, 2025 18:02
@nagkumar91 nagkumar91 requested a review from a team as a code owner October 9, 2025 18:02
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.

5 participants

0