getsentry / getsentry/sentry-dotnet

Resolve signature ambiguity in `MetricsEmitter`

Open
#5,347 3 comments 0 reactions 0 assignees View on GitHub
.NET Improvement Metrics public API
Dominant language
C#
Stars
770
Forks
248
Avg merge
3d 4h
Merged PRs (30d)
49

Description

Coming from Unity and C# 9 I observed an
```
Ambiguous invocation.
Candidates are:
    EmitCounter(string, int, IEnumerable>?, Scope?)
    EmitCounter(string, int, ReadOnlySpan>, Scope?)
    all from class SentryMetricEmitter
```

Based on [The History of C#](https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history) this problem exists for projects using C# 13 (resolution priority) or older.

Contributor guide

Open the contributing guide

Research direction

Start at the SentryMetricEmitter class and inspect the two EmitCounter overloads shown in the report, focusing on calls from projects using C# versions before 13. The work is done when those callers no longer receive an ambiguous-invocation diagnostic while the existing metric-emission behavior remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.