# probe-config

Content of the MCP resource `jprofiler://config/probes` of the JProfiler MCP server, see the [tool and resource reference](../tools.md) for the full list of tools and resources.

# Probe configuration reference

Reference for `advanced.probeConfig` of the `prepare_profiling` and `attach` tools.

`probeConfig` maps a subsystem name to a map of attribute name to value, for example
`{"jdbc": {"preparedStatementParameters": true}, "http_server": {"split": false}}`.
Values are strings, numbers or booleans. Unknown attributes are silently ignored, the applied
settings are reported as `probeSettings` in `check_status`.

Script properties take Java code strings that are compiled when the recording starts; script lists
take arrays of code strings, evaluated in order until one returns a non-null value. A URL resolver
script returns the split string, null means no splitting for that request, for example
`servletRequest.getRequestURI().replaceAll("/user/\\d+", "/user/{id}")`.

Custom probes (embedded or injected probe classes of the profiled application) use the key
`custom:<fully qualified probe class name>` and support only two attributes: `events` (boolean, record
individual events for the probe.events dataset) and `injected` (boolean, prepare_profiling emits the
`-Djprofiler.customProbes` discovery VM parameter for the probe class, attach passes the same discovery
setting in the agent options, embedded probes self-register and need no discovery parameter).

## Common attributes

- `enabled` (boolean, default `true`)
- `events` (boolean, default `false`): Records individual probe events (single SQL statements, HTTP requests, ...) with start time, duration and payload for the events view. Off by default because event recording has higher overhead and storage cost than the aggregated hot spots.
- `annotatePayloads` (boolean, default `false`)
- `recordSpecial` (booleanCsv): Set to "true" to enable. Records probe-specific extras. For the JDBC probe this enables connection leak tracking: connections that are garbage collected without being closed are reported with their allocation stack traces.

## jdbc

Records JDBC calls, connections, and statement timings.

- `preparedStatementParameters` (boolean, default `false`): Records bind values for prepared statements; security risk because parameters may contain sensitive data.
- `replaceUnpreparedLiterals` (boolean, default `false`): Normalizes inline literals into `?` placeholders so structurally identical queries group as one hot spot.
- `keepLiteralsForEvents` (boolean, default `true`): Keeps the raw SQL on individual events even when `replaceUnpreparedLiterals=true` normalizes the hot-spot key.
- `removeLeadingComment` (boolean, default `true`): Strips a leading SQL comment before the statement is used for hot-spot grouping.

## jpa

Records JPA/Hibernate calls, grouped by entity and operation.

- `hibernate3` (boolean, default `true`): Instruments Hibernate 3.x; disable to skip if your application uses Hibernate 3 only via a shaded dependency.
- `hibernate4` (boolean, default `true`): Instruments Hibernate 4.x and later.
- `eclipseLink23` (boolean, default `true`): Instruments EclipseLink 2.3 and later.
- `openJpa21` (boolean, default `true`): Instruments Apache OpenJPA 2.1 and later.
- `normalizeCriteria` (boolean, default `true`): Normalizes JPA Criteria queries into a stable form so structurally identical criteria group as one hot spot.

## mongo_db

Records MongoDB driver operations.

- `keepPrimitiveData` (boolean, default `false`): Includes primitive BSON values (numbers, strings) in recorded payloads; may expose sensitive data.

## cassandra

Records Cassandra driver calls (CQL statements, prepared queries).


## http_server

Records incoming HTTP server requests (servlet and generic), with `<requestResolvers>` and `<genericResolvers>` script lists for custom URL handling.

- `split` (boolean, default `true`): Splits the call tree by request URL so each request type forms its own subtree.
- `splitType` (string): Selects how URLs are grouped: `path` (default) groups by request path, `script` uses the `requestResolvers` scripts, `generic` uses the `genericResolvers` scripts. Only meaningful when `split=true`.
- `fullQuery` (boolean, default `false`): Includes the query string in the hot-spot key; increases cardinality and can fragment hot-spots.
- `requestResolvers` (script list, array of code strings): returns `java.lang.String`, parameters `(com.jprofiler.api.agent.ScriptContext scriptContext, javax.servlet.http.HttpServletRequest servletRequest)` - for servlet containers. Scripts are written against javax.servlet and translated to jakarta automatically at the bytecode level, no servlet API compile classpath is needed.
- `genericResolvers` (script list, array of code strings): returns `java.lang.String`, parameters `(com.jprofiler.api.agent.ScriptContext scriptContext, com.jprofiler.api.agent.HttpRequest httpRequest)` - works on any supported server. The HttpRequest parameter is JProfiler's own API (getRequestURI, getQueryString, getMethod, getHeader), no compile classpath is needed.

## http_client

Records outgoing HTTP client calls, with optional `<hotspotScript>` and `<trackingScript>` for custom URL handling.

- `hotspotType` (string): Selects how outgoing URLs are aggregated into hot spots; `script` requires a `<hotspotScript>` child.
- `trackingType` (string): Selects which calls participate in async request tracking; `script` requires a `<trackingScript>` child.
- `timing` (string): Selects when a call's duration ends (e.g. headers received vs. body fully consumed).
- `fullQuery` (boolean, default `false`): Includes the query string in the hot-spot key; increases cardinality and can fragment hot-spots.
- `hotspotScript` (script, code string): returns `java.lang.String`, parameters `(com.jprofiler.api.agent.ScriptContext scriptContext, java.lang.String url)`
- `trackingScript` (script, code string): returns `boolean`, parameters `(com.jprofiler.api.agent.ScriptContext scriptContext, java.lang.String url)`

## ws

Records JAX-WS web service client and server calls.


## jndi

Records JNDI lookups and bindings.


## jms

Records JMS message sends and receives, with an optional `<jmsResolver>` script for naming destinations.

- `recordSynchronous` (boolean, default `true`)
- `recordAsynchronous` (boolean, default `true`)
- `jmsResolver` (script, code string): returns `java.lang.String`, parameters `(com.jprofiler.api.agent.ScriptContext scriptContext, java.lang.Object message)`

## kafka_consumer

Records Kafka consumer record handling.

- `hotspotNameType` (string): Selects what becomes the hot-spot key for consumed records; `script` requires a `<hotspotScript>` child.
- `eventNameType` (string): Selects what becomes the event name of a consumed record; `script` requires an `<eventScript>` child.
- `recordStreams` (boolean, default `false`): Whether records consumed on Kafka Streams threads are recorded.
- `split` (boolean, default `true`): Splits the call tree by topic so each consumed topic forms its own subtree.
- `splitType` (string): Selects the granularity of `split=true`; only meaningful when `split=true`.
- `hotspotScript` (script, code string): returns `java.lang.String`, parameters `(com.jprofiler.api.agent.ScriptContext scriptContext, com.jprofiler.api.agent.KafkaConsumerRecord record)`
- `eventScript` (script, code string): returns `java.lang.String`, parameters `(com.jprofiler.api.agent.ScriptContext scriptContext, com.jprofiler.api.agent.KafkaConsumerRecord record, java.lang.String hotspotName)`

## rmi

Records Java RMI client and server calls.

- `split` (boolean, default `true`): Splits the call tree by remote endpoint so each peer forms its own subtree.
- `splitType` (string): Selects how RMI calls are grouped (e.g. by IP, host, or remote interface); only meaningful when `split=true`.
- `recordClient` (boolean, default `true`)
- `recordServer` (boolean, default `true`)

## grpc

Records gRPC client and server calls.

- `recordClient` (boolean, default `true`)
- `recordServer` (boolean, default `true`)

## ai

Records calls to LLM/AI libraries (LangChain4j, Spring AI), with an optional `<hotspotScript>` for custom grouping.

- `hotspotNameType` (string): Selects what becomes the hot-spot key for AI calls; `script` requires a `<hotspotScript>` child.
- `hotspotScript` (script, code string): returns `java.lang.String`, parameters `(com.jprofiler.api.agent.ScriptContext scriptContext, com.jprofiler.api.agent.ModelRequest modelRequest)`

## socket

Records TCP socket I/O grouped by remote endpoint.


## file

Records file I/O operations, with an optional `<fileFilter>` script returning true to record a given path.

- `fileFilter` (script, code string): returns `boolean`, parameters `(com.jprofiler.api.agent.ScriptContext scriptContext, java.lang.String path)`

## process

Records execution of external processes started by the JVM.
