-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[exporter/otlp] split into its own module #6228
[exporter/otlp] split into its own module #6228
Conversation
4682b5a
to
2431d25
Compare
Codecov ReportBase: 92.04% // Head: 91.94% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #6228 +/- ##
==========================================
- Coverage 92.04% 91.94% -0.10%
==========================================
Files 219 219
Lines 13245 13245
==========================================
- Hits 12191 12178 -13
- Misses 830 843 +13
Partials 224 224
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. |
0843748
to
cd66232
Compare
I think we should send also a PR to remove https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/doc.go since it belongs (will) to a module without anything in that parent directory. Also think what we want to do with https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter#general-information since it feels strange that it belongs to a different module. Maybe we create a module "exporter" with all the exporters? |
I agree this makes sense once all the other exporters are split into their own modules.
This could likely be moved under the docs directory in something called exporter.md? Maybe there should be a components directory under docs?
What would the result of someone including that module be? All the exporters get pulled in? I wonder if it would be confusing for users as it may be unclear what exporters fall under that package. |
"All the exporters get pulled in" pulled in where? All the exporters are available in the module, if you talk about the builder you need 2 lines one for module and one for import. |
last one about this "structure" part: The error:
Is this something that we want to support in the future? Where do we consider to put a package for "common" things between exporters? One of the thought I had was that |
It looks to be related to this issue golang/go#30590, found starting from the code :)) https://cs.opensource.google/go/go/+/master:src/cmd/go/testdata/script/mod_dot.txt;l=30;bpv=1;bpt=0 |
This is to address open-telemetry#6195
ec4b0a4
to
c0786d5
Compare
Another update to this PR here:
Please take a look @open-telemetry/collector-approvers |
Renaming modules/packages is a significant breaking change for the API consumers. I believe this should be done with aliasing first. We should keep the old one for now. And create new module only with the references to the old package (not otherwise to prevent circular deps) |
Also I'm still not convinced that we have significant enough reasons to rename |
@@ -12,7 +12,7 @@ | |||
// See the License for the specific language governing permissions and | |||
// limitations under the License. | |||
|
|||
package otlpexporter // import "go.opentelemetry.io/collector/exporter/otlpexporter" | |||
package otlpgrpcexporter // import "go.opentelemetry.io/collector/exporters/otlpgrpcexporter" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we rename the package only but keep otlp
as the component name that used in configs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otlp
in the config applies to both grpc and http exporters, my opinion is that it's fine to separate config from package name, but i don't feel strongly about it. i can revert if that's preferable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otlp in the config applies to both grpc and http exporters,
otlphttpexporter uses otlphttp
https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/otlphttpexporter/factory.go#L33
I think we should keep module names consistent with the collector component names. I would vote for keeping otlpexporter
without renaming it. This seems like the most important one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry i was thinking of the receiver 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep it as otlpexporter
. It would otherwise be the only exporter with a mismatch between the Go module name and the configuration identifier.
Since this is the first time we'll publish these components as separate modules, it's the time to decide on what makes the most sense. The plural does make more sense if it's going to contain more than one exporter, and as i mentioned it does align with otel-go. That being said, I agree that deprecating/breaking the import path for users shouldn't be done lightly. |
@dmitryax the errors I mentioned will be removed if we rename the package since, "exporter" package will be free to use.
@dmitryax can you confirm that the errors I mentioned are ok long term? |
Closing in favour of #6343 |
Fixes #6195