dgetzlaf opened a new pull request, #6476:
URL: https://github.com/apache/jmeter/pull/6476

   ## Description
   Introduce `listenerIsEnabled` to InfluxdbBackendListenerClient and 
InfluxDBRawBackendListenerClient.
   By this it is possible to enable/disable the sending of Metrics by 
properties (like in the Dynatrace/MINT Backend Listener)
   
   ## Motivation and Context
   When running the same testplan in different environments, I can not always 
rely on the accessibility to my InfluxDB. (Here I get the log file spammed by 
errors that are preventable.)
   With this, I can configure i.e. by properties or groovy code, if i can send 
metrics to my InfluxDB:
   - `${__P(InfluxdbBackendListener.enabled, true)}`
   - `${__groovy(org.apache.commons.lang3.SystemUtils.IS_OS_LINUX)}`
   
   The idea is copied from the 
[MintBackendListener](https://github.com/dynatrace-oss/jmeter-dynatrace-plugin/blob/master/src/main/java/com/dynatrace/jmeter/plugins/MintBackendListener.java#L65).
   
   By default the listener is always enabled and must be disabled explicitly.
   
   ## How Has This Been Tested?
   Locally tested the InfluxdbBackendListenerClient with 
   - `enabled=true` 
   Log message "INFO o.a.j.v.b.i.InfluxdbBackendListenerClient: 
InfluxdbBackendListenerClient will send metrics: true"
   and sending of metrics
   - `enabled=false` --> sending of metrics
   Log message "INFO o.a.j.v.b.i.InfluxdbBackendListenerClient: 
InfluxdbBackendListenerClient will send metrics: false"
   and NO sending of metrics
   - `enabled=faaaaaalse` --> sending of metrics
   Log message "INFO o.a.j.v.b.i.InfluxdbBackendListenerClient: 
InfluxdbBackendListenerClient will send metrics: false"
   and NO sending of metrics
   
   
   ## Types of changes
   - New feature (non-breaking change which adds functionality)
   
   
   ## Checklist:
   <!--- Go over all the following points, and put an `x` in all the boxes that 
apply. -->
   <!--- If you're unsure about any of these, don't hesitate to ask. We're here 
to help! -->
   - [ ] My code follows the [code style][style-guide] of this project.
   - [ ] I have updated the documentation accordingly.
   
   [style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to