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

Make special handling of check metrics in StatsD output configurable #28

Open
olegbespalov opened this issue Aug 30, 2024 · 0 comments
Open

Comments

@olegbespalov
Copy link

The statsd output (also used for NewRelic and DataDog, among others) currently has special handling of check metric samples:

https://github.com/grafana/k6/blob/59a8883676edf4e28edb39561c33ebd941e05944/output/statsd/output.go#L79-L87
https://github.com/grafana/k6/blob/59a8883676edf4e28edb39561c33ebd941e05944/output/statsd/output.go#L94-L100

It transforms the metric names to check.<check-name>.pass or check.<check-name>.fail. I don't remember why this was done, probably because StatsD doesn't seem to support anything like our Rate metric (so we transform it to 2 Count ones here) and because we didn't want the checks to be grouped together (sort of a localized grafana/k6#1321 workaround). In any case, it definitely needs to be better documented (grafana/k6-docs#603) and maybe ideally also configurable (this issue) 🤔

For example, we can add a new K6_STATSD_EXPAND_RATE_ON_TAGS option to the statsd output, with the default value of check. Then:

  • the current behavior of the output will be preserved with the default value
  • if the user sets K6_STATSD_EXPAND_RATE_ON_TAGS to an empty string, the special handling of checks will be disabled
  • if the user sets K6_STATSD_EXPAND_RATE_ON_TAGS to something else, other Rate metrics could be expanded in a similar manner as well

Connected issues and forum threads:

The issue ported from grafana/k6#2470

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

No branches or pull requests

1 participant