-
Notifications
You must be signed in to change notification settings - Fork 2.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
Add zipkin receiver to OTEL collector #2181
Conversation
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
@pavolloffay Wanted to clarify your comment:
Wouldn't those flags just map their values onto the Jaeger receiver in the OTC config? e.g. https://github.com/open-telemetry/opentelemetry-collector/tree/master/receiver#communicating-over-tls - what changes would be required in OTEL jaeger receiver? |
Yes, that is my idea. I am not sure how it will be done. We need access to the receiver configuration object before it gets used by the factory. I will be looking into this shortly. |
The tests on https://github.com/jaegertracing/jaeger/blob/master/cmd/opentelemetry-collector/app/defaults/default_config_test.go#L96 should be updated. But this looks good so far |
Signed-off-by: Pavol Loffay <[email protected]>
This is ready for re-review. For the flags I have created #2182 |
recvs := map[string]configmodels.Receiver{ | ||
"jaeger": jaeger, | ||
} | ||
if zipkinHostPort != disabledZipkinHostPort { |
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.
Rather than define a special port, would it be better to just have a pointer? So test against nil.
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.
We could do that too, although this uses the same approach as other parts of the codebase - zipkin is disabled if :0
is used. This value is also set as the default of the flag.
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.
I did a small change, I have removed the const and used a built-in func to return the value of disabled endpoint.
// Config creates default configuration. | ||
// It enables default Jaeger receivers, processors and exporters. | ||
func Config(storageType string, factories config.Factories) (*configmodels.Config, error) { | ||
func Config(storageType string, zipkinHostPort string, factories config.Factories) (*configmodels.Config, error) { |
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 be better to use an interface so can just add extra flag fields if/when supported?
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.
Interface perhaps no but options/params struct could be used. I would wait and see until the number of parameters grows and then refactor. Three params still look good to me.
Signed-off-by: Pavol Loffay <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #2181 +/- ##
=======================================
Coverage 96.14% 96.14%
=======================================
Files 219 219
Lines 10585 10585
=======================================
Hits 10177 10177
Misses 352 352
Partials 56 56
Continue to review full report at Codecov.
|
* Add zipkin receiver to OTEL collector Signed-off-by: Pavol Loffay <[email protected]> * fmt Signed-off-by: Pavol Loffay <[email protected]> * Fix tests Signed-off-by: Pavol Loffay <[email protected]> * Use host port instead of const Signed-off-by: Pavol Loffay <[email protected]>
Add Zipkin receiver to OTEL collector.
The Zipkin receiver is disabled by default and it can be enabled by flags:
Other notable changes: