Commit aa296fa
Adding sdk tracing capabilities on spring (#1713)
* 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>1 parent 78cf7b4 commit aa296fa
11 files changed
Lines changed: 2941 additions & 6 deletions
File tree
- dapr-spring
- dapr-spring-boot-4-autoconfigure
- src/main/java/io/dapr/spring/boot4/autoconfigure/client
- dapr-spring-boot-autoconfigure
- src
- main/java/io/dapr/spring/boot/autoconfigure/client
- test/java/io/dapr/spring/boot/autoconfigure/client
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
87 | 97 | | |
88 | 98 | | |
89 | 99 | | |
| |||
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | | - | |
95 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
100 | | - | |
| 107 | + | |
| 108 | + | |
101 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
102 | 114 | | |
103 | 115 | | |
104 | 116 | | |
| |||
0 commit comments