You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eventaully we might be able to build a bridge between Sentry's metrics and OpenTelemetry Metrics, if people wanted to use OpenTelemetry for instrumentation (similar to what we've done for Tracing)
Sentry DDM allows associating code locations with metrics. This could be achieved by convention using an OpenTelemetry Attribute with a specific name. Note that attributes are provided on metric values, not on the metrics overall e.g. Counter.add in the Metrics API.
Timers
The OpenTelemetry docs don't mention anything like the Timers described in Sentry's DDMs... Although the timers themselves are just a mechanism to collect a fairly specific metric (the amount of time taken to execute a particular piece of code). So these could be implemented in the Sentry SDK... and the results passed as a regular metric of one of the above types, using milliseconds as the unit and also accompanied by a code location (as an attribute).
Activity
bruno-garcia commentedon Nov 23, 2023
There are actually develop docs on this: https://develop.sentry.dev/delightful-developer-metrics/sending-metrics-sdk/
Please note this is very early stage so not worth adding a ton of tests, we could have this on a branch and ship
alpha's from it for examplebruno-garcia commentedon Nov 28, 2023
see also getsentry/sentry-python#2522
bruno-garcia commentedon Nov 29, 2023
JS: getsentry/sentry-javascript#9691
bruno-garcia commentedon Dec 5, 2023
getsentry/sentry-rust#618
jamescrosswell commentedon Dec 14, 2023
Open Telemetry
Eventaully we might be able to build a bridge between Sentry's metrics and OpenTelemetry Metrics, if people wanted to use OpenTelemetry for instrumentation (similar to what we've done for Tracing)
Metric Types
For the following metric types:
Tags
Tags can be used to attach meta-data to metrics. These could be implemented using OpenTelemetry Attributes.
Additional Context
Sentry DDM allows associating code locations with metrics. This could be achieved by convention using an OpenTelemetry Attribute with a specific name. Note that attributes are provided on metric values, not on the metrics overall e.g. Counter.add in the Metrics API.
Timers
The OpenTelemetry docs don't mention anything like the Timers described in Sentry's DDMs... Although the timers themselves are just a mechanism to collect a fairly specific metric (the amount of time taken to execute a particular piece of code). So these could be implemented in the Sentry SDK... and the results passed as a regular metric of one of the above types, using milliseconds as the unit and also accompanied by a code location (as an attribute).
Sending Metrics to Sentry
A custom exporter can be created to extend OpenTelemetry dotnet.
bruno-garcia commentedon Dec 28, 2023
Useful to send as default metrics: https://learn.microsoft.com/en-us/dotnet/api/system.threading.threadpool.getavailablethreads?view=net-8.0