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

Document shutting down of provider closes connection to collector #2384

Closed
morigs opened this issue Nov 13, 2021 · 1 comment · Fixed by #2329
Closed

Document shutting down of provider closes connection to collector #2384

morigs opened this issue Nov 13, 2021 · 1 comment · Fixed by #2329
Labels
enhancement New feature or request

Comments

@morigs
Copy link

morigs commented Nov 13, 2021

Problem Statement

Calling Shutdown on TracerProvider (and probably on Stop in metrics controller.Controller too) causes closing of underlying grpc connection through TracerProvider.Shutdown->SpanProcessor.Shutdown->SpanExporter.Shutdown->Client.Stop.
This is not obvious because user can provide his own grpc client using otlptracegrpc.WithGRPCConn.

Proposed Solution

Documentation and doc comments should explicitly mention that all exporter connections are closed automatically during shutdown

Alternatives

Grpc client is not closed on shutdown when it's provided using otlptracegrpc.WithGRPCConn

Additional Context

This lack of info causes confusion. When user tries to close the connection manually, he gets Rpc error: code = Canceled desc = grpc: the client connection is closing.

@morigs morigs added the enhancement New feature or request label Nov 13, 2021
@MadVikingGod
Copy link
Contributor

I think this might be the wrong behavior.

Originally the exporter managed the lifecycle of the connection, so it made sense to close the connection when shutdown. Now that the exporter doesn't, at least not when it's provided a connection, I think we might not want to also close it when shutting down. I know this will make our logic a bit more complex, but just like the consumer shouldn't close the channel, I think that the consumer shouldn't close the connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants