Skip to content

feat: tracing support for individual entries in bulk subscriptions - #1822

Merged
javier-aliaga merged 1 commit into
dapr:masterfrom
matheusandre1:issue1753
Oct 6, 2026
Merged

javier-aliaga merged 1 commit into
dapr:masterfrom
matheusandre1:issue1753

Conversation

@matheusandre1

Copy link
Copy Markdown
Contributor

Description

Clarifies how tracing works for bulk subscriptions and shows how to get the trace context of each event.

When Dapr delivers messages to a bulk subscriber (@BulkSubscribe over HTTP or onBulkTopicEvent over gRPC), the whole batch arrives in a single call from the sidecar. That call has one trace context, which is the one in the HTTP headers / gRPC metadata. This is expected: it represents the bulk delivery, not the individual messages.

Each message's own W3C trace context is still available per entry, inside its CloudEvent:

  • HTTP: CloudEvent#getTraceParent() / CloudEvent#getTraceState() on each entry.getEvent()
  • gRPC: the traceparent / tracestate keys in entry.getCloudEvent().getExtensions()

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Closes: #1753

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

Signed-off-by: Matheus André <matheusandr2@gmail.com>
@matheusandre1
matheusandre1 marked this pull request as ready for review October 2, 2026 23:27
@matheusandre1
matheusandre1 requested review from a team as code owners October 2, 2026 23:27
@codecov

codecov Bot commented Oct 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.11%. Comparing base (c6ad42f) to head (5a86145).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1822   +/-   ##
=========================================
  Coverage     79.11%   79.11%           
  Complexity     2604     2604           
=========================================
  Files           264      264           
  Lines          7785     7785           
  Branches        820      820           
=========================================
  Hits           6159     6159           
  Misses         1266     1266           
  Partials        360      360           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@javier-aliaga
javier-aliaga merged commit 3871a74 into dapr:master Oct 6, 2026
23 of 24 checks passed
@matheusandre1
matheusandre1 deleted the issue1753 branch October 6, 2026 11:29
javier-aliaga pushed a commit that referenced this pull request Oct 6, 2026
…1822) (#1824)

(cherry picked from commit 3871a74)

Signed-off-by: Matheus André <matheusandr2@gmail.com>
Co-authored-by: Matheus André <92062874+matheusandre1@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarification on Trace ID Behavior in Bulk Topic Subscription (Dapr SDK 1.17.0)

2 participants