[Backport release-1.17] Adding sdk tracing capabilities on spring#1723
Merged
javier-aliaga merged 1 commit intorelease-1.17from Apr 10, 2026
Merged
[Backport release-1.17] Adding sdk tracing capabilities on spring#1723javier-aliaga merged 1 commit intorelease-1.17from
javier-aliaga merged 1 commit intorelease-1.17from
Conversation
* adding sdk tracing capabilities on spring Signed-off-by: salaboy <Salaboy@gmail.com> * fix: guard highCardinalityKeyValue calls against null values in ObservationDaprClient Micrometer's highCardinalityKeyValue throws NPE when the value is null. Added a safe() helper that coalesces nulls to empty string, applied to all observation tag values in both Spring Boot 3 and Boot 4 modules. Signed-off-by: Javier Aliaga <javier@diagrid.io> * fix: add null validation in constructors and fix license header formatting Add Objects.requireNonNull for delegate and observationRegistry in ObservationDaprClient and ObservationDaprWorkflowClient constructors to fail fast on misconfiguration. Fix missing ' * ' prefix on the last line of license headers in all four new files. Signed-off-by: Javier Aliaga <javier@diagrid.io> * fix: defer observation start to subscription time in ObservationDaprClient Wrap observe() and observeFlux() helpers with Mono.defer/Flux.defer so that obs.start() runs on subscription, not on method call. This prevents leaked spans when a Mono is never subscribed and ensures span timing reflects actual execution, not the gap before subscription. Signed-off-by: Javier Aliaga <javier@diagrid.io> * fix: use proper Objects import, revert license header, add deferred-start test Replace fully-qualified java.util.Objects with import statement and fix alphabetical import order to satisfy checkstyle. Revert license header change since the project's checkstyle config expects the original format. Add test verifying that an unsubscribed Mono does not leak an observation. Signed-off-by: Javier Aliaga <javier@diagrid.io> --------- Signed-off-by: salaboy <Salaboy@gmail.com> Signed-off-by: Javier Aliaga <javier@diagrid.io> Co-authored-by: Yaron Schneider <schneider.yaron@live.com> Co-authored-by: Javier Aliaga <javier@diagrid.io> (cherry picked from commit aa296fa)
javier-aliaga
approved these changes
Apr 10, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-1.17 #1723 +/- ##
==================================================
- Coverage 79.51% 72.88% -6.64%
- Complexity 2194 2254 +60
==================================================
Files 237 241 +4
Lines 6577 7401 +824
Branches 730 736 +6
==================================================
+ Hits 5230 5394 +164
- Misses 992 1648 +656
- Partials 355 359 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport aa296fa from #1713.