Skip to content

Support built in System.Diagnostics.Meters for instrumenting metrics #5196

@kcrandall

Description

@kcrandall

Problem Statement

I think it would make more sense in the dotnet world to suggest to users to add meters to their app for metric use cases instead of using sentry sdk for collection that would allow for instrumentation via one path instead of having to duplicate SentrySDK capture for meters. This is more of the dotnet way to do things regarding metrics. Add something like this.AddMeter(nameof(ResponseMetrics)) or .AddMeter("System.Runtime") to the sentry sdk setup so users can opt in to meters that should be tracked by sentry.

Another alternative path would be to collect metrics via OpenTelemetry bridge like traces are done which already has support for this.

Solution Brainstorm

.AddMeter(nameof(ResponseMetrics)) on Sentry.Init() would be the best way to do this

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .net codeFeatureNew feature or requestMetricsQuestionFurther information is requested
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions