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
Copy file name to clipboardExpand all lines: framework-docs/modules/ROOT/pages/integration/observability.adoc
+17-2Lines changed: 17 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -189,13 +189,13 @@ This observation uses the `io.micrometer.jakarta9.instrument.jms.DefaultJmsProce
189
189
[[observability.http-server]]
190
190
== HTTP Server instrumentation
191
191
192
-
HTTP server exchange observations are created with the name `"http.server.requests"` for Servlet and Reactive applications.
192
+
HTTP server exchange observations are created with the name `"http.server.requests"` for Servlet and Reactive applications,
193
+
or "http.server.request.duration" if using the OpenTelemetry convention.
193
194
194
195
[[observability.http-server.servlet]]
195
196
=== Servlet applications
196
197
197
198
Applications need to configure the `org.springframework.web.filter.ServerHttpObservationFilter` Servlet filter in their application.
198
-
It uses the `org.springframework.http.server.observation.DefaultServerRequestObservationConvention` by default, backed by the `ServerRequestObservationContext`.
199
199
200
200
This will only record an observation as an error if the `Exception` has not been handled by the web framework and has bubbled up to the Servlet filter.
201
201
Typically, all exceptions handled by Spring MVC's `@ExceptionHandler` and xref:web/webmvc/mvc-ann-rest-exceptions.adoc[`ProblemDetail` support] will not be recorded with the observation.
@@ -207,6 +207,11 @@ NOTE: Because the instrumentation is done at the Servlet Filter level, the obser
207
207
Typically, Servlet container error handling is performed at a lower level and won't have any active observation or span.
208
208
For this use case, a container-specific implementation is required, such as a `org.apache.catalina.Valve` for Tomcat; this is outside the scope of this project.
209
209
210
+
[[observability.http-server.servlet.default]]
211
+
==== Default Semantic Convention
212
+
213
+
It uses the `org.springframework.http.server.observation.DefaultServerRequestObservationConvention` by default, backed by the `ServerRequestObservationContext`.
214
+
210
215
By default, the following `KeyValues` are created:
211
216
212
217
.Low cardinality Keys
@@ -228,6 +233,16 @@ By default, the following `KeyValues` are created:
228
233
|`http.url` _(required)_|HTTP request URI.
229
234
|===
230
235
236
+
237
+
[[observability.http-server.servlet.otel]]
238
+
==== OpenTelemetry Semantic Convention
239
+
240
+
An OpenTelemetry variant is available with `org.springframework.http.server.observation.OpenTelemetryServerRequestObservationConvention`, backed by the `ServerRequestObservationContext`.
241
+
242
+
This variant complies with the https://github.com/open-telemetry/semantic-conventions/blob/v1.36.0/docs/http/http-metrics.md[OpenTelemetry Semantic Conventions for HTTP Metrics (v1.36.0)]
243
+
and the https://github.com/open-telemetry/semantic-conventions/blob/v1.36.0/docs/http/http-spans.md[OpenTelemetry Semantic Conventions for HTTP Spans (v1.36.0)].
0 commit comments