-
Improvement
-
Resolution: Done
-
Minor
-
None
-
-
2.5
Some very nice work has been done by aleksisimell in Jenkins-54445 to add tags on every metrics, but we cannot use that feature if we are using a GlobalListener like we are doing with pipelines.
You can see in the code that null is always sent to the PublicationService.
https://github.com/jenkinsci/influxdb-plugin/blob/development/src/main/java/jenkinsci/plugins/influxdb/global/GlobalRunListener.java#L55-L56
It would be nice if we could somehow specify that parameter as build environment variable.
pipeline { options { timestamps() skipDefaultCheckout() } parameters { string(name: 'MY_TAG_VALUE', description: 'The value of the tag', defaultValue: 'test') string(name: 'MY_FIELD_VALUE', description: 'The value of the field', defaultValue: '10') } agent { label "master" } stages { stage ("Run") { steps { script { env.INFLUXDB_PLUGIN_CUSTOM_TAGS = 'custom_tag=${MY_TAG_VALUE}' env.INFLUXDB_PLUGIN_CUSTOM_FIELDS = "custom_field=${MY_FIELD_VALUE}" // It can also work with string interpolation } } } } }
- is related to
-
JENKINS-54445 Add more common tags for all measurements
- Closed
- links to