Eventuous ships dedicated OpenTelemetry instrumentation packages that expose distributed tracing, metrics, and a logging bridge with zero boilerplate. All internal spans and metrics are produced via the standard .NETDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Eventuous/eventuous/llms.txt
Use this file to discover all available pages before exploring further.
ActivitySource and Meter APIs, so they compose seamlessly with the rest of your OpenTelemetry pipeline. Two NuGet packages are involved:
Tracing
AddEventuousTracing() is an extension method on TracerProviderBuilder. It does three things at once:
- Registers the Eventuous
ActivitySource— identified byEventuousDiagnostics.InstrumentationName— so all command handling and event store spans are captured. - Removes the
DummyListener— Eventuous installs a no-op listener on startup so that W3C trace-context headers are propagated even before a real collector is attached. CallingAddEventuousTracing()removes that listener because OpenTelemetry takes over. - Adds a
PollingSampler— suppresses low-level internal client spans (kindClient, name"eventuous") that have no parent trace, preventing subscription polling noise from flooding your backend.
What is traced automatically
| Operation | Span description |
|---|---|
| Command handling | One span per ICommandService<TState>.Handle() call, tagged with command type |
| Event store reads | One span per ReadStream / ReadEvents call |
| Event store writes | One span per AppendToStream call |
| Subscription event processing | One span per event batch, tagged with subscription ID and stream |
Metrics
Two extension methods onMeterProviderBuilder cover different layers of the system.
AddEventuous()
Registers meters for core components:
CommandServiceMetrics— counts commands handled, errors, and records latency histograms per command type.PersistenceMetrics— counts event store reads and writes.
AddEventuousSubscriptions()
Registers SubscriptionMetrics, which exposes:
- Events processed count (tagged by subscription ID and event type).
- Subscription lag (distance behind the end of stream).
- Processing duration histogram.
TagList? customTags parameter to attach static key-value tags (e.g., environment name, deployment region) to every metric data point:
Logging bridge
LoggingEventListener subscribes to Eventuous’ internal EventSource events and forwards them to ILoggerFactory, making internal diagnostics visible in your structured logs alongside application logs.
Instantiate it after building the WebApplication (so the ILoggerFactory is available) and dispose it during teardown:
"OpenTelemetry" as the prefix argument to additionally capture diagnostic events emitted by the OpenTelemetry SDK, whose EventSource names start with that prefix:
Complete telemetry setup
The followingAddTelemetry extension method is taken directly from the Bookings sample and combines all three elements — tracing, metrics, and the Prometheus exporter — in a single place:
Program.cs, the Prometheus scraping endpoint is exposed and the logging bridge is activated: