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

Better handling k6's Rate metric #12

Open
olegbespalov opened this issue Jun 13, 2024 · 0 comments
Open

Better handling k6's Rate metric #12

olegbespalov opened this issue Jun 13, 2024 · 0 comments
Labels
question Further information is requested

Comments

@olegbespalov
Copy link
Collaborator

olegbespalov commented Jun 13, 2024

What?

k6's Rate metric tracks how frequently a non-zero value occurs.

So from the k6's metrics engine, we get either the 0 or 1, and inside the open telemetry output extension, we split this into two metrics:

  • metric_name.occurred
  • metric_name.total

where the metric_name.occurred registers only under the condition that the value was non-zero

This approach has an obvious downside: it could produce a case where metric_name.occurred could not be produced at all.

For instance, if we run an example script with a demo dashboard after navigation to the Checks list panel, we quickly spot that protocol is HTTP/2 is missing.

So we need to think about how we can handle this more efficiently.

Possible Options

Always start metric with the 0 value

One of the possible approaches suggested by @joanlopez and was used inside grafana

TBD

Why?

Handling of the Rate metric should be transparent and cover all possible cases.

@olegbespalov olegbespalov added bug Something isn't working question Further information is requested labels Jun 13, 2024
@olegbespalov olegbespalov changed the title Handling k6's Rate metric Better handling k6's Rate metric Jun 13, 2024
@olegbespalov olegbespalov removed the bug Something isn't working label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant