Skip to content

Conversation

k-fish
Copy link
Member

@k-fish k-fish commented Oct 8, 2025

Summary

Similar to getsentry/sentry-javascript#17883, this allows the py sdk to send in new trace metric protocol items, although this code is experimental since the schema may still change. Most of this code has been copied from logs (eg. log batcher -> metrics batcher) in order to dogfood, once we're more sure of our approach we can refactor.

Closes LOGS-367

Similar to getsentry/sentry-javascript#17883, this allows the py sdk to send in new trace metric protocol items, although this code is experimental since the schema may still change. Most of this code has been copied from logs (eg. log batcher -> metrics batcher) in order to dogfood, once we're more sure of our approach we can refactor.
@k-fish k-fish requested a review from a team as a code owner October 8, 2025 22:16
Copy link

linear bot commented Oct 8, 2025

cursor[bot]

This comment was marked as outdated.

@k-fish k-fish changed the title feat(metrics): Add experimental trace metrics behind an experiments flag feat(metrics): Add trace metrics behind an experiments flag Oct 8, 2025
…ce trace metric is an internal dataset detail
sentrivana added a commit that referenced this pull request Oct 9, 2025
### Description
Remove old metrics code to make way for
#4898

Metrics was always an experimental feature and Sentry stopped accepting
metrics a year ago.

#### Issues
<!--
* resolves: #1234
* resolves: LIN-1234
-->

#### Reminders
- Please add tests to validate your changes, and lint your code using
`tox -e linters`.
- Add GH Issue ID _&_ Linear ID (if applicable)
- PR title should use [conventional
commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type)
style (`feat:`, `fix:`, `ref:`, `meta:`)
- For external contributors:
[CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md),
[Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord
community](https://discord.gg/Ww9hbqr)
Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good overall, some minor things we should fix, see comments. Also happy to take over, lmk if you'd prefer that

One general note: We've removed the old metrics stuff in #4899, so the name "metrics" is up for grabs. Unless we specifically want to call this feature "trace metrics". Whatever we decide, we should pick one and stick with it throughout the PR.

@sentrivana
Copy link
Contributor

@k-fish I'll take care of the changes so that we can cut a release with this soon 🏃🏻

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@sentrivana sentrivana enabled auto-merge (squash) October 9, 2025 13:48
@sentrivana sentrivana merged commit 1f8c008 into master Oct 9, 2025
111 of 112 checks passed
@sentrivana sentrivana deleted the feat/tracemetrics/add-experimental-metrics branch October 9, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants