I’m trying to use the tagsAsFields configuration option for InfluxDB to pass one of my custom tags (a UUID) to InfluxDB as a field, in order to avoid creating too many time series. My understanding based on other forum posts, as well as sample code in the k6 git repo, is this should be possible to configure one of two ways:
-
Environment variable K6_INFLUXDB_TAGS_AS_FIELDS as described here
-
JSON config file as shown in this code sample
The environment variable works fine for me, however when I try using the JSON config file, it does not work. The UUID is still reflected as a tag in InfluxDB, and when I run an InfluxQL query to show the series on the database (which is a fresh database created to test this), it shows that new series are being created for each of the UUIDs.
The same occurs if I try removing one of the three tags which is passed as a field by default (such as vu). Works fine if I do it with the environment variable, doesn’t work if I do it through the JSON config.
Here is the relevant portion of my config file:
"collectors": {
"influxdb": {
"addr": "http://localhost:8086",
"db": "k6db",
"tagsAsFields": [
"vu",
"iter",
"url",
"UUID"
]
}
}
Any thoughts?
For reference, using k6 v0.26.2.