#6762·jmeter

[Feature] Add sampleType to SampleResult

Author: i-nahornyiCreated Sep 1, 2026Updated Sep 1, 2026
Labelsenhancementto-triage

Use case

There is currently no explicit/documented field in SampleResult that identifies the type of result, such as SAMPLE or TRANSACTION.

The current workaround is to use:

java
TransactionController.isFromTransactionController(sampleResult)

However, this approach is fragile because transaction detection depends on other SampleResult fields. In particular, it can break when a user redefines the responseMessage of the Transaction Controller with a custom value.

This behavior is also not documented, so users have no way to know that redefining the Transaction Controller's responseMessage can silently break transaction detection.

Possible solution

Add an explicit sampleType field to SampleResult, for example:

java
public enum SampleType {
    SAMPLE,
    TRANSACTION
}

Then consumers could use:

java
sampleResult.getSampleType() == SampleType.TRANSACTION

This would provide a reliable way for listeners, backend listeners, plugins, and other consumers to identify the type of a SampleResult.

Possible workarounds

No response

JMeter Version

5.6.3

Java Version

java 17.0.7

OS Version

No response