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

Implement rate as counter #4

Closed
wants to merge 1 commit into from
Closed

Implement rate as counter #4

wants to merge 1 commit into from

Conversation

olegbespalov
Copy link
Collaborator

@olegbespalov olegbespalov commented May 23, 2024

What?

For the beginning, we do try to treat the rate metric as the simple counter, precisely like we do in statsd output.

Why?

Rate is one of the metrics types of the k6, and it should work.

@olegbespalov olegbespalov requested a review from a team as a code owner May 23, 2024 10:58
@olegbespalov olegbespalov requested review from mstoykov and oleiade May 23, 2024 10:58
@olegbespalov olegbespalov self-assigned this May 23, 2024
Comment on lines +184 to +190
case metrics.Rate:
rate, err := o.getOrCreateCounter(name)
if err != nil {
return err
}

rate.Add(ctx, entry.Value, otelMetric.WithAttributes(MapTagSet(entry.Tags)...))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be two counters as you need both the number of occurances and the actual number of possitive or negative values.

I don't know what is the preffered way this likely is good thing to ask around in the community or internally.

Given that this will possibly evolve in the recommended output for k6 it will be nice for it to not have the problems due to which we remove stattsd.

@olegbespalov
Copy link
Collaborator Author

Closing in favor of #8

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

Successfully merging this pull request may close these issues.

2 participants