-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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] Duration flag is not respected when tls handshake fails #31401
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I was able to reproduce using both logs and traces, but logs fails right away when it can't connect. I believe this is because the GRPC connections for metrics and traces are configured to block until the connection is successful. The documentation for the Since this is a tool used for testing, it may be best to simply fail when a connection cannot be made, rather than blocking until it's successful. Unless the code owners disagree, I think the |
@crobert-1 I think the option was already there before the PR you mention, it was just moved to the current file from a different place. I am fine removing |
Good catch @mx-psi, I missed that. It looks like It looks like tracegen was brought over from the same concept within Jaeger, but the Jaeger implementation only added GRPC exporting less than a year ago, and they don't use @jpkrohling Do you happen to remember why |
It's been a while... I don't remember the explicit reason, and I'd be fine removing as well. |
Thanks folks! I may put in a PR to remove that block if I free up. I use this tool for testing and added some logic to force quit the command if it hits x seconds which I'd like to remove and just rely on that duration flag |
…31631) **Description:** Metrics and traces in telemetrygen were sent with WithBlock() which was a blocking call waiting on a successful connection to be formed. In the event a connection could not succeed, like a TLS handshake failure, the block would loop indefinitely. **Link to tracking Issue:** Resolves #31401 **Testing:** - Run telemetrygen on main pointed at a host that won't resolve TLS and observe that the command loops indefinitely - Run telemetrygen on this commit pointed at that same host and observe it exit after failing **Documentation:** <Describe the documentation added.>
…pen-telemetry#31631) **Description:** Metrics and traces in telemetrygen were sent with WithBlock() which was a blocking call waiting on a successful connection to be formed. In the event a connection could not succeed, like a TLS handshake failure, the block would loop indefinitely. **Link to tracking Issue:** Resolves open-telemetry#31401 **Testing:** - Run telemetrygen on main pointed at a host that won't resolve TLS and observe that the command loops indefinitely - Run telemetrygen on this commit pointed at that same host and observe it exit after failing **Documentation:** <Describe the documentation added.>
…pen-telemetry#31631) **Description:** Metrics and traces in telemetrygen were sent with WithBlock() which was a blocking call waiting on a successful connection to be formed. In the event a connection could not succeed, like a TLS handshake failure, the block would loop indefinitely. **Link to tracking Issue:** Resolves open-telemetry#31401 **Testing:** - Run telemetrygen on main pointed at a host that won't resolve TLS and observe that the command loops indefinitely - Run telemetrygen on this commit pointed at that same host and observe it exit after failing **Documentation:** <Describe the documentation added.>
Component(s)
cmd/telemetrygen
What happened?
Description
If you use the duration flag but point to an endpoint that will fail tls handshake failure, the command will run indefinitely and not respect the duration flag.
Steps to Reproduce
Expected Result
The command exits in failure after 5s
Actual Result
Command runs forever
Collector version
v0.95.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: