Skip to content

Outbox telemetry: rename ActivitySource + auto-register when tracing is enabled#235

Merged
Vulthil merged 2 commits into
mainfrom
feature/outbox-telemetry-rename
Jun 17, 2026
Merged

Outbox telemetry: rename ActivitySource + auto-register when tracing is enabled#235
Vulthil merged 2 commits into
mainfrom
feature/outbox-telemetry-rename

Conversation

@Vulthil

@Vulthil Vulthil commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

Makes the outbox relay's tracing work out of the box. Follows #232 (merged).

  • Rename the relay ActivitySource from "Vulthil.SharedKernel.Infrastructure" to "Vulthil.SharedKernel.Outbox" (Telemetry.ActivitySourceName) so it matches the package that emits it.
  • Auto-register the source with OpenTelemetry from AddOutboxEngine (← EnableOutboxProcessing), gated on OutboxProcessingOptions.EnableTracing (default on) — so OutboxPublishing spans reach the app's configured tracer with no manual AddSource/wildcard. When EnableTracing is off, registration is skipped entirely (and the processor emits no spans either).
  • AddVulthilOutboxInstrumentation() TracerProviderBuilder helper (mirrors the RabbitMq package's AddVulthilMessagingInstrumentation()) for manual tracer-provider setups; the engine calls it internally.
  • OutboxProcessingOptions.EnableTracing is now settable (initset) so the gate can read it from the configure callback.
  • Adds OpenTelemetry.Api + OpenTelemetry.Extensions.Hosting to the (previously OTel-free) engine package. PublicAPI + docs updated.

Verification

Full Release build clean; WebApi.Tests 8/8 (confirms the engine's AddOpenTelemetry() merges with the app/ServiceDefaults' own at runtime).

@claude

claude Bot commented Jun 16, 2026

Copy link
Copy Markdown

Code review

One issue found while checking for bugs and CLAUDE.md compliance.

XML doc not updated for the initset change on EnableTracing

In OutboxProcessingOptions.cs the EnableTracing accessor changed from init to set, so it is now a read/write property — but the XML doc summary still reads "Gets a value indicating whether…".

Per the project rule"When modifying a public member, make sure to update the XML Documentation" — and this file's own convention (every init property is documented with "Gets"), the summary should be "Gets or sets":

    /// Gets or sets a value indicating whether Trace Identifiers should be included when publishing outbox messages.

(Posted as a summary comment — inline review comments are not available in this environment.)

@Vulthil
Vulthil merged commit 95f724e into main Jun 17, 2026
5 checks passed
@Vulthil
Vulthil deleted the feature/outbox-telemetry-rename branch June 17, 2026 19:16
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