Class BowireTelemetryServiceCollectionExtensions
- Namespace
- Kuestenlogik.Bowire.Telemetry
- Assembly
- Kuestenlogik.Bowire.Telemetry.dll
DI helpers for Bowire's self-telemetry seam (#29). Idempotent -- re-calling AddBowireTelemetry(IServiceCollection, IConfiguration, Action<BowireTelemetryOptions>?) is a no-op rather than registering a duplicate. Embedded hosts that already wire OTel themselves can skip these helpers entirely and just add Bowire's Source / Meter to their existing pipeline:
builder.Services.AddOpenTelemetry()
.WithMetrics(m => m.AddMeter(BowireTelemetry.MeterName))
.WithTracing(t => t.AddSource(BowireTelemetry.ActivityName));
public static class BowireTelemetryServiceCollectionExtensions
- Inheritance
-
BowireTelemetryServiceCollectionExtensions
- Inherited Members
Methods
AddBowireTelemetry(IServiceCollection, IConfiguration, Action<BowireTelemetryOptions>?)
Bind BowireTelemetryOptions from
configuration (section Bowire:Telemetry)
and wire the OTel SDK against
MeterName +
ActivityName when
Enabled resolves to
true. The OTLP exporter reads OTEL_EXPORTER_OTLP_*
from the environment -- Bowire doesn't paper over OTel's own
configuration vocabulary.
public static IServiceCollection AddBowireTelemetry(this IServiceCollection services, IConfiguration configuration, Action<BowireTelemetryOptions>? configure = null)
Parameters
servicesIServiceCollectionconfigurationIConfigurationconfigureAction<BowireTelemetryOptions>