A Special Sensor is a sensor that does not collect data, but which is needed to enable certain functionality. Each of them can be deactivated, but this is not recommended because certain features require them as a prerequisite. For example, tracing across multiple threads is made possible by specific special sensors. Should these sensors be deactivated, this feature would no longer be automatically available. By default, all special sensors are enabled.
The special sensors can be disabled using the following configuration:
inspectit: instrumentation: special: # See the default configuration for all existing special sensor keys SPECIAL_SENSOR_KEY: false
JVM Local Context Propagation Sensors
The context propagation sensors are necessary to enable tracing and data propagation between multiple threads by passing the current context. By doing this, tags and scopes can be correlated to another in case of switching threads. Propagation across JVM borders is realized purely through the default configuration of the agent. Hereby, propagation is supported for HttpUrlConnection, Apache CloseableHttpClient and the Servlet API.
The following context propagation sensors are provided out-of-the-box:
Thread-Start Context Propagation Sensor: Can be enabled or disabled via
inspectit.instrumentation.special.thread-start-context-propagation. This sensor enables passing the current context via simple
java.lang.Threadinstances. Note that the context is only passed when calling the thread's
startmethod and not when calling the
runmethod due to the fact that we do not switch threads in this case.
Executor Context Propagation Sensor: Can be enabled or disabled via
inspectit.instrumentation.special.executor-context-propagation. This sensor enables passing the current context via implementations of the
java.util.concurrent.Executorinterface. The context is attached to the
java.lang.Runnableused to invoke the Executor's
Scheduled Executor Context Propagation Sensor: Can be enabled or disabled via
inspectit.instrumentation.special.scheduled-executor-context-propagation. This sensor enables passing the current context via implementations of the
java.util.concurrent.ScheduledExecutorServiceinterface. The context is attached to the
java.util.concurrent.Callableused to invoke the Executor's
Class Loader Delegation
For performing the instrumentation, inspectIT Ocelot requires that some classes it provides are accessible from the instrumented class. To ensure this, inspectIT pushes these classes to the bootstrap classloader.
However commonly module systems, such as OSGi limit the access to bootstrap classes. For this reason, inspectIT Ocelot instruments all application classloaders to allow access to the relevant inspectIT classes.
Using this sensor, applications based on module systems, such as OSGi are supported out of the box without requiring any configuration changes of the agent or the application!
The class loader delegation can be disabled using the