Skip to content

Include gen_ai.conversation.id in OTEL spans #421

@pedelman

Description

@pedelman

Is your feature request related to a problem? Please describe.
I am exploring AI Evals platforms with adk-go and notice that each message in the conversation is not linked together when using the OTEL integration. When I checked the spans, it seems like the gen_ai.conversation.id is not included currently.

It does look like adk-go supplies:

gcp.vertex.agent.session_id: UUID

I dont think we would need to remove this span attribute, we can just add the gen_ai semantic convention as an additive change.

Describe the solution you'd like
I would like the conversation session id to be passes as the gen_ai.conversation.id so messages can be linked together across multiple traces within the Evals platform.

Image

Looks like it can be set here:

attribute.String(gcpVertexAgentSessionID, agentCtx.Session().ID()),

Describe alternatives you've considered
If there are any workarounds, I would certainly be open to this. Otherwise I can work on a custom fork for the time being.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions