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
Align observations of @scheduled with OTel conventions
This commit updates the `ScheduledTaskObservationDocumentation` to
better align the contributed KeyValues with OpenTelemetry conventions
for observations of code executions.
Instead of a "target.type" key with the bean class simple name, this
is now contributing the canonical class name of the bean under the
"code.namespace" key.
The "method.name" key is renamed to "code.function" and its values
remain unchanged.
Closesgh-30721
Copy file name to clipboardExpand all lines: framework-docs/modules/ROOT/pages/integration/observability.adoc
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -101,10 +101,10 @@ By default, the following `KeyValues` are created:
101
101
[cols="a,a"]
102
102
|===
103
103
|Name | Description
104
+
|`code.function` _(required)_|Name of Java `Method` that is scheduled for execution.
105
+
|`code.namespace` _(required)_|Canonical name of the class of the bean instance that holds the scheduled method.
104
106
|`exception` _(required)_|Name of the exception thrown during the execution, or `KeyValue#NONE_VALUE`} if no exception happened.
105
-
|`method.name` _(required)_|Name of Java `Method` that is scheduled for execution.
106
107
|`outcome` _(required)_|Outcome of the method execution. Can be `"SUCCESS"`, `"ERROR"` or `"UNKNOWN"` (if for example the operation was cancelled during execution.
107
-
|`target.type` _(required)_|Simple class name of the bean instance that holds the scheduled method.
Copy file name to clipboardExpand all lines: spring-context/src/main/java/org/springframework/scheduling/config/DefaultScheduledTaskObservationConvention.java
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,15 @@ public String getContextualName(ScheduledTaskObservationContext context) {
Copy file name to clipboardExpand all lines: spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTaskObservationDocumentation.java
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -56,22 +56,22 @@ public KeyName[] getHighCardinalityKeyNames() {
Copy file name to clipboardExpand all lines: spring-context/src/test/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessorObservabilityTests.java
Copy file name to clipboardExpand all lines: spring-context/src/test/java/org/springframework/scheduling/config/DefaultScheduledTaskObservationConventionTests.java
0 commit comments