-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[cmd/telemetrygen] Add ability to ensure uniqueness of timeseries within a time period #39935
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
[cmd/telemetrygen] Add ability to ensure uniqueness of timeseries within a time period #39935
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do this via rate.Limit
instead of adding a new thing? And can we make this configurable? OTLP supports up to nanosecond precision
numMetrics int // how many metrics the worker has to generate (only when duration==0) | ||
enforceUnique bool // if true, the worker will generate unique timeseries | ||
totalDuration time.Duration // how long to run the test for (overrides `numMetrics`) | ||
limitPerSecond rate.Limit // how many metrics per second to generate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't we just have a limit of 1 here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The limit wouldn't allow for load-test levels of telemetry to be generated for backend systems without an astronomical number of binaries running. This creates new timeseries to ensure we're sending unique values within the provided time limit.
Somewhat answered this from your other comment, but the difference here is that we still want to be able to generate close to the same amount of load configurable by
Totally, updates incoming. |
I may have misunderstood the idea of |
…series' into fix/overriding-timeseries
I was looking at go's rate.Limiter functionality to see if it made sense, and I don't think it does since we aren't actually wanting to limit generation of timeseries, just to ensure that within X configurable amount of time, we're using a unique timeseries. This pattern seems to hold up well with my tests against a prom remote write backend ( telemetrygen -> collector -> prometheus compatible backend ) at 1s and 15s intervals now that the flag is configurable. This change does mean that telemetrygen just became a cardinality generator as well though, as setting a high rate with Possibly dangerous, but a good testing tool to have in our belt imo. |
@mx-psi Any additional feedback on this guy? |
@mx-psi @codeboten please review as codeowners. |
Hey all, I'm still here and open to additional feedback on this one. |
Description
Adds a new
timeBox
object which has the sole purpose of generating unique attributes per second. This allows for telemetrygen to not override it's own values when sending to backends.Link to tracking issue
Fixes #39933
Testing
Additional test added to cover new functionality
Documentation
New Flag added along with help criteria