sentry
sentry copied to clipboard
snuba(devexp): Migrate meta queries to use storage direct queries
Overview
Now that snuba supports querying a storage directly (as opposed to querying an entity), meta queries are a great candidate to take advantage of this. All meta queries are executed through the metrics layer, therefore these changes will apply to any product (right now just DDM) running meta queries. The main change is switching out Entity
for Storage
in the match
clause of the query.
Testing
This change is guarded behind the sentry option: sentry-metrics.metrics-layer.use-storage-direct-meta-queries
and will be slowly rolled out + monitored.
Codecov Report
Attention: Patch coverage is 77.77778%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 80.00%. Comparing base (
03b9119
) to head (af6ee1e
). Report is 1 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #70794 +/- ##
===========================================
- Coverage 88.30% 80.00% -8.30%
===========================================
Files 2861 6507 +3646
Lines 178774 290843 +112069
Branches 31900 50129 +18229
===========================================
+ Hits 157862 232698 +74836
- Misses 20910 57713 +36803
- Partials 2 432 +430
Files | Coverage Δ | |
---|---|---|
src/sentry/options/defaults.py | 100.00% <100.00%> (ø) |
|
src/sentry/snuba/metrics_layer/query.py | 93.86% <75.00%> (-0.53%) |
:arrow_down: |