-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Use the grpc.ClientConn to handle connections for the otlptracegrpc client #2329
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2329 +/- ##
=======================================
+ Coverage 73.3% 74.3% +0.9%
=======================================
Files 174 173 -1
Lines 12243 12174 -69
=======================================
+ Hits 8986 9049 +63
+ Misses 3019 2888 -131
+ Partials 238 237 -1
|
Looks like a good start. |
19b8f86
to
30c61db
Compare
This is not needed now that no tests relies on the listener to wait for a connection to be established before continuing.
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Do not check the second call to the client Stop. There is no guarantee it will not error in normal operation.
582bf20
to
7067fe0
Compare
I'm not 100% sure we can deprecated the options that are deprecated in this PR. We support the configuration of the exporter via environment variables, and they configure the deprecated options. In order to keep this support, I think we will need to persist the options. |
Use the internals of the client to explicit cancel the context returned from exportContext. This gets around the bug where the select in Stop may randomly choose the non-context Done case and avoid returning an error (also failing to cancel the context).
To configure the client/exporter with environment variables these options are used. There is no way to fully remove these options without removing support for configuration with environment variables. Leave that decision and strategy determination to a separate PR.
I've removed the deprecation for now. Leaving the decision and strategy determination for a separate Issue/PR. |
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.
👍
Client
use the underlying gRPCClientConn
to handle name resolution, TCP connection establishment (with retries and backoff) and TLS handshakes, and handling errors on established connections by re-resolving the name and reconnecting.Deprecate configuration options for the otlptracegrpcClient
that configure agrpc.ClientConn
managed by theClient
itself. Instead favor the caller passing an already configuredgrpc.ClientConn
.This does not include changes to the
otlpmetricgrpc
Client
. A similar PR is planned as a follow-on to address those changes.Resolve #1527
Resolve #2384