Package com.jprofiler.api.probe.embedded
Contains the classes for creating an embedded probe.
Purpose of embedded 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 "Embedded probes" chapter
for an extended discussion of embedded probes.
Embedded probes allow you to add functionality similar to the built-in probes in JProfiler. In contrast to the "injected" probe API, the "embedded" probe API is called directly from the monitored software. If you want to monitor software components whose source code is not under your control, use the injected probe API instead.
Getting startedThere are two types of embedded probes, split probes and payloads probes.
Please see Split
and Payload
for further information.
To get started with writing embedded probes, have a look at the $JPROFILER_HOME/api/samples/simple-embedded-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-embedded.jar
.
The embedded 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-embedded</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-embedded', version: 'VERSION'
}
License
Classes in this package and its sub-packages are licensed under the Apache License, version 2.0.
-
ClassDescriptionBy calling this class you can add entries to the payload call tree and hotspots of your probe.For each payload probe, you have to create a subtype of this class and pass it as a class literal to the methods in
Payload
.By calling this class you can add an arbitrary split in the call tree, just like the URL splitting of JProfiler's built-in "HTTP Server" probe.For each split probe, you have to create a subtype of this class and pass it as a class literal to the methods inSplit
.Allows you to override the thread state recorded in JProfiler.Interface to further customize event enums registered withPayloadProbe.getCustomTypes()
.