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

split otlp/otlphttp/logging exporters #6343

Merged
merged 7 commits into from
Oct 25, 2022

Conversation

codeboten
Copy link
Contributor

@codeboten codeboten commented Oct 18, 2022

This PR does the following creates separate modules for otlp/otlphttp/logging exporters

Fixes #6194 #6195 #6196

@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Base: 91.76% // Head: 91.40% // Decreases project coverage by -0.36% ⚠️

Coverage data is based on head (2c5ad4a) compared to base (396964d).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6343      +/-   ##
==========================================
- Coverage   91.76%   91.40%   -0.37%     
==========================================
  Files         236      236              
  Lines       13478    13478              
==========================================
- Hits        12368    12319      -49     
- Misses        880      935      +55     
+ Partials      230      224       -6     
Impacted Files Coverage Δ
receiver/otlpreceiver/encoder.go 47.82% <0.00%> (-26.09%) ⬇️
receiver/otlpreceiver/otlphttp.go 45.37% <0.00%> (-18.52%) ⬇️
config/configgrpc/configgrpc.go 86.91% <0.00%> (-4.68%) ⬇️
receiver/otlpreceiver/otlp.go 84.96% <0.00%> (-2.62%) ⬇️
exporter/exporterhelper/traces.go 85.00% <0.00%> (-1.67%) ⬇️
exporter/exporterhelper/queued_retry.go 95.23% <0.00%> (-0.74%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@codeboten codeboten marked this pull request as ready for review October 19, 2022 18:53
@codeboten codeboten requested review from a team and mx-psi October 19, 2022 18:53
@codeboten codeboten changed the title [wip] split exporters split otlp/otlphttp/logging exporters Oct 19, 2022
.chloggen/split-exporters.yaml Show resolved Hide resolved
exporter/go.mod Outdated
go.opentelemetry.io/collector v0.0.0-00010101000000-000000000000
go.opentelemetry.io/collector/pdata v0.62.1
go.opentelemetry.io/otel v1.11.0
go.opentelemetry.io/otel/sdk v1.11.0
Copy link
Member

Choose a reason for hiding this comment

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

Not immediately problematic, but this direct dependency on the OTel Go SDK in an instrumented library that should only use the API is something we recommend avoiding. In the go-contrib repo we have done this by having a subordinate test module that can depend on the SDK tracetest packages and the like. It presents a good and reliable signal to consumers that an instrumentation library is not going to attempt to modify your SDK configuration when it doesn't require the SDK module at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

exporter/go.mod is no longer in this PR, but I see what you're saying. as the exporterhelper is back in the collector module (which depends on the sdk for different reasons), i think it's ok for now, but if the exporterhelper gets split into its own module, we could do what you're suggesting here to avoid taking on a dependency on the sdk for the tests alone.

.chloggen/split-exporters.yaml Outdated Show resolved Hide resolved
@@ -18,6 +18,9 @@ module-sets:
modules:
- go.opentelemetry.io/collector
- go.opentelemetry.io/collector/cmd/builder
- go.opentelemetry.io/collector/exporter/loggingexporter
Copy link
Member

Choose a reason for hiding this comment

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

Was this added manually? Or is this the one that is managed by multimod?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Manually to get multimod-verify to pass

@mx-psi
Copy link
Member

mx-psi commented Oct 21, 2022

How do we make contrib tests pass? I don't see a way out of it at the moment

@codeboten
Copy link
Contributor Author

How do we make contrib tests pass? I don't see a way out of it at the moment

This may be a good reason to use exporters rather than exporter in the package name. It would allow us to provide a deprecation path by adding aliases in exporter pointing users to migrate to exporters

Any thoughts @jpkrohling @bogdandrutu @dmitryax @Aneurysm9?

@mx-psi the alternative is to update contrib in a follow up PR.

exporter/Makefile Outdated Show resolved Hide resolved
@mx-psi
Copy link
Member

mx-psi commented Oct 24, 2022

@mx-psi the alternative is to update contrib in a follow up PR.

IMO this is okay, but we would need a mechanism for skipping contrib tests then (Skip contrib label?)

@codeboten
Copy link
Contributor Author

@mx-psi the alternative is to update contrib in a follow up PR.

IMO this is okay, but we would need a mechanism for skipping contrib tests then (Skip contrib label?)

I didn't realize "Skip contrib" was a label we had :D

Alex Boten and others added 5 commits October 25, 2022 08:12
This PR does the following creates separate modules for otlp/otlphttp/logging exporters

Fixes open-telemetry#6194 open-telemetry#6195 open-telemetry#6196
Co-authored-by: Juraci Paixão Kröhling <juraci.github@kroehling.de>
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
@codeboten codeboten merged commit ee2175d into open-telemetry:main Oct 25, 2022
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.

Split loggingexporter on its own module
5 participants