Metrics (Trace Connected) For Python #5042
AbhiPrasad
started this conversation in
Features / New Integrations / Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Sentry is introducing metrics that let you send counters, gauges, and distributions from your code to track things like
email.sent,checkout.failed, orqueue.depth— and pivot directly into the related traces, logs, and errors when something looks off.TraceConnectedMetrics.mp4
Note
To get early access to the Sentry metrics product and to see how it works, see the announcement post.
To use the new Metric APIs to send metrics directly to Sentry, you'll have to upgrade to 2.43.0 of the Python SDK or higher.
Metrics are gated by an experimental option,
_experiments.enable_metrics(will not be required in future versions of the SDK).Then you can import and use methods from the metric namespace to send logs to Sentry.
Once the feature is enabled on the SDK and the SDK is initialized, you can send metrics using the
sentry_sdk.metricsAPIs.The
metricsnamespace exposes three methods that you can use to capture different types of metric information:count,gauge, anddistribution.You can also pass additional attributes directly to
count,gauge, anddistributionvia theattributeskwarg.Beta Was this translation helpful? Give feedback.
All reactions