Special Sensors
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 simplejava.lang.Thread
instances. Note that the context is only passed when calling the thread'sstart
method and not when calling therun
method 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 thejava.util.concurrent.Executor
interface. The context is attached to thejava.lang.Runnable
used to invoke the Executor'sexecute
method.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 thejava.util.concurrent.ScheduledExecutorService
interface. The context is attached to thejava.lang.Runnable
orjava.util.concurrent.Callable
used to invoke the Executor'sschedule
,scheduleAtFixedRate
andscheduleWithFixedDelay
method.
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 inspectit.instrumentation.special.class-loader-delegation
property.