Skip to content

Auto-instrumentation and wrapper traces differ for Google GenAI #1594

@lforst

Description

@lforst

Summary

Google GenAI auto-instrumentation and wrapper instrumentation both capture the same operations, but they do not emit the same trace shape.

What differs

The auto-instrumented path emits different span names / metadata shape than the wrapper path for the same Google GenAI calls.

Why this matters

This makes it harder to share one strict trace contract across wrapper and auto-instrumentation tests, and it means users may see different trace structure depending on how instrumentation is enabled.

Repro

The aligned e2e coverage in:

  • e2e/scenarios/wrap-google-genai-content-traces
  • e2e/scenarios/google-genai-auto-instrumentation-node-hook

shows the same operations being traced with different emitted span shape.

Expected

Wrapper and auto-instrumentation should converge on the same trace contract for Google GenAI where possible, especially for span naming and logged metadata.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions