Home

Awesome

jmeter-backend-newrelic

CI

A JMeter plug-in that enables you to send test results to New Relic Metrics API.

Overview

Description

JMeter Backend New Relic is a JMeter plugin enabling you to send test results to NRDB via the New Relic Metrics API.

The following test results metrics are exposed by the plugin.

Plugin installation

Once you have built or downloaded the plugin JAR file from the releases section, move the JAR to your $JMETER_HOME/lib/ext.

mv target/jmeter.backendlistener.newrelic-VERSION.jar $JMETER_HOME/lib/ext/

Then, restart JMeter and the plugin should be loaded.

JMeter configuration

To make JMeter send test result metrics to New Relic, in your Test Pane, right click on Thread Group > Add > Listener > Backend Listener, and choose io.github.darrensmithwtc.jmeter.backendlistener.newrelic.NewRelicBackendClient as Backend Listener Implementation. Then, in the Parameters table, configure the following attributes.

AttributeDescriptionRequiredDefault
connectionStringThe fully qualified URL endpoint of the New Relic Metrics Provider.Yeshttps://metric-api.eu.newrelic.com/metric/v1
testNameName of the test. This value is used to differentiate metrics across test runs or plans in New Relic and allow you to filter them.Yesjmeter
metricNameString containing the metric name you want to use in New Relic.Yesloadtest.result
clientNameString containing the client name you want to add as an attribute to the metrics in New Relic.Yesunknown
environmentNameString containing the environment name you want to add as an attribute to the metrics in New Relic.Yesunknown
licenceKeyString containing your new relic ingestionYes[empty-string]
samplersListOptional list of samplers separated by a semi-colon (;) that the listener will collect and send metrics to New Relic. If the list is empty, the listener will not filter samplers and send metrics from all of themNo[empty-string]
useRegexForSamplerListIf set to true the samplersList will be evaluated as a regex to filter samplers.Nofalse
responseHeadersOptional list of response headers spearated by a semi-colon (;) that the listener will collect and send values to New Relic.No[empty-string]

Example of configuration:

Screenshot of configuration

Custom properties

You can add custom data to your metrics by adding properties starting with ai., for example, you might want to provide information related to your environment with the property ai.environment and value staging.

Visualization

Test result metrics are available in the requests dimension of your New Relic instance.

Contributing

Feel free to contribute by forking and making pull requests, or simply by suggesting ideas through the Issues section.

Build

You can make changes to the plugin and build your own JAR file to test changes. To build the artifact, execute below Maven command. Make sure JAVA_HOME is set properly.

mvn clean package

This plugin is inspired by the Azure plugin, as well as Elasticsearch and Kafka backend listener plugins.