sentry-dotnet icon indicating copy to clipboard operation
sentry-dotnet copied to clipboard

Sentry Metrics for .NET

Open dingsdax opened this issue 1 month ago • 5 comments

https://develop.sentry.dev/sdk/telemetry/metrics/

Add support for Sentry Metrics to the .NET SDK!

This will enable users to record counters, gauges, and distributions.

  1. Define the Metrics Protocol and trace_metric envelope type in the SDK.
  2. Add the Public API (SDK options and methods) as per the docs.
  3. Make sure the the SDK follow the documented behavior.
  4. Attach default attributes and optional user attributes to the SDK as per docs.
  5. Follow requirements for rate limiting, buffering, batching & flushing and build in measures to prevent excessive memory usage.

For general feedback & questions about Sentry Metrics use this GH discussion; for .NET SDK specific feedback & questions use the comment functionality on this GH issue.

dingsdax avatar Nov 16 '25 07:11 dingsdax

NET-531

linear[bot] avatar Nov 16 '25 07:11 linear[bot]

Do you have a planned release for this yet? This would be really good for us 😄

And, will the .Net version include all the .Net metrics that we see in things like the Aspire Dashboard?

E.g. these:

Image

intrepid-developer avatar Nov 25 '25 07:11 intrepid-developer

Metrics are currently in beta, and we are continuously widening the support for our SDKs.

And our .NET SDK is indeed on the Roadmap: we plan to ship Metrics as an Experimental API soon after we publish v6.0.0 as stable ... depending a bit on the upcoming holiday season. We're starting with an Experimental API since the feature's still in Beta, and also for us to get feedback on the API shape. In particular on the "Attributes"-related parts, as "Attributes" will be quite pervasive in future versions of the SDK.

We also learned from supporting Logs ... so, during the Experimental phase, we will add features more incrementally ... during which we are very much looking forward to your feedback.

We don't have concrete plans for integrations just yet, like .NET Counters, such as System.Runtime, System.Net.*, Microsoft.AspNetCore.*, etc. ... as well as allowing to connect custom Metrics ... but I'll get back to you on that after we released basic support.

Flash0ver avatar Nov 25 '25 10:11 Flash0ver

Sorry @intrepid-developer ... I might have jumped the gun here a bit, considering all the other things we have on our plate ... in particular #4427, as well as rounding things off on Structured Logging ... we want to finish the features we have in store before tacking new ones. We are hoping to have Metrics complete in .NET in Q1/Q2 2026. We'll reach out when we got some Experimental parts of it ready for you to try out and give feedback on.

Flash0ver avatar Nov 26 '25 07:11 Flash0ver

@Flash0ver thanks for the update 👍 Looking forward to getting this early next year 😄

intrepid-developer avatar Nov 26 '25 08:11 intrepid-developer