-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Opening up telemetrygen for integration and unit testing #36984
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I don't see a compelling reason to open the API to run telemetrygen here. You might also like to send specific metrics/traces/logs a finite number of times, telemetrygen just blasts constantly. Here is an example you can follow: https://github.com/signalfx/otlptest/blob/main/main.go |
I appreciate your feedback on this one, the main key here running the tests via integration build tags in order to run with as little additional complexity as possible. Opening up this API would allow for us to leverage the existing capabilities in telemetrygen without statically creating a number signals as the example you've posted. I could write and use a wrapper around telemetrygen which ensures the local install and can execute it appropriately, but it creates a lot of undue overhead compared to building against the current version which gets tagged and released with the rest of the collector components it works against. As far as maintaining the API stability, I feel your pain and am happy to help however possible here. Telemetrygen already has a published public interface in regards to the command line flags and expected parameters which align with the expected config, and the exported |
Per our conversation on slack, I have approval from my org to take this on in an official capacity from Yahoo and am happy to take up ownership if you're open to it. |
Component(s)
cmd/telemetrygen
Describe the issue you're reporting
I would love to open up telemetrygen's metric, logs, and trace generation in order to make them usable from integration tests written in Go. This would allow for a pattern such as:
Using this patten, we can write telemetry through a running collector and validate the collector has processed them as expected per a provided configuration.
It also allows for validating integration testing of a collector which contains custom components.
This would require the
Start
functions in the telemetrygeninternal/[metrics,logs,traces]
packages to become exported, as well as their configurations.The text was updated successfully, but these errors were encountered: