Package com.jprofiler.api.probe.injected
Contains the classes for creating an injected probe.
Purpose of injected probes
Please read the "Probe concepts" chapter in the documentation (directory $JPROFILER_HOME/doc
) for
an overview on the different types of custom probes in JProfiler and the "Injected probes" chapter
for an extended discussion of injected probes.
Injected probes allow you to add functionality similar to the built-in probes in JProfiler. In contrast to the "embedded" probe API, the "injected" probe API monitors software components whose source code is not under your control. If you develop software like a container or a database driver and want to make JProfiler aware of its high-level semantics, use the embedded probe API instead.
Getting startedTo define an injected probe, annotate a class with Probe
. Such a probe class can
contain public static methods annotated with
Interception
, PayloadInterception
,
SplitInterception
, AdditionalInterception
,
ControlObjectName
and Telemetry
.
To get started with writing injected probes, have a look at the $JPROFILER_HOME/api/samples/simple-injected-probe
example project. Open the gradle build file build.gradle
in an editor for instructions on how to run it.
All classes in this package are contained in $JPROFILER_HOME/api/jprofiler-probe-injected.jar
.
The injected probe API is also available as a dependency. In the snippets below, "VERSION"
should be replaced with the corresponding JProfiler version.
<dependency>
<groupId>com.jprofiler</groupId>
<artifactId>jprofiler-probe-injected</artifactId>
<version>VERSION</version>
</dependency>
<repository>
<id>ej-technologies</id>
<url>https://maven.ej-technologies.com/repository</url>
</repository>
Gradle
repositories {
maven {
url 'https://maven.ej-technologies.com/repository'
}
}
dependencies {
classpath group: 'com.jprofiler', name: 'jprofiler-probe-injected', version: 'VERSION'
}
Deployment
To load injected custom probes, pass
-Djprofiler.probeClassPath=...
to the profiled JVM. The probe classpath can contain directories and class files, separated with the path separator
(';' for Windows and ':' for other platforms). Note that the custom probe classes must not be on the class path.
The profiling agent will scan the probe classpath and find all probe definitions.
Alternatively, you can set
-Djprofiler.customProbes=...
to a comma-separated list of fully qualified class names that will be loaded from the class path.
License
Classes in this package and its sub-packages are licensed under the Apache License, version 2.0.
-
ClassDescriptionMarks an optional method in your probe that will be called for previously unknown control objects.Payload type with enhanced functionality.Marks a class that defines an injected probe and parametrizes the probe.An interface for enhanced probe functionality.Allows you to override the thread state recorded in JProfiler.Interface to further customize event enums configured with
Probe.customTypes()
.