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

Add all-in-one OTEL component #2262

Merged
merged 11 commits into from
Jun 3, 2020

Conversation

pavolloffay
Copy link
Member

@pavolloffay pavolloffay commented May 28, 2020

Resolves #2258
Resolves #2159

Add all-in-one based on OpenTelemetry collector

Notable changes:

  • OTEL in-memory exporter - jaeger_memory
  • query service is configurable only via flags
  • archive storage in query is configurable only via flags
  • removed dependency of admin service from query. Now the query reports HC status changes via channel
  • refactored default configuration

Follow up issues/PR:

@pavolloffay pavolloffay requested a review from a team as a code owner May 28, 2020 13:11
Copy link
Contributor

@objectiser objectiser left a comment

Choose a reason for hiding this comment

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

Interim review - will continue after current call.

Makefile Outdated Show resolved Hide resolved
cmd/all-in-one/main.go Show resolved Hide resolved
jaeger := factories.Receivers["jaeger"].CreateDefaultConfig().(*jaegerreceiver.Config)
if jaeger.Protocols == nil {
jaeger.Protocols = map[string]*receiver.SecureReceiverSettings{}
func createReceivers(component ComponentType, zipkinHostPort string, factories config.Factories) configmodels.Receivers {
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be func (c ComponentSettings) createReceivers() to avoid passing params? Same for createExporters.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have done this on purpose - be explicit on the required API contract.

Copy link
Member Author

Choose a reason for hiding this comment

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

The public API is easy to use. I like to keep the internal APIs clear in terms of the required arguments.

},
},
},
},
{
args: []string{
"--processor.jaeger-binary.server-host-port=host:1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this test has been removed? I think this is still required.

Copy link
Member Author

Choose a reason for hiding this comment

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

The code is fully covered in this class. The same test is in jaeger_receiver_test.go.

"go.uber.org/zap"

"github.com/jaegertracing/jaeger/cmd/opentelemetry-collector/app"
"github.com/jaegertracing/jaeger/cmd/opentelemetry-collector/app/exporter/cassandra"
"github.com/jaegertracing/jaeger/cmd/opentelemetry-collector/app/exporter/elasticsearch"
"github.com/jaegertracing/jaeger/cmd/opentelemetry-collector/app/exporter/grpcplugin"
"github.com/jaegertracing/jaeger/cmd/opentelemetry-collector/app/exporter/kafka"
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be worth adding kafka exporter in one of the tests, just for coverage.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's already there but was using a string, I will change it to use the constant.

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

@objectiser I have removed the archive storage config from exporters. It looks cleaner now.

@pavolloffay
Copy link
Member Author

It should be ready for another review.

Copy link
Contributor

@objectiser objectiser left a comment

Choose a reason for hiding this comment

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

A couple of comments - but looks like an issue in CI.

cmd/opentelemetry-collector/cmd/all-in-one/main.go Outdated Show resolved Hide resolved
}
return f, nil
case "memory":
return memory.GetFactory(), nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not badger, grpc_plugin?

Copy link
Member Author

Choose a reason for hiding this comment

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

badger hasn't been implemented yet. I will add the grpc-plugin.

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

codecov bot commented Jun 2, 2020

Codecov Report

Merging #2262 into master will increase coverage by 0.02%.
The diff coverage is 96.07%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2262      +/-   ##
==========================================
+ Coverage   96.14%   96.17%   +0.02%     
==========================================
  Files         219      219              
  Lines       10658    10686      +28     
==========================================
+ Hits        10247    10277      +30     
+ Misses        354      353       -1     
+ Partials       57       56       -1     
Impacted Files Coverage Δ
plugin/storage/es/factory.go 100.00% <ø> (ø)
cmd/query/app/server.go 94.80% <90.00%> (+0.21%) ⬆️
plugin/storage/cassandra/options.go 100.00% <100.00%> (ø)
plugin/storage/es/options.go 100.00% <100.00%> (ø)
plugin/storage/memory/factory.go 100.00% <100.00%> (ø)
plugin/storage/memory/options.go 100.00% <100.00%> (ø)
cmd/query/app/static_handler.go 81.66% <0.00%> (-2.50%) ⬇️
cmd/flags/admin.go 79.36% <0.00%> (+1.58%) ⬆️
pkg/netutils/port.go 100.00% <0.00%> (+50.00%) ⬆️

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 2fdd1cd...d21c888. Read the comment docs.

Copy link
Contributor

@objectiser objectiser left a comment

Choose a reason for hiding this comment

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

LGTM - once CI passed. Maybe get Yuri to check this one?

cmd/opentelemetry-collector/go.sum Show resolved Hide resolved
cmd/opentelemetry-collector/cmd/all-in-one/main.go Outdated Show resolved Hide resolved
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@pavolloffay
Copy link
Member Author

The last fixes building OTEL all-in-one image and runs integration test for it.

I will merge on green.

@pavolloffay pavolloffay merged commit 6f3a169 into jaegertracing:master Jun 3, 2020
@RehanSaeed
Copy link

RehanSaeed commented Dec 12, 2020

Is there any documentation regarding this Docker image? In particular, which ports I need. The getting started guide seems to cover the non-open telemetry version https://www.jaegertracing.io/docs/1.21/getting-started/.

@objectiser
Copy link
Contributor

@RehanSaeed The information is contained in this section: https://www.jaegertracing.io/docs/1.21/opentelemetry/

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.

Create all-in-one OTEL distribution Exporter for In-Memory Storage
3 participants