Skip to content

Conversation

nagkumar91
Copy link
Contributor

@nagkumar91 nagkumar91 commented Oct 7, 2025

Description

Updates the previous barebones PR to include genai spans and traces.

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?

Testing

  • Manual agents example: cd instrumentation-genai/opentelemetry-instrumentation-openai-agents/examples/manual && cp .env.example .env (populate OPENAI_API_KEY, optional OTLP vars) then python3 main.py; confirmed travel response prints and spans export
    cleanly with integer timestamps.
  • Zero-code example: cd instrumentation-genai/opentelemetry-instrumentation-openai-agents/examples/zero-code && cp .env.example .env (set API key) then python3 main.py; verified auto-configured instrumentation loads env defaults and completes without
    exporter errors.
  • Unit tests: From repo root, with .venv active and pip install -e .[examples] applied, ran python3 -m pytest opentelemetry-instrumentation-openai-agents/tests/test_tracer.py; all tests passed, confirming span translation logic handles nanosecond
    timestamps and attribute mapping.

Environment

  • Python 3.9.6 inside the project’s .venv.
  • Dependencies installed via pip install -e instrumentation-genai/opentelemetry-instrumentation-openai-agents[examples].
  • OTLP collector optional; when unavailable, spans export successfully to the default console exporter.

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 8, 2025 20:28
@nagkumar91 nagkumar91 requested a review from a team as a code owner October 8, 2025 20:28
@lzchen lzchen merged commit fa5f44e into open-telemetry:main Oct 13, 2025
638 checks passed
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.

6 participants