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

Jaeger Receiver Config Fixes #490

Merged
merged 25 commits into from
Jan 14, 2020

Conversation

joe-elliott
Copy link
Contributor

@joe-elliott joe-elliott commented Jan 6, 2020

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.

Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
@codecov-io
Copy link

codecov-io commented Jan 6, 2020

Codecov Report

Merging #490 into master will decrease coverage by 0.07%.
The diff coverage is 65.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #490      +/-   ##
==========================================
- Coverage   75.99%   75.91%   -0.08%     
==========================================
  Files         120      119       -1     
  Lines        7415     7437      +22     
==========================================
+ Hits         5635     5646      +11     
- Misses       1514     1522       +8     
- Partials      266      269       +3
Impacted Files Coverage Δ
receiver/jaegerreceiver/config.go 69.23% <ø> (ø) ⬆️
...er/prometheusreceiver/internal/metrics_adjuster.go 92.81% <ø> (ø) ⬆️
receiver/factory.go 100% <ø> (ø) ⬆️
processor/batchprocessor/node_batcher.go 90.13% <0%> (-1.21%) ⬇️
processor/queuedprocessor/queued_processor.go 45.75% <0%> (-0.61%) ⬇️
exporter/exportertest/sink_exporter.go 69.23% <0%> (ø) ⬆️
processor/spanprocessor/span.go 85.71% <0%> (-4.29%) ⬇️
processor/attributesprocessor/attributes.go 93.25% <0%> (-2.15%) ⬇️
exporter/exportertest/nop_exporter.go 85.18% <0%> (ø) ⬆️
processor/resourceprocessor/resource_processor.go 85.71% <0%> (-6.6%) ⬇️
... and 32 more

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 7fe168e...9471462. Read the comment docs.

@pjanotti
Copy link
Contributor

pjanotti commented Jan 8, 2020

Hi @joe-elliott, what is the behavior when empty jaeger: is specified? The breaking change is fine as long as that is reported as an error (so it will be clear that the at least one protocol needs to be specified).

@pjanotti
Copy link
Contributor

pjanotti commented Jan 8, 2020

LGTM @joe-elliott just need to fix the test

--- FAIL: TestLoadConfig (0.01s)
    config_test.go:37: 
        	Error Trace:	config_test.go:37
        	Error:      	Received unexpected error:
        	            	error reading settings for receiver type "jaeger": must specify at least one protocol when using the Jaeger receiver
        	Test:       	TestLoadConfig

@joe-elliott
Copy link
Contributor Author

joe-elliott commented Jan 8, 2020

@pjanotti Thanks for the comments.

When starting the Jaeger receiver with an unknown protocol the collector will now log:

Cannot load configuration: error reading settings for receiver type "jaeger": unknown jaeger protocol <bad proto>

When starting the Jaeger receiver with no protocols the collector will now log:

Cannot load configuration: error reading settings for receiver type "jaeger": must specify at least one protocol when using the Jaeger receiver

Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @joe-elliott LGTM

receiver/jaegerreceiver/testdata/config.yaml Outdated Show resolved Hide resolved
receiver/jaegerreceiver/config_test.go Outdated Show resolved Hide resolved
receiver/jaegerreceiver/factory.go Outdated Show resolved Hide resolved
receiver/jaegerreceiver/trace_receiver.go Show resolved Hide resolved
receiver/jaegerreceiver/trace_receiver.go Outdated Show resolved Hide resolved
receiver/jaegerreceiver/trace_receiver_test.go Outdated Show resolved Hide resolved
@joe-elliott
Copy link
Contributor Author

@tigrannajaryan I believe I have addressed your concerns.

Note that I went ahead and exported GetConfigSection from the config package. It seems like this function will be useful for any future custom unmarshallers as it will allow them to easily reuse all of the environment substitution logic in the config package. If this is not desirable, I will revert and try a different path.

receiver/factory.go Outdated Show resolved Hide resolved
receiver/jaegerreceiver/factory.go Outdated Show resolved Hide resolved
@tigrannajaryan
Copy link
Member

Mostly LGTM, only a couple small nits.

Signed-off-by: Joe Elliott <[email protected]>
@joe-elliott
Copy link
Contributor Author

@tigrannajaryan I believe that covers it. Let me know if I can make any other changes.

Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@tigrannajaryan tigrannajaryan merged commit 9778b16 into open-telemetry:master Jan 14, 2020
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
* Update bundled Smart Agent to v5.11.0.
* Document APM infra correlation.
* Alpha translatesfx feature additions.
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this pull request Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jaeger reciever ignores "disabled" configuration setting
4 participants