Skip to content

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