open-telemetry / open-telemetry/opentelemetry-python-genai

Tracking: migrate OpenInference Python instrumentations into this repo

Open
#141 51 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39
Forks
63
Avg merge
1d 15h
Merged PRs (30d)
175

Description

This issue tracks porting the OpenInference Python instrumentation packages into
opentelemetry-python-genai, so that GenAI instrumentation is built on the shared
opentelemetry-util-genai utilities and emits telemetry that conforms to the
GenAI semantic conventions.

[!IMPORTANT]

Candidate packages (ordered by recent PyPI downloads):

OI package Downloads last month Assignee Status Notes
openinference-instrumentation-langchain 2,303,629 @wrisa @keith-decker @lzchen @rads-1996 https://github.com/open-telemetry/opentelemetry-python-genai/issues/543
openinference-instrumentation-openai 1,988,421 @eternalcuriouslearner https://github.com/open-telemetry/opentelemetry-python-genai/issues/541
openinference-instrumentation-pydantic-ai 777,820 Won't port Has native instrumentation, see conformance
openinference-instrumentation-anthropic 715,867 @eternalcuriouslearner https://github.com/open-telemetry/opentelemetry-python-genai/issues/542
openinference-instrumentation-claude-agent-sdk 625,120 @gh-raju #297 (closed, not merged)
openinference-instrumentation-openai-agents 576,006 @eternalcuriouslearner https://github.com/open-telemetry/opentelemetry-python-genai/issues/549
openinference-instrumentation-google-adk 572,630 Won't port Has native instrumentation, see conformance
openinference-instrumentation-agno 505,207 @DylanRussell https://github.com/open-telemetry/opentelemetry-python-genai/issues/555
openinference-instrumentation-litellm 504,172 @alexander-akhmetov @jgordley Has native instrumentation, see conformance, check the policy before starting
openinference-instrumentation-google-genai 472,235 @DylanRussell https://github.com/open-telemetry/opentelemetry-python-genai/issues/560
openinference-instrumentation-crewai 415,635 @venkata-pavani #224 (closed, not merged)
#308 - merged (skeleton)
#363 (closed, not merged)
#384 - open
Native instrumentation, not compatible, context
openinference-instrumentation-llama-index 413,031 @eternalcuriouslearner https://github.com/open-telemetry/opentelemetry-python-genai/issues/566 Has native instrumentation, see conformance
openinference-instrumentation-haystack 393,875 @srinjoy356 #318 - open
#373 - open
Overlapping PRs, one should be closed.
Has native instrumentation, see conformance, check the policy before starting
openinference-instrumentation-bedrock 350,897 @DylanRussell https://github.com/open-telemetry/opentelemetry-python-genai/issues/568 Overlaps with opentelemetry-instrumentation-botocore in contrib, which already instruments Bedrock Runtime.
Needs a plan to avoid double instrumentation, see discussion
openinference-instrumentation-instructor 130,202
openinference-instrumentation-mistralai 120,700 Won't port Has native instrumentation, see conformance
openinference-instrumentation-dspy 119,851 @DylanRussell #439 - merged (skeleton)
#529 - open
openinference-instrumentation-groq 117,114 @royrhea #368 (closed, not merged)
#313 - open
openinference-instrumentation-vertexai 114,965 Won't add The library is deprecated
openinference-instrumentation-smolagents 114,073 @alexander-akhmetov #349 - merged (skeleton)
#352 - merged
#403 - open
#340 - draft
openinference-instrumentation-mcp 83,845 Won't port Has native instrumentation
openinference-instrumentation-portkey 33,488 @DylanRussell #465 - merged (skeleton)
#466 - merged
openinference-instrumentation-autogen 13,098 Has native instrumentation, see conformance, check the policy before starting
openinference-instrumentation-beeai 12,368 Has native instrumentation, check the policy before starting
openinference-instrumentation-strands-agents 10,318 @Shriprasad-P Has native instrumentation, see conformance, check the policy before starting
openinference-instrumentation-agent-framework 7,385 Has native instrumentation, see conformance, check the policy before starting
openinference-instrumentation-autogen-agentchat 3,831 Has native instrumentation, see conformance, check the policy before starting
openinference-instrumentation-guardrails 3,390
openinference-instrumentation-pipecat 1,419 Has native instrumentation, check the policy before starting
openinference-instrumentation-agentspec 690

Migration guidance

  • Build on opentelemetry-util-genai. Avoid emitting spans, metrics, or events directly — use the
    shared utilities so all packages produce consistent, conformant telemetry, share the same configuration
    options and extensibility hooks, and to reduce maintenance toil.
  • Do use AI to help with the port and the review. Minimize use of AI when talking to humans.
  • Use the provided migration and review skills (to be added in https://github.com/open-telemetry/opentelemetry-python-genai/pull/143) to drive the port consistently.
  • Contribute back to the migration skills so the workflow improves as we go.
  • If migration needs a design decision or some discussion, create individual issues for these
  • Keep the PR scoped to the migration only. Do not instrument new operations and do not
    add new features beyond what the source instrumentation already does. Adding missing tests
    for the migrated behavior is encouraged.
Naming
  • Package names follow the opentelemetry-instrumentation-genai-{lib} pattern, where {lib} is
    the PyPI name of the instrumented library — e.g. crewai
    opentelemetry-instrumentation-genai-crewai, importing as
    opentelemetry.instrumentation.genai.crewai. This MAY be different from the suffix used by OpenInference.
Version support
  • Consider supporting only the latest major version of the instrumented library and dropping
    compatibility with older versions, to reduce maintenance toil.
Existing packages
  • For libraries that already have a package in this repo (marked "Existing package" above), do
    not re-port from scratch. Instead, analyze the delta between the OpenInference
    instrumentation and the existing code — operations covered, scenarios, attributes, captured
    content — and contribute only what's missing or improved back into the existing package.
    Do not modify existing code. If refactoring is helpful, do it as a follow-up to the migration PR.
Semantic conventions
  • When there is no convention for a specific operation or scenario, file a bug in
    open-telemetry/semantic-conventions-genai
    to get it specified.
  • In the meantime, report an empty span where appropriate (e.g. an operation span without
    speculative attributes). Do not report unconventional / non-spec attributes.
    Leave TODOs in the code pointing to the semconv issue.
Tests
  • Add conformance tests for the important scenarios of each library:
    • LLM clients: inference + tool calling + reasoning + multi-modal content, embeddings.
    • Agents: invoke_agent + tools, workflows, orchestration.
  • Add missing unit test coverage for the instrumentation logic (if anything is missing).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Ask to be assigned to one unclaimed package, then read its source in donation-openinference and the migration guidance in this issue, including CONTRIBUTING.md and the migration skills from PR #143. A package migration is done when it uses opentelemetry-util-genai, includes the required conformance and unit tests, and links this issue from its migration PR.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.