Skip to content

v1.0.37 - #99

Merged
yilmaztayfun merged 2 commits into
release-v1.0from
master
Aug 28, 2026
Merged

v1.0.37#99
yilmaztayfun merged 2 commits into
release-v1.0from
master

Conversation

@yilmaztayfun

@yilmaztayfun yilmaztayfun commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary by Sourcery

Maintain distributed-trace continuity across outbox persistence and processing.

New Features:

  • Preserve originating trace context when events are written to the EF Core outbox and restore that context when processing messages.

Enhancements:

  • Connect outbox processing spans to the original publish trace while retaining a link to the worker loop, with backward-compatible behavior for untraced or legacy messages.
  • Record the generated outbox message identifier on the originating publish activity.

Tests:

  • Add coverage for trace-context persistence, message identifier tagging, trace re-parenting, worker-loop links, and legacy or invalid trace data handling.

yilmaztayfun and others added 2 commits August 27, 2026 23:50
@yilmaztayfun yilmaztayfun self-assigned this Aug 28, 2026
@yilmaztayfun
yilmaztayfun requested review from a team August 28, 2026 06:23
@sourcery-ai

sourcery-ai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds end-to-end outbox trace continuity by persisting the publishing activity’s trace identity and restoring it on Outbox.Process spans, with worker-loop links and backward-compatible fallbacks for existing or untraced rows.

Sequence diagram for outbox trace continuity

sequenceDiagram
    participant Publisher
    participant EventBus
    participant EfCoreOutboxStore
    participant OutboxProcessor
    participant Broker

    Publisher->>EventBus: Publish
    EventBus->>EfCoreOutboxStore: StoreAsync
    EfCoreOutboxStore->>EfCoreOutboxStore: Persist TraceParent and TraceState
    EfCoreOutboxStore->>EventBus: SetTag outbox.message_id
    OutboxProcessor->>OutboxProcessor: StartActivity Outbox.Process
    OutboxProcessor->>OutboxProcessor: ActivityContext.TryParse
    OutboxProcessor->>Broker: Publish event

    alt Trace identity exists
        OutboxProcessor->>OutboxProcessor: Parent Outbox.Process on origin and link worker loop
    else No trace identity
        OutboxProcessor->>OutboxProcessor: Parent Outbox.Process on worker loop
    end
Loading

File-Level Changes

Change Details Files
Persist the originating activity context on outbox rows during event storage.
  • Copy ambient TraceParent and optional TraceState into ExtraProperties.
  • Tag the ambient publish activity with the generated outbox message ID.
  • Preserve existing behavior when no activity is ambient.
framework/src/BBT.Aether.Infrastructure/BBT/Aether/Events/EfCoreOutboxStore.cs
framework/test/BBT.Aether.Infrastructure.Tests/BBT/Aether/Events/EfCoreOutboxStoreTraceTests.cs
Restore distributed trace continuity when processing outbox messages.
  • Parse stored trace identity and use it as the Outbox.Process span parent.
  • Link the per-message span to the worker-loop activity when an originating context is available.
  • Fall back to worker-loop parenting for legacy, untraced, or malformed rows.
framework/src/BBT.Aether.Infrastructure/BBT/Aether/Events/Processing/OutboxProcessor.cs
framework/test/BBT.Aether.Infrastructure.Tests/BBT/Aether/Events/Processing/OutboxProcessorTraceTests.cs
Add focused telemetry tests covering storage and processing compatibility paths.
  • Verify trace metadata persistence, optional TraceState handling, and outbox ID tagging.
  • Verify origin re-parenting, worker-loop linking, and fallback behavior for missing or invalid trace metadata.
framework/test/BBT.Aether.Infrastructure.Tests/BBT/Aether/Events/EfCoreOutboxStoreTraceTests.cs
framework/test/BBT.Aether.Infrastructure.Tests/BBT/Aether/Events/Processing/OutboxProcessorTraceTests.cs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 620bb4b4-1636-4a56-857d-7e44950d9a99

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@yilmaztayfun
yilmaztayfun merged commit 98f0271 into release-v1.0 Aug 28, 2026
4 of 6 checks passed

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. If the trace context handling is wrong, Outbox.Process spans could be mis-parented or produce misleading distributed traces, and incorrect trace metadata would remain on already-written outbox rows after a revert. The impact is bounded and the rows can be cleaned or reprocessed; no business data, access decision, or irreversible action is changed.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 26 complexity · 4 duplication

Metric Results
Complexity 26
Duplication 4

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@sonarqubecloud

Copy link
Copy Markdown

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