You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And if setStateDisconnected is called in indefiniteBackgroundConnection, the chan is not triggerd and indefiniteBackgroundConnection will always block in select.
@shabicheng the OTLP exporter's gRPC connection handling was just reworked in #1420. Are you able to test against the current HEAD to see if this issue remains?
I was able to reproduce this with v0.15.0. I ran a client that continuously sent spans to a collector and when the collector was stopped and restarted, the client never reconnected.
This behavior was not reproduced with v1.0.1. Once the collector came back up the client reconnected and spans started being transmitted.
General
Environment
Reproduce
This can be reproduced every time.
Problem
After debugging the code, I find the grpc indefiniteBackgroundConnection don't connect anymore.
The root cause is grpcconnection use a none buffered chan for disconnectedCh:
https://github.com/open-telemetry/opentelemetry-go/blob/master/exporters/otlp/connection.go#L73
And if setStateDisconnected is called in indefiniteBackgroundConnection, the chan is not triggerd and indefiniteBackgroundConnection will always block in select.
The debug code :
Logs, after
signal fail
, the exporter do not work anymore :How To Fix
After change disconnectedCh to a buffered chan(oc.disconnectedCh = make(chan bool, 1)), the connection behaviour change to normal.
The text was updated successfully, but these errors were encountered: