Skip to content

Add baggage support#1659

Open
siri-varma wants to merge 17 commits intodapr:masterfrom
siri-varma:users/svegiraju/add-baggage
Open

Add baggage support#1659
siri-varma wants to merge 17 commits intodapr:masterfrom
siri-varma:users/svegiraju/add-baggage

Conversation

@siri-varma
Copy link
Contributor

Description

Please explain the changes you've made

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.

Please reference the issue this PR will close: #[issue number]

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

@siri-varma siri-varma self-assigned this Feb 20, 2026
@siri-varma siri-varma marked this pull request as ready for review February 28, 2026 21:43
@siri-varma siri-varma requested review from a team as code owners February 28, 2026 21:43
@siri-varma
Copy link
Contributor Author

@artur-ciocanu / @cicoyle / @javier-aliaga / @salaboy Please take a look at this PR when you get a chance. Thanks

@javier-aliaga javier-aliaga requested a review from Copilot March 4, 2026 16:37
@javier-aliaga
Copy link
Contributor

@siri-varma I ask copilot to review, lets see what it suggest, I will do my own review tomorrow

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds W3C baggage propagation support to the Dapr Java SDK so that baggage can flow through both gRPC and HTTP calls via Reactor context, and includes a new example + gRPC-focused tests.

Changes:

  • Add Headers.BAGGAGE constant and propagate it through HTTP header allowlist.
  • Introduce DaprBaggageInterceptor and wire it into the gRPC interceptor chain.
  • Add a baggage example and a new gRPC unit test suite validating propagation behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
sdk/src/test/java/io/dapr/client/DaprClientGrpcBaggageTest.java New gRPC tests validating baggage propagation behavior.
sdk/src/main/java/io/dapr/internal/grpc/interceptors/DaprBaggageInterceptor.java New gRPC client interceptor injecting baggage into metadata from Reactor context.
sdk/src/main/java/io/dapr/internal/grpc/DaprClientGrpcInterceptors.java Wires the new baggage interceptor into the existing interceptor chain.
sdk/src/main/java/io/dapr/client/Headers.java Adds a public BAGGAGE header constant.
sdk/src/main/java/io/dapr/client/DaprHttp.java Allows baggage to be promoted from Reactor context into outgoing HTTP headers.
examples/src/main/java/io/dapr/examples/baggage/README.md New documentation for the baggage example.
examples/src/main/java/io/dapr/examples/baggage/BaggageClient.java New runnable example demonstrating baggage propagation via Reactor context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@siri-varma
Copy link
Contributor Author

@copilot can you fix the comments ?

siri-varma and others added 5 commits March 13, 2026 08:01
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Removed empty tearDown method from DaprClientGrpcBaggageTest.

Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.54%. Comparing base (f63a4a4) to head (fe166be).

Files with missing lines Patch % Lines
...rnal/grpc/interceptors/DaprBaggageInterceptor.java 84.61% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1659      +/-   ##
============================================
+ Coverage     79.53%   79.54%   +0.01%     
- Complexity     2193     2196       +3     
============================================
  Files           237      238       +1     
  Lines          6577     6591      +14     
  Branches        730      732       +2     
============================================
+ Hits           5231     5243      +12     
  Misses          990      990              
- Partials        356      358       +2     

☔ View full report in Codecov by Sentry.
📢 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.

@siri-varma
Copy link
Contributor Author

@javier-aliaga Addressed all the comments. Thank you.

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.

4 participants