open-telemetry / open-telemetry/opentelemetry-python-genai
opentelemetry-instrumentation-genai-openai gaps vs openinference instrumentation
Open
Nobody has claimed this yet.
openinference-migration
- Dominant language
- Python
- Stars
- 39
- Forks
- 63
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 175
Description
Ready to Fix
Missing Spans
- None
Missing Attributes & Features
- Capture cached prompt tokens on
chatin patch.py and chat_wrappers.py fromusage.prompt_tokens_details.cached_tokens(OpenInference:llm.token_count.prompt_details.cache_read, semconv:gen_ai.usage.cache_read.input_tokens) #546 - Capture reasoning tokens on
chatin patch.py and chat_wrappers.py fromusage.completion_tokens_details.reasoning_tokens(OpenInference:llm.token_count.completion_details.reasoning, semconv:gen_ai.usage.reasoning.output_tokens) #547 - Support multimodal
image_urlparts in input messages onchatin utils.py (OpenInference:message.contents.*.message_content.image.image_url, semconv:gen_ai.input.messagesimage parts) #548
Blocked on Semantic Conventions
Missing Spans
- Add
responses.cancelspan (openai.resources.responses.Responses.cancel) - Add
images.generatespan (openai.resources.images.Images.generate) - Add
audio.transcriptions.createspan (openai.resources.audio.Transcriptions.create) - Add
audio.translations.createspan (openai.resources.audio.Translations.create) - Add
audio.speech.createspan (openai.resources.audio.Speech.create) - Add
moderations.createspan (openai.resources.moderations.Moderations.create) (https://github.com/open-telemetry/semantic-conventions-genai/pull/427) - Add
batches.createspan (openai.resources.batches.Batches.create) - Add
files.createspan (openai.resources.files.Files.create)
Missing Attributes & Features
- Capture audio tokens on
chatfromusage.prompt_tokens_details.audio_tokensandusage.completion_tokens_details.audio_tokens(OpenInference:llm.token_count.*_details.audio) (https://github.com/open-telemetry/semantic-conventions-genai/pull/394) - Capture input text prompt on
embeddings(OpenInference:embedding.embeddings.*.embedding.text) (https://github.com/open-telemetry/semantic-conventions-genai/issues/496) - Capture output embedding vectors on
embeddings(OpenInference:embedding.embeddings.*.embedding.vector) (https://github.com/open-telemetry/semantic-conventions-genai/issues/496)
Gaps for Legacy APIs
- Add
beta.assistants.createspan (openai.resources.beta.assistants.Assistants.create/AsyncAssistants.create) - maps to GenAIgen_ai.create_agent.client(create_agent) #544 - Add
beta.threads.runs.createspan (openai.resources.beta.threads.runs.Runs.create/AsyncRuns.create) - maps to GenAIgen_ai.invoke_agent.client(invoke_agent) #545 - Add legacy
completions.createspan (openai.resources.Completions.create/AsyncCompletions.create) - maps to GenAIgen_ai.inference.client(text_completion) - Support legacy
function_callmessage parameter and assistant choice onchatin utils.py (OpenInference:message.function_call_name,message.function_call_arguments_json) - Support legacy
functionsparameter in request tool definitions onchatin utils.py (OpenInference:llm.tools.*.tool.json_schema)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Treat this as an umbrella issue and first choose one unblocked checklist item. Read the relevant entry points named in the issue—patch.py and chat_wrappers.py for chat usage attributes, or utils.py for multimodal and legacy message handling—then compare the listed OpenInference and semantic-convention mappings. Done means one selected gap is supported and its instrumentation output matches the stated mapping.
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
- Needs clarification
- Newbie friendliness
- 25/100