-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Jaeger Receiver enable all protocols even if configured for just one #158
Comments
This is likely due to #113 |
Yes, but it is more than that: the receiver code assumes one configuration and all protocols. We need to take out the common code and actually make separate receivers for each protocol. |
Looking at the code I see that protocols specified in the config are checked and only the specified protocol port is passed: https://github.com/open-telemetry/opentelemetry-service/blob/8721e3beaf1c449d88c2f6f78517cd03d6b2c7f3/receiver/jaegerreceiver/factory.go#L100-L114 The problem seems to be because of not checking the
Is this required? Is there a reason the current code will not work once |
You can make it work just taking into account the enabled flag and it seems acceptable in the short run, but, the we should do a proper refactor. At minimum we need to not enable the agent until we have configurations for it. |
By refactoring, we can modify the receiver to use the configmodels.ReceiverSettings like the rest of the receivers(even make it a requirement maybe?) resulting in a consistent way to enable a receiver and making it easier for us and our customers to work with. |
@ccaraman I do not see how it can be done. configmodels.ReceiverSettings the way it is defined currently is intended to specify a single protocol. Some receivers support multiple protocols so they need plurality of such settings. The config format was defined and approved with multiple stakeholders (https://docs.google.com/document/d/1GWOzV0H0RTN1adiwo7fTmkjfCATDDFGuOB4jp3ldCc8/edit#heading=h.g6rvvz3l271i). We can change the format if there is a better proposal but it will have to pass through review and approval process again. If you have improvement suggestions it is best to target them post 0.1.0 milestone and before the first stable release (date TBD). |
From further reading the code - it is more than just respecting the enabled flag the code itself doesn't expect there to be protocols not enabled. When the Receiver is started The following ends up using the default tchannel port if no tchannel port was set during the factory methods.
Resulting in the ThriftPort being started even if a config specified otherwise. The same thing for the Thrift HTTP port and the gRPC port. |
Fixes #445, #158 This PR addresses some Jaeger receiver config cleanup as well as makes some breaking changes to the way the config is handled. See below for details. **Fixes/Updates** - Disabled flag is respected per protocol - Unspecified protocols will no longer be started - Empty protocol configs can now be specified to start the protocol with defaults. e.g. ``` jaeger: protocols: grpc: ``` - Updated readmes - Naming and behavior of per protocol Addr/Enabled functions in `trace_reciever.go` has been standardized. - Added thrift tchannel test to meet code coverage **Breaking Change** Changed the way an empty `jaeger:` config is handled. An empty/default config does not start any jaeger protocols. Previously it started all three collector protocols. This is a consequence of not starting unspecified protocols.
Fixed via #490 |
The Jaeger receiver enables all protocols for collector and agent no matter the configuration protocol. This is a bug that needs to be fixed: each receiver/protocol specification should enable only the corresponding endpoint.
The text was updated successfully, but these errors were encountered: