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

Fix TLS flags settings in jaeger OTEL receiver #2438

Merged

Conversation

pavolloffay
Copy link
Member

Signed-off-by: Pavol Loffay ploffay@redhat.com

The GRPC TLS settings were not applied when --collector.grpc.host-port= was not provided. This was causing issues in the operator as it does not set the endpoint.

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@codecov
Copy link

codecov bot commented Aug 31, 2020

Codecov Report

Merging #2438 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2438      +/-   ##
==========================================
- Coverage   95.57%   95.55%   -0.02%     
==========================================
  Files         208      208              
  Lines       10682    10682              
==========================================
- Hits        10209    10207       -2     
- Misses        400      402       +2     
  Partials       73       73              
Impacted Files Coverage Δ
cmd/query/app/static_handler.go 81.66% <0.00%> (-2.50%) ⬇️
plugin/storage/integration/integration.go 80.38% <0.00%> (-0.48%) ⬇️
cmd/query/app/server.go 93.33% <0.00%> (+2.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af985ae...1ce4466. Read the comment docs.

Copy link
Member

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final question. Since GRPC and Thrift HTTP are automatically enabled on the default jaeger collector should we always start the otel collector receivers?

KeyFile: cOpts.TLS.KeyPath,
CertFile: cOpts.TLS.CertPath,
}
if cOpts.TLS.Enabled == true {
Copy link
Member

@joe-elliott joe-elliott Aug 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can simplify if cOpts.TLS.Enabled {

Should enabling TLS through the Jaeger Collector options also turn on TLS for HTTP below? Ignore. I see that the collector settings are specific to GRPC.

@pavolloffay
Copy link
Member Author

Final question. Since GRPC and Thrift HTTP are automatically enabled on the default jaeger collector should we always start the otel collector receivers?

They are started/configured by the defaultconfig package. I would not enable them here by default to keep the config in sync with the OTEL upstream. E.g. we might want to provide a distribution with the same default config as OTEL upstream #2281 (comment) (e.g the root command would behave like otelcol)

@joe-elliott
Copy link
Member

joe-elliott commented Aug 31, 2020

Ok, It took some unwinding, but I see what you're referring to. It looks like the order is:

  1. Start with OTEL defaults for the receiver

    cfg := f.Wrapped.CreateDefaultConfig().(*jaegerreceiver.Config)

  2. Apply Viper (Jaeger) Config

  3. Fill out Jaeger Defaults

I'm wondering if steps two and three should be swapped. For instance in this PR if cfg.GRPC == nil we are subbing in the default Jaeger GRPC settings which we then do again in step 3.

we might want to provide a distribution with the same default config as OTEL upstream

Is there a default config for OTEL? Last time I checked the operator had to configure the basic pipeline.

Obviously there is a lot of history here and I'm just playing catch up. I will continue to think about this as I review the code/PRs!

@pavolloffay
Copy link
Member Author

I'm wondering if steps two and three should be swapped. For instance in this PR if cfg.GRPC == nil we are subbing in the default Jaeger GRPC settings which we then do again in step 3.

Maybe it could be swapped or even merged together. Maybe at the default conf creation time we know what componnet (collector, agent...) is being started.

Is there a default config for OTEL? Last time I checked the operator had to configure the basic pipeline.

There isn't there is also a proposal to have one, but It probably won't be merged. Maybe OTEL will provide a default config file with the distribution.

@pavolloffay pavolloffay merged commit 97e1ec6 into jaegertracing:master Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants