Skip to content

Messaging metrics (outbox + inbox) and a clear no-transport startup error#247

Merged
Vulthil merged 2 commits into
mainfrom
feature/messaging-observability
Jun 18, 2026
Merged

Messaging metrics (outbox + inbox) and a clear no-transport startup error#247
Vulthil merged 2 commits into
mainfrom
feature/messaging-observability

Conversation

@Vulthil

@Vulthil Vulthil commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Two messaging-core improvements on one branch (off the merged main).

Observability — metrics (main change)

Mirrors the existing tracing setup, for metrics:

  • OutboxMeter "Vulthil.SharedKernel.Outbox" with vulthil.outbox.relayed / vulthil.outbox.failed counters (in OutboxProcessor); EnableMetrics flag on OutboxProcessingOptions (default on); auto-registered by AddOutboxEngine; manual AddVulthilOutboxInstrumentation() on a MeterProviderBuilder.
  • InboxMeter "Vulthil.Messaging.Inbox" with vulthil.inbox.processed / duplicate_skipped / missing_key counters (in IdempotentConsumeFilter); EnableMetrics on InboxOptions; auto-registered by AddRelationalInbox/AddCosmosInbox; manual AddVulthilInboxInstrumentation().

Deferred (need a store-level count / terminal-marking hook): the outbox pending backlog gauge and a dead_lettered counter.

Clear startup error when no transport is configured

ConsumerHostedService now throws a clear "No messaging transport is registered — call .UseRabbitMq(...)…" at host-start instead of an obscure DI failure. Placed at host-start (not inside AddMessaging) so ReplaceTransportWithTestHarness, which registers the transport afterwards, still works.

Tests

MeterListener tests for both meters and a no-transport startup-error test; full unit suites green locally (net9.0 + net10.0).

🤖 Generated with Claude Code

@Vulthil
Vulthil merged commit 39a9422 into main Jun 18, 2026
5 checks passed
@Vulthil
Vulthil deleted the feature/messaging-observability branch June 18, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant