Skip to content

Commit

Permalink
Add support for decimal instruments
Browse files Browse the repository at this point in the history
  • Loading branch information
joegoldman2 committed May 15, 2024
1 parent 1bbafaa commit 0c55914
Show file tree
Hide file tree
Showing 15 changed files with 583 additions and 25 deletions.
6 changes: 6 additions & 0 deletions src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / validate-packages / run-package-validation-stable

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / validate-packages / run-package-validation-stable

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / validate-packages / run-package-validation-stable

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / validate-packages / run-package-validation-stable

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / validate-packages / run-package-validation-stable

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (ubuntu-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net7.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net6.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net8.0)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net462)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net462)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net462)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net462)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net462)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net462)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net462)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net462)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net462)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 1 in src/OpenTelemetry/.publicApi/Stable/PublicAPI.Unshipped.txt

View workflow job for this annotation

GitHub Actions / build-test-solution-stable / build-test (windows-latest, net462)

Symbol 'abstract OpenTelemetry.Metrics.ExemplarReservoir.Offer(in OpenTelemetry.Metrics.ExemplarMeasurement<decimal> measurement) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
OpenTelemetry.Metrics.Exemplar
OpenTelemetry.Metrics.Exemplar.DoubleValue.get -> double
OpenTelemetry.Metrics.Exemplar.Exemplar() -> void
Expand All @@ -10,7 +11,12 @@ OpenTelemetry.Metrics.ExemplarFilterType
OpenTelemetry.Metrics.ExemplarFilterType.AlwaysOff = 0 -> OpenTelemetry.Metrics.ExemplarFilterType
OpenTelemetry.Metrics.ExemplarFilterType.AlwaysOn = 1 -> OpenTelemetry.Metrics.ExemplarFilterType
OpenTelemetry.Metrics.ExemplarFilterType.TraceBased = 2 -> OpenTelemetry.Metrics.ExemplarFilterType
OpenTelemetry.Metrics.MetricPoint.GetGaugeLastValueDecimal() -> decimal
OpenTelemetry.Metrics.MetricPoint.GetSumDecimal() -> decimal
OpenTelemetry.Metrics.MetricPoint.TryGetExemplars(out OpenTelemetry.Metrics.ReadOnlyExemplarCollection exemplars) -> bool
OpenTelemetry.Metrics.MetricType.DecimalGauge = 46 -> OpenTelemetry.Metrics.MetricType
OpenTelemetry.Metrics.MetricType.DecimalSum = 30 -> OpenTelemetry.Metrics.MetricType
OpenTelemetry.Metrics.MetricType.DecimalSumNonMonotonic = 142 -> OpenTelemetry.Metrics.MetricType
OpenTelemetry.Metrics.ReadOnlyExemplarCollection
OpenTelemetry.Metrics.ReadOnlyExemplarCollection.Enumerator
OpenTelemetry.Metrics.ReadOnlyExemplarCollection.Enumerator.Current.get -> OpenTelemetry.Metrics.Exemplar
Expand Down
15 changes: 15 additions & 0 deletions src/OpenTelemetry/Metrics/AggregationType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,19 @@ internal enum AggregationType
/// Exponential Histogram with sum, count, min, max.
/// </summary>
Base2ExponentialHistogramWithMinMax = 11,

/// <summary>
/// Calculate SUM from incoming delta measurements.
/// </summary>
DecimalSumIncomingDelta = 12,

/// <summary>
/// Calculate SUM from incoming cumulative measurements.
/// </summary>
DecimalSumIncomingCumulative = 13,

/// <summary>
/// Keep LastValue.
/// </summary>
DecimalGauge = 14,
}
73 changes: 73 additions & 0 deletions src/OpenTelemetry/Metrics/AggregatorStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ internal sealed class AggregatorStore
private readonly int exponentialHistogramMaxScale;
private readonly UpdateLongDelegate updateLongCallback;
private readonly UpdateDoubleDelegate updateDoubleCallback;
private readonly UpdateDecimalDelegate updateDecimalCallback;
private readonly ExemplarFilterType exemplarFilter;
private readonly Func<KeyValuePair<string, object?>[], int, int> lookupAggregatorStore;

