-
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
Split go.opentelemetry.io/proto module to exclude grpc dependencies #100
Comments
Creating a This would be problematic for someone who would try to only bump The alternatives I see are:
CC @open-telemetry/go-approvers @open-telemetry/collector-approvers |
Would the idea be that we keep up to date the How long will the |
The idea is to:
|
Where will the server definitions be defined? |
|
Aren't they already defined in |
I think it would be inconvenient to support v1 and v2 at the same time. I would rather prefer separate go module like go.opentelemetry.io/proto/otlp/light. However, there is also an issue from maitainance perspective that we would need to set the I can try experimenting and showcase it on a fork. |
I created #154
I created #155 |
@pellared How do you plan to support both at the same time after this PR is merged? Any subsequent proto changes will only apply to v2, no? You won't be able to generate v1 code anymore. So v1 becomes obsolete as soon as any other change to the proto is made. Am I missing something? |
An alternate way that does not require any changes to the proto repo: patch the proto files locally in this repo. That would allow you to continue supporting both v1 and v2 at the same time from the same proto file even if the proto files evolve. You can generate twice, once per version. We have a precedent for patching protos before generation: the Collector does it. |
Correct. I described in #154 that the v1 would be deprecated.
If I understand correctly this is exactly what I propose here #155. I have no opinion which approach is better. Each has its pros and cons. EDIT: This #155 is probably better as:
|
Go SIG meeting: |
The generated files in the collector/ have 3 parts. The data structure, grpc client and grpc server. They are all packed in the same module file. grpc dependencies are brought in and compiled in the output even if the client is only using http/otlp. The go compiler cannot decide if the grpc code is in use or not (my guess is due to some interfaces) therefore my suggestion is to solve it in the go package layer.
The relevant thread is open-telemetry/opentelemetry-go#2579
I suggest to split the data structure files in one module, grpc files in another module. This would be of course backwards compatible change.
The text was updated successfully, but these errors were encountered: