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

opentelemetry-instrumentation-google-genai gaps vs openinference instrumentation

Open
#560 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 InteractionsResource.get span (google.genai._interactions.resources.interactions.InteractionsResource.get / google.genai._gaos.interactions.Interactions.get, and async variants) - maps to GenAI fetch_response (#561)
Missing Attributes & Features
  • Capture previous_interaction_id on interactions.create (OpenInference: metadata.previous_interaction_id, semconv: gen_ai.request.previous_response.id) (#562)
  • Capture request parameters from generation_config on interactions.create (OpenInference: llm.invocation_parameters, semconv: gen_ai.request.temperature, gen_ai.request.top_p, gen_ai.request.max_tokens, gen_ai.request.seed, gen_ai.request.stop_sequences, gen_ai.output.type) (#563)
  • Capture audio token counts on generate_content (OpenInference: llm.token_count.prompt_details.audio, llm.token_count.completion_details.audio, semconv: gen_ai.usage.audio.input_tokens, gen_ai.usage.audio.output_tokens) (#564)
  • Capture intermediate tool calls from automatic_function_calling_history on generate_content (OpenInference: llm.output_messages, semconv: gen_ai.output.messages) (#565)

Blocked on Semantic Conventions

Missing Spans
  • Add Caches.create span (google.genai.caches.Caches.create and google.genai.caches.AsyncCaches.create)
Missing Attributes & Features

See also #170

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

Start with the listed Google GenAI entry points, including InteractionsResource.get, interactions.create, generate_content, Caches.create, and embed_content, then compare their instrumentation with the OpenInference and semantic-convention mappings named in the issue. The ready-to-fix work is tracked in #561–#565; completion means implementing the applicable spans, attributes, and features, while leaving convention-blocked items until their dependency is resolved.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.