Expand Down Expand Up @@ -91,11 +92,13 @@ internal AggregatorStore(
{
this.updateLongCallback = this.UpdateLong;
this.updateDoubleCallback = this.UpdateDouble;
this.updateDecimalCallback = this.UpdateDecimal;
}
else
{
this.updateLongCallback = this.UpdateLongCustomTags;
this.updateDoubleCallback = this.UpdateDoubleCustomTags;
this.updateDecimalCallback = this.UpdateDecimalCustomTags;
#if NET8_0_OR_GREATER
var hs = FrozenSet.ToFrozenSet(metricStreamIdentity.TagKeys, StringComparer.Ordinal);
#else
Expand Down Expand Up @@ -150,6 +153,8 @@ internal AggregatorStore(

private delegate void UpdateDoubleDelegate(double value, ReadOnlySpan<KeyValuePair<string, object?>> tags);

private delegate void UpdateDecimalDelegate(decimal value, ReadOnlySpan<KeyValuePair<string, object?>> tags);

internal DateTimeOffset StartTimeExclusive { get; private set; }

internal DateTimeOffset EndTimeInclusive { get; private set; }
Expand Down Expand Up @@ -189,6 +194,19 @@ internal void Update(double value, ReadOnlySpan<KeyValuePair<string, object?>> t
}
}

internal void Update(decimal value, ReadOnlySpan<KeyValuePair<string, object?>> tags)
{
try
{
this.updateDecimalCallback(value, tags);
}
catch (Exception)
{
Interlocked.Increment(ref this.DroppedMeasurements);
OpenTelemetrySdkEventSource.Log.MeasurementDropped(this.name, "SDK internal error occurred.", "Contact SDK owners.");
}
}

internal int Snapshot()
{
this.batchSize = 0;
Expand Down Expand Up @@ -1043,6 +1061,20 @@ private void UpdateDoubleCustomTags(double value, ReadOnlySpan<KeyValuePair<stri
this.UpdateDoubleMetricPoint(index, value, tags);
}

private void UpdateDecimal(decimal value, ReadOnlySpan<KeyValuePair<string, object?>> tags)
{
var index = this.FindMetricAggregatorsDefault(tags);

this.UpdateDecimalMetricPoint(index, value, tags);
}

private void UpdateDecimalCustomTags(decimal value, ReadOnlySpan<KeyValuePair<string, object?>> tags)
{
var index = this.FindMetricAggregatorsCustomTag(tags);

this.UpdateDecimalMetricPoint(index, value, tags);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
private void UpdateDoubleMetricPoint(int metricPointIndex, double value, ReadOnlySpan<KeyValuePair<string, object?>> tags)
{
Expand Down Expand Up @@ -1084,6 +1116,47 @@ private void UpdateDoubleMetricPoint(int metricPointIndex, double value, ReadOnl
}
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
private void UpdateDecimalMetricPoint(int metricPointIndex, decimal value, ReadOnlySpan<KeyValuePair<string, object?>> tags)
{
if (metricPointIndex < 0)
{
Interlocked.Increment(ref this.DroppedMeasurements);

if (this.EmitOverflowAttribute)
{
this.InitializeOverflowTagPointIfNotInitialized();
this.metricPoints[1].Update(value);
}
else if (Interlocked.CompareExchange(ref this.metricCapHitMessageLogged, 1, 0) == 0)
{
OpenTelemetrySdkEventSource.Log.MeasurementDropped(this.name, this.metricPointCapHitMessage, MetricPointCapHitFixMessage);
}

return;
}

var exemplarFilterType = this.exemplarFilter;
if (exemplarFilterType == ExemplarFilterType.AlwaysOff)
{
this.metricPoints[metricPointIndex].Update(value);
}
else if (exemplarFilterType == ExemplarFilterType.AlwaysOn)
{
this.metricPoints[metricPointIndex].UpdateWithExemplar(
value,
tags,
offerExemplar: true);
}
else
{
this.metricPoints[metricPointIndex].UpdateWithExemplar(
value,
tags,
offerExemplar: Activity.Current?.Recorded ?? false);
}
}

private int FindMetricAggregatorsDefault(ReadOnlySpan<KeyValuePair<string, object?>> tags)
{
int tagLength = tags.Length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,13 @@ public override void Offer(in ExemplarMeasurement<double> measurement)

this.UpdateExemplar(measurement.ExplicitBucketHistogramBucketIndex, in measurement);
}

public override void Offer(in ExemplarMeasurement<decimal> measurement)
{
Debug.Assert(
measurement.ExplicitBucketHistogramBucketIndex != -1,
"ExplicitBucketHistogramBucketIndex was -1");

this.UpdateExemplar(measurement.ExplicitBucketHistogramBucketIndex, in measurement);
}
}
6 changes: 6 additions & 0 deletions src/OpenTelemetry/Metrics/Exemplar/ExemplarReservoir.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ internal ExemplarReservoir()
/// <param name="measurement"><see cref="ExemplarMeasurement{T}"/>.</param>
public abstract void Offer(in ExemplarMeasurement<double> measurement);

/// <summary>
/// Offers a measurement to the reservoir.
/// </summary>
/// <param name="measurement"><see cref="ExemplarMeasurement{T}"/>.</param>
public abstract void Offer(in ExemplarMeasurement<decimal> measurement);

/// <summary>
/// Collects all the exemplars accumulated by the Reservoir.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ public override void Offer(in ExemplarMeasurement<double> measurement)
this.Offer(in measurement);
}

public override void Offer(in ExemplarMeasurement<decimal> measurement)
{
this.Offer(in measurement);
}

protected override void OnCollected()
{
// Reset internal state irrespective of temporality.
Expand Down
14 changes: 14 additions & 0 deletions src/OpenTelemetry/Metrics/MeterProviderSdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ internal MeterProviderSdk(
this.listener.SetMeasurementEventCallback<short>(static (instrument, value, tags, state) => MeasurementRecordedLong(instrument, value, tags, state));
this.listener.SetMeasurementEventCallback<byte>(static (instrument, value, tags, state) => MeasurementRecordedLong(instrument, value, tags, state));

// decimal
this.listener.SetMeasurementEventCallback<decimal>(MeasurementRecordedDecimal);

this.listener.MeasurementsCompleted = MeasurementsCompleted;

this.listener.Start();
Expand Down Expand Up @@ -228,6 +231,17 @@ internal static void MeasurementRecordedDouble(Instrument instrument, double val
metricState.RecordMeasurementDouble(value, tags);
}

internal static void MeasurementRecordedDecimal(Instrument instrument, decimal value, ReadOnlySpan<KeyValuePair<string, object?>> tags, object? state)
{
if (state is not MetricState metricState)
{
OpenTelemetrySdkEventSource.Log.MeasurementDropped(instrument?.Name ?? "UnknownInstrument", "SDK internal error occurred.", "Contact SDK owners.");
return;
}

metricState.RecordMeasurementDecimal(value, tags);
}

internal object? InstrumentPublished(Instrument instrument, bool listeningIsManagedExternally)
{
var listenToInstrumentUsingSdkConfiguration = this.shouldListenTo(instrument);
Expand Down
31 changes: 30 additions & 1 deletion src/OpenTelemetry/Metrics/Metric.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@ internal Metric(
aggType = AggregationType.DoubleSumIncomingCumulative;
this.MetricType = MetricType.DoubleSum;
}
else if (instrumentIdentity.InstrumentType == typeof(Counter<decimal>))
{
aggType = AggregationType.DecimalSumIncomingDelta;
this.MetricType = MetricType.DecimalSum;
}
else if (instrumentIdentity.InstrumentType == typeof(ObservableCounter<decimal>))
{
aggType = AggregationType.DecimalSumIncomingCumulative;
this.MetricType = MetricType.DecimalSum;
}
else if (instrumentIdentity.InstrumentType == typeof(ObservableUpDownCounter<long>)
|| instrumentIdentity.InstrumentType == typeof(ObservableUpDownCounter<int>)
|| instrumentIdentity.InstrumentType == typeof(ObservableUpDownCounter<short>)
Expand Down Expand Up @@ -111,6 +121,16 @@ internal Metric(
aggType = AggregationType.DoubleSumIncomingCumulative;
this.MetricType = MetricType.DoubleSumNonMonotonic;
}
else if (instrumentIdentity.InstrumentType == typeof(UpDownCounter<decimal>))
{
aggType = AggregationType.DecimalSumIncomingDelta;
this.MetricType = MetricType.DecimalSumNonMonotonic;
}
else if (instrumentIdentity.InstrumentType == typeof(ObservableUpDownCounter<decimal>))
{
aggType = AggregationType.DecimalSumIncomingCumulative;
this.MetricType = MetricType.DecimalSumNonMonotonic;
}
else if (instrumentIdentity.InstrumentType == typeof(ObservableGauge<double>)
|| instrumentIdentity.InstrumentType == typeof(ObservableGauge<float>))
{
Expand All @@ -125,12 +145,18 @@ internal Metric(
aggType = AggregationType.LongGauge;
this.MetricType = MetricType.LongGauge;
}
else if (instrumentIdentity.InstrumentType == typeof(ObservableGauge<decimal>))
{
aggType = AggregationType.DecimalGauge;
this.MetricType = MetricType.DecimalGauge;
}
else if (instrumentIdentity.InstrumentType == typeof(Histogram<long>)
|| instrumentIdentity.InstrumentType == typeof(Histogram<int>)
|| instrumentIdentity.InstrumentType == typeof(Histogram<short>)
|| instrumentIdentity.InstrumentType == typeof(Histogram<byte>)
|| instrumentIdentity.InstrumentType == typeof(Histogram<float>)
|| instrumentIdentity.InstrumentType == typeof(Histogram<double>))
|| instrumentIdentity.InstrumentType == typeof(Histogram<double>)
|| instrumentIdentity.InstrumentType == typeof(Histogram<decimal>))
{
var explicitBucketBounds = instrumentIdentity.HistogramBucketBounds;
var exponentialMaxSize = instrumentIdentity.ExponentialHistogramMaxSize;
Expand Down Expand Up @@ -228,6 +254,9 @@ internal void UpdateLong(long value, ReadOnlySpan<KeyValuePair<string, object?>>
internal void UpdateDouble(double value, ReadOnlySpan<KeyValuePair<string, object?>> tags)
=> this.AggregatorStore.Update(value, tags);

internal void UpdateDecimal(decimal value, ReadOnlySpan<KeyValuePair<string, object?>> tags)
=> this.AggregatorStore.Update(value, tags);

internal int Snapshot()
=> this.AggregatorStore.Snapshot();
}
Loading

0 comments on commit 0c55914

Please sign in to comment.