Skip to content

Commit

Permalink
Fixed issue sanitizing values in metrics (#3065)
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsandfoxes authored Jan 24, 2024
1 parent cabcf44 commit c50cb36
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ If you have conflicts, you can opt-out by adding the following to your `csproj`:

### Fixes

- Fixed an issue with tag values in metrics not being properly serialized ([#3065](https://github.com/getsentry/sentry-dotnet/pull/3065))
- Moved the binding to MAUI events for breadcrumb creation from `WillFinishLaunching` to `FinishedLaunching`. This delays the initial instantiation of `app`. ([#3057](https://github.com/getsentry/sentry-dotnet/pull/3057))
- The SDK no longer adds the `WinUIUnhandledExceptionIntegration` on non Windows platforms ([#3055](https://github.com/getsentry/sentry-dotnet/pull/3055))
- The scope transaction is now correctly set for Otel transactions ([#3072](https://github.com/getsentry/sentry-dotnet/pull/3072))
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/Protocol/Metrics/Metric.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public async Task SerializeAsync(Stream stream, IDiagnosticLogger? logger, Cance
{
await Write(",");
}
await Write($"{key}:SanitizeValue(value)");
await Write($"{key}:{MetricHelper.SanitizeValue(value)}");
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
my.counter@counters:5|c|#tag1:SanitizeValue(value),tag2:SanitizeValue(value)|T1577836800
my.counter@counters:5|c|#tag1:value1,tag2:value2|T1577836800
Original file line number Diff line number Diff line change
@@ -1 +1 @@
my.distribution@distributions:5:7:13|d|#tag1:SanitizeValue(value),tag2:SanitizeValue(value)|T1577836800
my.distribution@distributions:5:7:13|d|#tag1:value1,tag2:value2|T1577836800
Original file line number Diff line number Diff line change
@@ -1 +1 @@
my.gauge@gauges:7:5:7:12:2|g|#tag1:SanitizeValue(value),tag2:SanitizeValue(value)|T1577836800
my.gauge@gauges:7:5:7:12:2|g|#tag1:value1,tag2:value2|T1577836800
Original file line number Diff line number Diff line change
@@ -1 +1 @@
my.set@sets:5:7|s|#tag1:SanitizeValue(value),tag2:SanitizeValue(value)|T1577836800
my.set@sets:5:7|s|#tag1:value1,tag2:value2|T1577836800

0 comments on commit c50cb36

Please sign in to comment.