You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid Stream API in performance critical tracing code
Injection and extraction of the tracing context happens on each request. For example, on each call to a Controller or HTTP client.
The Stream API used here was showing up on CPU profiling under heavy load. With these changes, the CPU profiling looks better.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/CompositePropagationFactory.java
+39-16Lines changed: 39 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -76,11 +76,19 @@ public Propagation<String> get() {
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/CompositeTextMapPropagator.java
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -106,11 +106,14 @@ public <C> Context extract(Context context, C carrier, TextMapGetter<C> getter)
0 commit comments