You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sstv.DomainExceptions.Extensions.DependencyInjection/CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
14
15
15
## [Unreleased]
16
16
17
+
## [2.3.0] - 2024-12-06
18
+
19
+
### Changed
20
+
21
+
- error_codes_total metric now have level label from error code
22
+
23
+
BREAKING CHANGES:
24
+
- ErrorCodesMeter now accept ErrorDescription and instance of error, instead of DomainException. This helps to use not only exceptions, but also Result pattern.
"Description": "This is an obsolete error code from appsettings.json",
98
-
"IsObsolete": true
99
+
"Description": "This is high criticality level error code from appsettings.json",
100
+
"Level": "High"
99
101
}
100
102
}
101
103
}
@@ -113,7 +115,7 @@ Sstv.DomainException expose public class `ErrorCodesMeter` with method `Measure`
113
115
which called every time, when DomainException instantiated, and counts errors occured with OpenTelemetry counter metric:
114
116
115
117
```
116
-
error_codes_total { code="SSTV.10004", message="You have not enough money" }
118
+
error_codes_total { code="SSTV.10004", message="You have not enough money", level="Low" }
117
119
```
118
120
119
121
This library have an extension method `AddDomainExceptionInstrumentation`, that can be called on `MeterProviderBuilder` to start collecting this metric.
Copy file name to clipboardExpand all lines: Sstv.DomainExceptions.Extensions.DependencyInjection/Sstv.DomainExceptions.Extensions.DependencyInjection.csproj
0 commit comments