Skip to content

Remove minimetrics #93595

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

Merged
merged 14 commits into from
Jun 17, 2025
Merged

Remove minimetrics #93595

merged 14 commits into from
Jun 17, 2025

Conversation

antonpirker
Copy link
Member

Those are obsolete now because the metrics product was never launched.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 16, 2025
@antonpirker antonpirker changed the title Remove minimetrics tests Remove minimetric Jun 16, 2025
@antonpirker antonpirker changed the title Remove minimetric Remove minimetrics Jun 16, 2025
Copy link

codecov bot commented Jun 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #93595       +/-   ##
===========================================
+ Coverage   46.08%   88.03%   +41.94%     
===========================================
  Files       10309    10323       +14     
  Lines      595061   595442      +381     
  Branches    23137    23110       -27     
===========================================
+ Hits       274240   524183   +249943     
+ Misses     320328    70766   -249562     
  Partials      493      493               

@antonpirker antonpirker marked this pull request as ready for review June 16, 2025 14:15
@antonpirker antonpirker merged commit 0b72ce7 into master Jun 17, 2025
64 checks passed
@antonpirker antonpirker deleted the antonpirker/remove-minimetrics-tests branch June 17, 2025 14:54
@antonpirker antonpirker added the Trigger: Revert Add to a merged PR to revert it (skips CI) label Jun 17, 2025
@getsentry-bot
Copy link
Contributor

PR reverted: b1ead0f

getsentry-bot added a commit that referenced this pull request Jun 17, 2025
This reverts commit 0b72ce7.

Co-authored-by: antonpirker <[email protected]>
@antonpirker
Copy link
Member Author

Its used in getsentry:

$ rg CompositeExperimentalMetricsBackend
getsentry/conf/settings/prod.py
366:SENTRY_METRICS_BACKEND = "sentry.metrics.composite_experimental.CompositeExperimentalMetricsBackend"

getsentry/conf/settings/controlsilo.py
781:SENTRY_METRICS_BACKEND = "sentry.metrics.composite_experimental.CompositeExperimentalMetricsBackend"

getsentry/conf/settings/regionsilo.py
1139:SENTRY_METRICS_BACKEND = "sentry.metrics.composite_experimental.CompositeExperimentalMetricsBackend"

We need to find what was used before and then move back to this.

@antonpirker
Copy link
Member Author

Its probably this:

SENTRY_METRICS_BACKEND = "sentry.metrics.dogstatsd.DogStatsdMetricsBackend"

billyvg pushed a commit that referenced this pull request Jun 18, 2025
Those are obsolete now because the metrics product was never launched.
billyvg pushed a commit that referenced this pull request Jun 18, 2025
This reverts commit 0b72ce7.

Co-authored-by: antonpirker <[email protected]>
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
Those are obsolete now because the metrics product was never launched.
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
This reverts commit 0b72ce7.

Co-authored-by: antonpirker <[email protected]>
@antonpirker antonpirker mentioned this pull request Jun 25, 2025
antonpirker added a commit that referenced this pull request Jun 25, 2025
The Sentry metrics product never landed so we can remove this from the
code base.

This is the second attempt after this:
#93595

Now the other references to `CompositeExperimentalMetricsBackend` in
`ops` and `getsentry` repo have been removed, this can be merged.

Also did an org wide code search on Github and the only references are
from archived repos and one very old demo project:
https://github.com/search?q=org%3Agetsentry%20CompositeExperimentalMetricsBackend&type=code
sl0thentr0py added a commit that referenced this pull request Jul 2, 2025
Update the codebase so it works with `Sentry Python SDK 3.0.0 alpha`.

Sentry SDK 3.0.0 has some backwards incompatibilities and uses
Opentelementry under the hood to create spans.

### What this PR does:
- replace `sentry_sdk.start_transaction()` with
`sentry_sdk.start_span()`
- replace `span.set_data()` with `span.set_attribute()`
- replace `scope.transaction` with `scope.root_span`
- replace `Span.containing_transaction` with `Span.root_span`
- replace `custom_sampling_context` with `attributes` parameter
- replace `sentry_sdk.scope.get_*_scope()` with
`sentry_sdk.get_*_scope()`
- replace one `scope.add_attachment()` with
`sentry_sdk.add_attachment()`
- change one `continue_trace()` to the new context manager.
- update `traces_sampler` to use new `sampling_context` format
- added a few tests

See also the migration guide:
https://docs.sentry.io/platforms/python/migration/2.x-to-3.x

---


### Related, but split out into separate PRs:
- make sure `traces_sampler` works the same as before (check for
`sample_rate`): #93011
- make **all** `get_isolation_scope` calls use the top-level API.
Currently, some calls where we `from sentry_sdk import Scope` then call
`Scope.get_isolation_scope` still need to be converted to the top-level
API: #93307
- check `event["measurements"]` places if those can be removed (because
SDK does not support measurements anymore):
#92718
- change set_span_data() to set_span_attribute() but check for value NOT
be a dict: #92946
- replace `with sentry_sdk.init(dsn=...)` with `with
sentry_sdk.new_scope() as scope:
scope.set_client(sentry_sdk.Client(dsn=...))` in
`src/sentry/runner/main.py`: #92944
- remove `propagate_hub=True` from `ThreadingIntegration`: #93016
- remove minimetrics from the sentry codebase, because the metrics
product was never released: #93595
- getsentry/getsentry#17553
- getsentry/devenv#194
- getsentry/devservices#277
- getsentry/pytest-sentry#39
- getsentry/sentry-docs#13939

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
Co-authored-by: Daniel Szoke <[email protected]>
Co-authored-by: Daniel Szoke <[email protected]>
Co-authored-by: Ivana Kellyer <[email protected]>
Co-authored-by: Neel Shah <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Jul 3, 2025
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 Trigger: Revert Add to a merged PR to revert it (skips CI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants