Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(metrics): Track code locations for metrics #60514

Merged
merged 8 commits into from
Nov 27, 2023

Conversation

jan-auer
Copy link
Member

@jan-auer jan-auer commented Nov 23, 2023

Adds support for code locations in DDM metrics and updates all patched methods. The feature can be controlled at runtime through delightful_metrics.enable_code_locations via options-automator, and defaults to OFF.

All metric capture methods of the various backends increment the internal stack level so that the caller's location is captured by the SDK. Additionally, the newly added stacklevel argument can be used to track callers further up the stack.

Requires: getsentry/sentry-python#2526
Epic: #60260

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 23, 2023
Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Merging #60514 (52750e4) into master (0795b8d) will increase coverage by 0.00%.
Report is 2 commits behind head on master.
The diff coverage is 91.66%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #60514   +/-   ##
=======================================
  Coverage   80.85%   80.85%           
=======================================
  Files        5185     5185           
  Lines      227935   227933    -2     
  Branches    38350    38350           
=======================================
- Hits       184302   184301    -1     
+ Misses      38006    38004    -2     
- Partials     5627     5628    +1     
Files Coverage Δ
src/sentry/metrics/composite_experimental.py 72.09% <100.00%> (ø)
src/sentry/options/defaults.py 100.00% <100.00%> (ø)
src/sentry/utils/sdk.py 67.66% <ø> (-0.34%) ⬇️
...tic/app/views/alerts/rules/metric/details/body.tsx 62.50% <ø> (ø)
.../views/alerts/rules/metric/details/metricChart.tsx 55.88% <ø> (ø)
.../alerts/rules/metric/details/metricChartOption.tsx 36.17% <ø> (-0.68%) ⬇️
...pp/views/alerts/rules/metric/metricRulePresets.tsx 60.00% <ø> (ø)
static/app/views/alerts/rules/metric/ruleForm.tsx 71.24% <ø> (-0.13%) ⬇️
...views/alerts/rules/metric/triggers/chart/index.tsx 80.70% <ø> (ø)
static/app/views/dashboards/datasetConfig/base.tsx 94.11% <ø> (ø)
... and 11 more

... and 4 files with indirect coverage changes

@jan-auer jan-auer merged commit 346a106 into master Nov 27, 2023
54 checks passed
@jan-auer jan-auer deleted the feat/minimetrics-code-locations branch November 27, 2023 08:10
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants