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
* Add metrics for lock operations using System.Diagnostics.Metrics
* add View documentation to the readme for filtering out unwanted metrics
* fix issues found by copilot review
* remove source generated metrics class, and instead implement a metrics interface
* remove unused reference
* add second constructors to DynamoDbDistributedLock and ExponentialBackoffRetryPolicy that don't take the lock interface to preserve backwards compatibility
* Update src/DynamoDb.DistributedLock/Retry/ExponentialBackoffRetryPolicy.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update test/DynamoDb.DistributedLock.Tests/Metrics/TestMetricAggregator.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Nick Cipollina <ncipollina@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -225,6 +225,35 @@ However, the partition and sort key attribute names are fully configurable via `
225
225
226
226
---
227
227
228
+
## 📈 Telemetry
229
+
230
+
This library uses [System.Diagnostics.Metrics](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/metrics)`Meter`s to collect metrics. These metrics can be opted in to be exported to your preferred telemetry system (e.g., OpenTelemetry, console output) using standard dotnet telemetry exporters.
231
+
232
+
A full list of metric names can be found in the [MetricNames](src/DynamoDb.DistributedLock/Metrics/MetricNames.cs) class.
233
+
234
+
By default no metrics are exported to your collector, but you can enable them by configuring the `Meter` in your application:
Other options for collection of metrics are available, including local development options such as [dotnet-counters](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-counters) or the [.Net Aspire standalone dashboard](https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/dashboard/standalone)
254
+
255
+
---
256
+
228
257
## 🧪 Unit Testing
229
258
230
259
Unit tests are written with:
@@ -241,7 +270,6 @@ The library provides `DynamoDbDistributedLockAutoData` to support streamlined te
0 commit comments