Spring WebMVC
OpenTelemetry Java agent instrumentation
This instrumentation enriches HTTP server spans with route information for Spring WebMVC 3.1+. It also enables controller spans (controller spans are disabled by default) and view spans (view spans are disabled by default).
- Name:
spring-webmvc-3.1 - Scope:
io.opentelemetry.spring-webmvc-3.1 - Target versions:
org.springframework:spring-webmvc:[3.1.0.RELEASE,6) - Library: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/servlet/mvc/package-summary.html
Telemetry
- Span attributes:
code.function,code.namespace,spring-webmvc.view.type
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
otel.instrumentation.common.experimental.controller-telemetry.enabled | boolean | false | Enables the creation of experimental controller spans. |
otel.instrumentation.common.experimental.view-telemetry.enabled | boolean | false | Enables the creation of experimental view spans. |
otel.instrumentation.spring-webmvc.experimental-span-attributes | boolean | false | Enables the capture of experimental span attributes spring-webmvc.view.name and spring-webmvc.view.type. |