This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/java-agent/instrumentation/spring-webmvc-3.1.md.

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

OptionTypeDefaultDescription
otel.instrumentation.common.experimental.controller-telemetry.enabledbooleanfalseEnables the creation of experimental controller spans.
otel.instrumentation.common.experimental.view-telemetry.enabledbooleanfalseEnables the creation of experimental view spans.
otel.instrumentation.spring-webmvc.experimental-span-attributesbooleanfalseEnables the capture of experimental span attributes spring-webmvc.view.name and spring-webmvc.view.type.

Data

  • JSON: /data/javaagent/instrumentations/spring-webmvc-3.1/spring-webmvc-3.1-1e977c643a0a.json
  • Explore: /java-agent/instrumentation/spring-webmvc-3.1