20 lines
425 B
Markdown
20 lines
425 B
Markdown
# OpenTelemetry Setup
|
|
|
|
Configure OpenTelemetry for metrics collection.
|
|
|
|
## Configuration
|
|
|
|
```csharp
|
|
builder.Services.AddOpenTelemetry()
|
|
.WithMetrics(metrics => metrics
|
|
.AddMeter("Svrnty.CQRS.Events")
|
|
.AddAspNetCoreInstrumentation()
|
|
.AddHttpClientInstrumentation()
|
|
.AddPrometheusExporter());
|
|
```
|
|
|
|
## See Also
|
|
|
|
- [Metrics Overview](README.md)
|
|
- [Prometheus & Grafana](prometheus-grafana.md)
|