-
Notifications
You must be signed in to change notification settings - Fork 112
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 self() for grpc channel name #481
Conversation
using ?MODULE limited us to a single grpcbox client channel. We may want to not have a channel for each Signal (traces, meitrcs, logs) if they are the same configuration, but for now this at least allows each to export -- before only 1 could init their exporter because it would conflict with the other. Reuse of the channel is not as simple as using ?MODULE and if it is already started use that channel because the endpoint may be different. Not only that, the configuration to the endpoint may be different, so a Channel name would have to be all the distiguishing attributes of a Channel... Just easier to create one for each Signal.
Codecov ReportBase: 37.20% // Head: 9.32% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #481 +/- ##
==========================================
- Coverage 37.20% 9.32% -27.88%
==========================================
Files 57 6 -51
Lines 3508 1995 -1513
==========================================
- Hits 1305 186 -1119
+ Misses 2203 1809 -394
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
%% Channel name can be any term. To separate Channels per | ||
%% the process calling the exporter (like the batch processor, | ||
%% metric reader and log handler) use the current pid | ||
Channel = self(), |
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.
would it make sense to use {self(), ?MODULE}
to also avoid any sort of problems with multiple sorts of callers? I guess it wouldn't because the channelpid is stored but yeah.
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.
It wouldn't hurt but don't think it'd add anything yea
using ?MODULE limited us to a single grpcbox client channel. We may want to not have a channel for each Signal (traces, meitrcs, logs) if they are the same configuration, but for now this at least allows each to export -- before only 1 could init their exporter because it would conflict with the other.
Reuse of the channel is not as simple as using ?MODULE and if it is already started use that channel because the endpoint may be different. Not only that, the configuration to the endpoint may be different, so a Channel name would have to be all the distiguishing attributes of a Channel... Just easier to create one for each Signal.