Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags for Virtual Users Not Output With the k6.vus Metric #3957

Open
davpate opened this issue Sep 16, 2024 · 2 comments
Open

Tags for Virtual Users Not Output With the k6.vus Metric #3957

davpate opened this issue Sep 16, 2024 · 2 comments
Assignees

Comments

@davpate
Copy link

davpate commented Sep 16, 2024

Brief summary

I'm running multiple scenarios with Virtual Users for my tests and trying to distinguish between the different scenarios that are starting up Virtual Users within my tests but I'm not able to get any additional Tags added to the VUs from what I can see.

k6 version

v0.53.0

OS

Amazon Linux 2

Docker version and image (if applicable)

No response

Steps to reproduce the problem

I've tried a few permutations based on what the docs say and none of them have worked so far.

Execution Tags

import http from 'k6/http';
import exec from 'k6/execution';

export default function () {
  exec.vu.metrics.tags['mytag'] = 'value1';
  exec.vu.metrics.tags['mytag2'] = 2;

  // the metrics these HTTP requests emit will get tagged with `mytag` and `mytag2`:
  http.batch(['https://test.k6.io', 'https://test-api.k6.io']);
}

Turning on System Tags for Scenario (each of my scenarios has a unique name, so including that with the k6.vus metric would help a ton here)

import http from 'k6/http';

export const options = {
  systemTags: ['scenario'],
};

export default function () {
  http.batch(['https://test.k6.io', 'https://test-api.k6.io']);
}

Expected behaviour

For the above scenarios, I'm expecting that k6.vus will be output with the Tags specified so that I can tell how many VUs are running for different scenarios and not have to split them apart as tests.

Actual behaviour

k6.vus tags don't appear to change from any of the above methods, even adding arbitrary values doesn't cause it to pass that Tag along when outputting k6.vus

@olegbespalov
Copy link
Contributor

Hi @davpate

I believe you faced the issue that is mentioned in this comment #2945 (comment) and as written there we have a plan to emit this metrics per-scenario, but not sure k6.vus gets the ability of free tags input 🤷

@davpate
Copy link
Author

davpate commented Oct 10, 2024

Thanks for sharing that issue, yeah it looks very similar to mine. In my case I'm just looking to be able to tell how many users are running for each of the scenarios or types of users. Just trying to be able to capture how many users are running for each of my scenarios when I'm running multiple at one time.

If additional metrics get added per scenario that would likely allow me to get the data I'm looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants