Repository navigation
Conversation
Envelope items of type trace_metric (Sentry PHP SDK 4.x traceMetrics(), JavaScript SDK metrics) fell through to the fallback that turns the first valid JSON item into a feed card, which showed up as an empty "Something went wrong" event. They are now stored in sentry_metrics, kept out of the event feed like logs, transactions and spans, listed under GET /api/sentry/metrics (filters: name, type, trace_id), counted in /api/sentry/counts and cleared with the other Sentry tables. Closes buggregator#347 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sentry trace metrics (
\Sentry\traceMetrics()in the PHP SDK 4.x,Sentry.metricsin the JavaScript SDK) arrive as envelope items of typetrace_metric. Buggregator didn't know the type, so the fallback turned the item into a feed card — the empty "Something went wrong" event from #347.This is a minimal implementation that stores them and lists them:
trace_metricitems are stored in a newsentry_metricstable (name, type, value, unit, attributes, timestamp, trace/span id), migration2024_01_01_000027GET /api/sentry/metricslists them newest first, filterable byname,type(counter,gauge,distribution) andtrace_id, paginated like/api/sentry/logs/api/sentry/countsreportsmetrics,DELETE /api/sentry/allclears the tableNo aggregation (sums, percentiles, charts) yet — a list was enough to make them visible.
The UI for it is buggregator/frontend#293: a Metrics tab next to Logs.
Checklist
🤖 Generated with Claude Code