fix(explore): use tracemetrics dataset instead of metricsEnhanced#995
Merged
Conversation
The `--dataset metrics` flag and `--metric` auto-resolver were sending `dataset=metricsEnhanced` to the Sentry Events API, which routes to the legacy metrics_enhanced_performance backend. SDK v10 trace metrics (`Sentry.metrics.count()` etc.) are stored in the `tracemetrics` dataset (backed by the TraceMetrics query engine), which is what the Sentry Explore Metrics UI uses. Switch all metrics-related API calls from `metricsEnhanced` to `tracemetrics` so `sentry explore --metric <name>` can resolve SDK v10 trace metrics. Fixes #994
Contributor
|
Contributor
Codecov Results 📊✅ 7075 passed | Total: 7075 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ❌ Patch coverage is 71.43%. Project has 14776 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 76.55% 76.61% +0.06%
==========================================
Files 324 324 —
Lines 63217 63171 -46
Branches 0 0 —
==========================================
+ Hits 48395 48395 —
- Misses 14822 14776 -46
- Partials 0 0 —Generated by Codecov Action |
Member
Author
|
all 26 CI checks green, self-review looks clean — marked ready for review. |
Member
Author
|
skipping auto-merge: 7 files changed exceeds the 5-file threshold for auto-merge, leaving for human review. |
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.
--dataset metricsand--metricauto-resolver were sendingdataset=metricsEnhancedto the Events API, which routes to the legacymetrics_enhanced_performancebackend. SDK v10 trace metrics live in thetracemetricsdataset (backed byTraceMetrics), which is what the Sentry Explore Metrics UI uses. Switched all metrics-related API calls totracemetrics.Testing
bun test test/commands/explore.test.ts— 37/38 pass (1 pre-existing failure from missingapi-schema.json).bun test test/types/dashboard.test.ts— 96/96 pass.bun test test/commands/dashboard/resolve.test.ts— 76/76 pass.bun test test/lib/metrics-transform.test.ts— 10/10 pass.Fixes #994