Skip to content

fix(conversations): Sum non-agent span duration - #124277

Open
sentry-junior[bot] wants to merge 7 commits into
masterfrom
fix/tet-2835-non-agent-duration
Open

sentry-junior[bot] wants to merge 7 commits into
masterfrom
fix/tet-2835-non-agent-duration

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Compute conversation duration in the backend by summing spans that have gen_ai.operation.name, excluding spans whose gen_ai.operation.type is agent.

Return that aggregate as duration while keeping LLM-only generationDuration as a separate metric. The frontend switch will follow separately so frontend and backend can deploy independently.

Refs TET-2835.

via Junior system actor event.

--

View Junior Session [Sentry]

Co-Authored-By: Ognjen Bostjancic <ognjen.bostjancic@sentry.io>
@linear-code

linear-code Bot commented Sep 14, 2026

Copy link
Copy Markdown

TET-2835

@github-actions github-actions Bot added Scope: Frontend Automatically applied to PRs that change frontend components Scope: Backend Automatically applied to PRs that change backend components labels Sep 14, 2026
@github-actions github-actions Bot removed the Scope: Frontend Automatically applied to PRs that change frontend components label Sep 14, 2026
Co-Authored-By: Ognjen Bostjancic <ognjen.bostjancic@sentry.io>
@obostjancic
obostjancic marked this pull request as ready for review September 14, 2026 13:57
@obostjancic
obostjancic requested review from a team as code owners September 14, 2026 13:57
Comment thread tests/sentry/api/endpoints/test_organization_ai_conversations.py Outdated

@cursor cursor Bot left a comment

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.

Stale Bugbot comment from a previous run.

Comment thread tests/sentry/api/endpoints/test_organization_ai_conversations.py Outdated
Comment thread src/sentry/ai_monitoring/endpoints/organization_ai_conversations.py

@cursor cursor Bot left a comment

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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1f39987. Configure here.

Comment thread src/sentry/ai_monitoring/endpoints/organization_ai_conversations.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant