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): Move minimetrics code to the SDK #2385

Merged
merged 36 commits into from
Sep 21, 2023
Merged

Conversation

mitsuhiko
Copy link
Member

@mitsuhiko mitsuhiko commented Sep 20, 2023

This moves the minimetrics code from sentry to the SDK.

Todo:

  • move and adapt tests
  • support unicode values for tag values
  • implement gauges as gauges
  • add interface to emit internal metrics for deployment

Changes compared to original minimetrics:

  • client is gone
  • transport and encoder were replaced by a simple function
  • types were changed to better align with the sdk style
  • timing is implemented as a context manager, what was timing is now distribution
  • release, environment and transaction are attached

Fixes getsentry/sentry#55645

sentry_sdk/_types.py Show resolved Hide resolved
sentry_sdk/metrics.py Show resolved Hide resolved
sentry_sdk/metrics.py Show resolved Hide resolved
sentry_sdk/metrics.py Outdated Show resolved Hide resolved
Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

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

because Jan said lgtm

@mitsuhiko mitsuhiko merged commit 0dd7d5f into master Sep 21, 2023
257 checks passed
@mitsuhiko mitsuhiko deleted the feature/minimetrics branch September 21, 2023 12:40
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.

Send release and environment alongside custom metrics
3 participants