-
Notifications
You must be signed in to change notification settings - Fork 34
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
Creates the base files for generating go protobufs #1
Creates the base files for generating go protobufs #1
Conversation
|
5ed7a81
to
8c578a8
Compare
This simplified generation, and means we require only docker and rsync
Did we consider the approach of generating language-specific packages from a Github action in opentelemetry-proto, rather than creating a separate repo that includes the protos as a submodule, needs to be updated, etc.? In the case of Go, the generated artifact would need to live in its own Github repo of course, but that repo would be purely for automated updates. |
My understanding is that the maintainers of opentelemetry-proto do not want to support N-language generation in that repository. It is up to the individual language SIGs to support this kind of effort. |
@punya yes we have discussed this. Please see open-telemetry/opentelemetry-proto#79 for context. |
The final import is now going to be like `go.opentelemetry.io/proto/otlp/trace/v1`
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.
Can we checkout the proto submodule into an internal package so external dependencies on that code are made here?
Fixed the readme. What is the ask with the proto files? Do you want the submodule which holds the |
Looking a bit more into the ask I'm not sure it is valid, but here's a description of what I was thinking. By creating the opentelemetry-proto submodule at a top-level users will be able to I took another look at the proto repo and it doesn't look like there is any Go code in the repo anymore so this is probably not a concern. However, it might make things a bit cleaner if instead of instantiating the opentelemetry-proto submodule at a path of |
Just to add to that, even if there were go code its mod file wouldn't match that directory, and you would get an import mismatch. Playing around I moved I don't think it matters for this, as this is all non-imported or persisted code. I also think that we would be better served by a CI check that the root go.mod doesn't change. I.E. there shouldn't be anything imported by the root level, as there is no code. |
All good points and ideas. Sounds like we can disregard my comment about moving the path. I think we can include that check you described at a later time as well so as to not have the scope of this PR creep too much. |
@bogdandrutu any other thoughts before we merge this? |
Summary
This PR aims to start the conversation around putting the generated protobuf files into a consumable module.
There are several places where these files are generated but are done internally so that other projects can't consume them. This takes the generation code from opentelemetry-go as a base to generate the protobufs that will eventually be consumed.
Things not addressed
go.opentelemetry.io/proto
. This is easily changed.Resolves #2