Defining Tag at option level

Hi Team,

I have defined tags at option level and my code looks like -

export const options = {
    tags: { test_type: 'apitest' },
    stages: [
        { duration: RAMP_TIME, target: VUS }, // simulate ramp-up of traffic from 1 to 5 users over 10 seconds.
        { duration: RUN_TIME, target: VUS }, // stay at 5 users for 1 minutes
        { duration: '30s', target: 0 }, // ramp-down to 0 users in 30s
    ],

    thresholds: {
 
        http_req_failed: ['rate<0.01']
    },
};

export default function () {
    const response = http.get(http.url`${Utils.getBaseUrl()}?${searchParams.toString()}`);
    const checkRes = check(response, {
        'response is 200': (r) => r.status === 200,
    })

But when I wrote a query like below in grafana using influx db, it does not show me result -

SELECT max("value" FROM /^$Measurement$/ WHERE  "test_type" = 'apitest' AND $timeFilter GROUP BY "name"

However if I use tag on request and check level individually then it show result like -

export default function () {
    const response = http.get(http.url`${Utils.getBaseUrl()}?${searchParams.toString()}`, tags: {
      test_type: "apitest',
    },);
    const checkRes = check(response, {
        'response is 200': (r) => r.status === 200,
        { test_type: "apitest',}
    })

Can we not define single tag at option level

Hi @vish_s02,
I checked the feature with InfluxDBv1 and ran the following query SELECT * FROM http_req_duration as an example and I see the expected wide-set tags.

I think you have an error in your InfluxDB query. Grafana supports a form-based Query Builder, try to use it, it can help you to fix it.

Let me know if it helps.