Skip to content

feat: use shaded protobuf-java , instead of applications #414

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

Merged

Conversation

thugrock7
Copy link
Contributor

No description provided.

@thugrock7 thugrock7 marked this pull request as draft February 7, 2025 12:26
@thugrock7 thugrock7 marked this pull request as ready for review February 12, 2025 05:15
span.setAttribute(key, writer.toString());
} catch (IOException e) {
log.error("Failed to decode message to JSON", e);
String jsonOutput = ProtobufMessageConverter.getMessage(mb);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to do this? What was happening while we were directly trying to get it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the object we are getting is of com.google.protobuf.Message, this cannot directly be taken as instance of our relocated Message class.

Type Incompatibility: Relocated classes are essentially different types, so couldn’t simply cast one into the other without conversion.
Version Mismatch: two versions (e.g., 3.2.0 vs. 3.25.5) have incompatible internal representations. Like application is using protobuf version 3.2.0, but our bundled dependency of protobuf is 3.25.5.
Different Metadata: The unrelocated message carries descriptors/metadata) that the relocated version doesn't recognize directly.

@shashank11p shashank11p merged commit c5b39b1 into hypertrace:main Feb 14, 2025
9 checks passed
@thugrock7 thugrock7 deleted the protobuf-java-dependency-exclusion branch February 14, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants