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

opentelemetry-instrumentation-genai-anthropic gaps vs openinference instrumentation

Open
#542 0 comments 0 reactions 0 assignees View on GitHub

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
  • Add beta.messages.create span (anthropic.resources.beta.messages.Messages.create / AsyncMessages.create) - maps to GenAI gen_ai.inference.client (chat) #550
  • Add beta.messages.stream span (anthropic.resources.beta.messages.Messages.stream / AsyncMessages.stream) - maps to GenAI gen_ai.inference.client (chat) #551
  • Add beta.messages.parse span (anthropic.resources.beta.messages.Messages.parse / AsyncMessages.parse) - maps to GenAI gen_ai.inference.client (chat) #552
Missing Attributes & Features
  • Capture tool definitions on chat from request tools in messages_extractors.py (OpenInference: llm.tools.*.tool.json_schema, semconv: gen_ai.tool.definitions) #553
  • Capture cache write tokens on chat from usage.cache_creation_input_tokens in messages_extractors.py using semconv attribute name (OpenInference: llm.token_count.prompt_details.cache_write, semconv: gen_ai.usage.cache_write.input_tokens) #554

Gaps for Legacy APIs

  • Add legacy completions.create span (anthropic.resources.completions.Completions.create / AsyncCompletions.create) - maps to GenAI gen_ai.inference.client (text_completion)
  • Support legacy prompt parameter on text_completion (OpenInference: llm.prompts)

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

Read messages_extractors.py and the listed Anthropic Messages.create, stream, and parse entry points first. Choose one numbered gap, such as issue #550, #551, or #552, and trace its corresponding GenAI mapping. Done means the selected span or attribute is captured according to the requested semantic-convention mapping.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability-sre
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.