Skip to content

feat(dashboards): Teach AI dashboard generator the tracemetrics aggregate format#115480

Merged
DominikB2014 merged 3 commits into
masterfrom
dominikbuszowiecki/feat/dashboards-ai-tracemetrics-prompt
May 19, 2026
Merged

feat(dashboards): Teach AI dashboard generator the tracemetrics aggregate format#115480
DominikB2014 merged 3 commits into
masterfrom
dominikbuszowiecki/feat/dashboards-ai-tracemetrics-prompt

Conversation

@DominikB2014
Copy link
Copy Markdown
Contributor

@DominikB2014 DominikB2014 commented May 13, 2026

Provide more information about trace metrics and their format

…gate format

The Seer agent that powers AI dashboard generation had no guidance on how
to construct aggregates for the tracemetrics dataset, leading it to
hallucinate single-argument forms like p50(lighthouse.score). Trace metric
aggregates actually require a multi-argument form:
func(attribute, metric_name, metric_type), where metric_type is one of
counter, gauge, or distribution.

Document the required form and an enumerated list of valid functions in
both the on-page prompt and the GeneratedWidgetQuery.aggregates schema
description. Also instruct the agent to look up metric_type via existing
tools (trace-items attributes / tracemetrics queries) rather than guessing.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 13, 2026
@DominikB2014 DominikB2014 marked this pull request as ready for review May 14, 2026 15:30
@DominikB2014 DominikB2014 requested a review from a team as a code owner May 14, 2026 15:30
@DominikB2014 DominikB2014 marked this pull request as draft May 14, 2026 15:31
@DominikB2014 DominikB2014 marked this pull request as ready for review May 19, 2026 13:51
Comment thread src/sentry/dashboards/endpoints/organization_dashboard_generate.py Outdated
…metrics

Restrict the AI dashboard generator guidance to only `value` for the
tracemetrics aggregate attribute, so the agent does not try other
attributes that are not supported at this time.

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

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 8529edd. Configure here.

Comment thread src/sentry/dashboards/models/generate_dashboard_artifact.py Outdated
…hema

Update the `aggregates` field description to match the prompt context:
only `value` is supported for the tracemetrics attribute.

Co-Authored-By: Claude <noreply@anthropic.com>
@DominikB2014 DominikB2014 merged commit d79fc2b into master May 19, 2026
62 checks passed
@DominikB2014 DominikB2014 deleted the dominikbuszowiecki/feat/dashboards-ai-tracemetrics-prompt branch May 19, 2026 20:03
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.

2 participants