Skip to content

feat(weave_ts): Add gen_ai.conversation.id as attribute on all spans in @openai/agents integration#7339

Merged
drtangible merged 1 commit into
masterfrom
06-22-chore_weave_ts_consolidate_trace_state_in_otel_processor
Jun 23, 2026
Merged

feat(weave_ts): Add gen_ai.conversation.id as attribute on all spans in @openai/agents integration#7339
drtangible merged 1 commit into
masterfrom
06-22-chore_weave_ts_consolidate_trace_state_in_otel_processor

Conversation

@drtangible

@drtangible drtangible commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description

  • We currently require this attribute on all children spans in order for certain pieces of data to populate in the Weave UI.

  • This change starts including gen_ai.conversation.id as attrs on all span types, instead of only a select few.

  • We'll have similar changes for gen_ai.agent.name as well as our custom integration.foo attrs further up this stack.

  • As part of this, refactors the per-trace information we're storing, consolidating two separate Maps into one.

drtangible commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@drtangible drtangible force-pushed the 06-22-chore_weave_ts_consolidate_trace_state_in_otel_processor branch 2 times, most recently from 8f233df to 5a0ac8d Compare June 22, 2026 17:49
@drtangible drtangible changed the title feat(weave_ts): Add gen_ai.converastion.id as attribute on all spans in @openai/agents integration feat(weave_ts): Add gen_ai.converstaion.id as attribute on all spans in @openai/agents integration Jun 22, 2026
@drtangible drtangible changed the title feat(weave_ts): Add gen_ai.converstaion.id as attribute on all spans in @openai/agents integration feat(weave_ts): Add gen_ai.conversation.id as attribute on all spans in @openai/agents integration Jun 22, 2026
@drtangible drtangible force-pushed the 06-22-chore_weave_ts_consolidate_trace_state_in_otel_processor branch from 5a0ac8d to 3bd20c9 Compare June 22, 2026 18:12
@drtangible drtangible marked this pull request as ready for review June 22, 2026 18:20
@drtangible drtangible requested review from a team as code owners June 22, 2026 18:20
this.conversationIdsByTraceId.get(span.traceId) ?? '';
const attrs = attrsForSpan(span, conversationId);
otelSpan.setAttributes(attrs);
otelSpan.setAttributes({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use BaggageSpanProcessor? and then setAttributes?

@drtangible drtangible merged commit 75cfbe1 into master Jun 23, 2026
114 checks passed
@drtangible drtangible deleted the 06-22-chore_weave_ts_consolidate_trace_state_in_otel_processor branch June 23, 2026 14:37
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants