From 64e04b7bc266900adfbd0c49930aded0c842f20d Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Thu, 6 Jul 2023 10:03:15 +0200 Subject: [PATCH] Document limitations of Servlet Filter observations This commit documents the fact that the Servlet Filter based observations for MVC applications is limited by the Servlet Filter contract in the first place. All processing and logging that happens outside of the scope of the filter is not observed. Log statements from the catalina engine (in the case of Tomcat), or any container-specific infrastructure, is not covered by the instrumentation. Closes gh-29398 --- .../modules/ROOT/pages/integration/observability.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework-docs/modules/ROOT/pages/integration/observability.adoc b/framework-docs/modules/ROOT/pages/integration/observability.adoc index 0fe7a1a8b7..29dabf20d5 100644 --- a/framework-docs/modules/ROOT/pages/integration/observability.adoc +++ b/framework-docs/modules/ROOT/pages/integration/observability.adoc @@ -97,6 +97,10 @@ You can, at any point during request processing, set the error field on the `Obs include-code::./UserController[] +NOTE: Because the instrumentation is done at the Servlet Filter level, the observation scope only covers the filters ordered after this one as well as the handling of the request. +Typically, the Servlet container error handling is done at a lower level and won't have any active observation nor span. +For this use case, a container-specific implementation is required, such as a `org.apache.catalina.Valve` for Tomcat; this is outside of the scope of this project. + By default, the following `KeyValues` are created: .Low cardinality Keys