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 Kafka OTEL storage exporter #2135

Merged
merged 2 commits into from
Mar 25, 2020

Conversation

pavolloffay
Copy link
Member

@pavolloffay pavolloffay requested a review from a team as a code owner March 23, 2020 16:11
@pavolloffay pavolloffay requested a review from vprithvi March 23, 2020 16:11
bash -c "set -e; set -o pipefail; $(GOTEST) ./... | $(COLORIZE)"

.PHONY: test-otel
test-otel:
cd ${OTEL_COLLECTOR_DIR} && bash -c "set -e; set -o pipefail; $(GOTEST) ./... | $(COLORIZE)"
Copy link
Member Author

Choose a reason for hiding this comment

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

tests in cmd/opentelemetry-collector are excluded bc it is a separate go module. I have found only this workaround.

It prints this when go test ./.. is executed from the root dir

go: directory cmd/opentelemetry-collector is outside main module
go: directory cmd/opentelemetry-collector/app/defaults is outside main module
go: directory cmd/opentelemetry-collector/app/exporter is outside main module
go: directory cmd/opentelemetry-collector/app/exporter/kafka is outside main mo

@pavolloffay pavolloffay requested a review from objectiser March 23, 2020 16:32
@codecov
Copy link

codecov bot commented Mar 23, 2020

Codecov Report

Merging #2135 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2135      +/-   ##
==========================================
+ Coverage   96.11%   96.13%   +0.02%     
==========================================
  Files         218      218              
  Lines       10564    10567       +3     
==========================================
+ Hits        10154    10159       +5     
  Misses        353      353              
+ Partials       57       55       -2     
Impacted Files Coverage Δ
pkg/config/tlscfg/options.go 100.00% <ø> (ø)
plugin/storage/kafka/factory.go 100.00% <100.00%> (ø)
plugin/storage/kafka/options.go 93.68% <100.00%> (ø)
plugin/storage/badger/spanstore/reader.go 96.79% <0.00%> (ø)
cmd/query/app/server.go 94.52% <0.00%> (+2.73%) ⬆️

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 87c466d...f6cb8da. Read the comment docs.

if err != nil {
return nil, err
}
return create(f, config)
Copy link
Member Author

Choose a reason for hiding this comment

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

Only this line is not being covered from the whole PR. I cannot pass the initialization, there is no way to change the objects in the Kafka config for mocked builders.

Copy link
Member Author

Choose a reason for hiding this comment

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

@yurishkuro any idea how to fix the coverage? Even though only a single line is not covered the total is:

ok  	github.com/jaegertracing/jaeger/cmd/opentelemetry-collector/app/exporter/kafka	0.767s	coverage: 94.7% of statements

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 - just some minor things to clarify.

cmd/opentelemetry-collector/app/exporter/kafka/factory.go Outdated Show resolved Hide resolved
pkg/kafka/auth/kerberos.go Outdated Show resolved Hide resolved
pkg/kafka/auth/kerberos.go Outdated Show resolved Hide resolved
config producer.Configuration
topic string
encoding string
Config producer.Configuration `mapstructure:",squash"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need mapstructure:"producer....?

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 was thinking about it, but given it is scoped under exporters it does not make much sense.

@pavolloffay pavolloffay reopened this Mar 24, 2020
@pavolloffay
Copy link
Member Author

Travis does not want to report the result. hence reopening the PR

@pavolloffay
Copy link
Member Author

@yurishkuro feel free to comment. I will fix anything in a follow-up PR.

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.

Exporter for Kafka (Storage)
2 participants