-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
OTLP Exporter: Forklift and internalize Google.Protobuf #4396
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4396 +/- ##
===========================================
- Coverage 84.75% 63.49% -21.26%
===========================================
Files 300 392 +92
Lines 12010 18131 +6121
===========================================
+ Hits 10179 11513 +1334
- Misses 1831 6618 +4787
|
|
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.
Two reasons to block the PR for now:
- Need to figure out whether copying more than one hundred files is the right path forward (considering all the future obligations of security hotfixes and patches).
- Need to understand the licensing / legal implications.
I suspect these options would present the same concern for the opentelemetry-dotnet-instrumentation project. Though, @Kielek can weigh in.
For the reason of hotfixes/patches, if we seek to internalize anything - whether it be Google.Protobuf of protobuf-net - I'm beginning to lean more towards looking at ILRepack. Though, I'm not interested in spending much more time on this if I know up front that we're not keen on internalizing anything. Maybe @Kielek can share how this would affect the auto-instrumentation project.
This is likely a concern whether we copy code or use a tool like ILRepack. BSD-3 is a permissive license as I understand it, but I'm not a lawyer. Does the CNCF have a process for this? |
Just a point of reference from opentelemetry-java. They have copied some portions of Java's protobuf library. Albeit much less than what is in this PR, because they've rolled most of their own serialization. Ideally, this is a direction we might consider as well in the future. |
This is actually option 4 😆 - that is, don't internalize anything. My thought behind #4395 was to have the discussion about the viability of internalizing Google.Protobuf out in the open with the intent that it would be an intermediate step towards "option 7". I agree option 7 is where we want to go in the long run. There's no reason for us to make a hasty decision to internalize or not. Though, I am interested in providing some help to the opentelemetry-dotnet-instrumentation project in the near term. Here's an alternate proposal:
@CodeBlanch what do you think about this? My presumption is that doing the work to perform our own serialization will likely not be complete in our timeline for 1.5, so best to revert #4201 for now and see if we can sort this out for 1.6. |
Here is my suggestion (from most preferred to least preferred):
|
Some updates from my conversation with the .NET team:
|
??? Google.Protobuf is the library that works with AOT. protobuf-net uses a lot of dynamic code generation
gRPC code generation uses Google.Protobuf. I don't know whether it would be possible to use an internal copy. |
Appreciate your input @JamesNK 👍 I should clarify that I was relaying messages based on what I heard from several folks, I have no expertise in protobuf so you need to verify what I put above - FYI @alanwest |
To echo James' point: yes, currently protobuf-net uses ref-emit at runtime, because it was originally designed for code-first scenarios; AOT focus is in progress, via Roslyn analyzers for code-first, and the regular code-gen for contract-first, but: the AOT story is not complete today.
That would be @mgravell |
Yes, thank you for both your input, @JamesNK and @mgravell!
@mgravell in #4430, I'm using the contract-first approach and using protobuf-net.BuildTools to perform code-gen. Will AOT support be a concern here? |
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Solution for #4395 by forklifting Google.Protobuf into the OTLP exporter project.
This PR copies the code from Google.Protobuf @ v3.22. The code is modified to suppress Stylecop and mark all public items internal.
Options to consider: