Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
nit fix
  • Loading branch information
thugrock7 committed Feb 7, 2025
commit 0b094c4b1c1f561d96c1ec00ccfea5c2752d6810
2 changes: 1 addition & 1 deletion instrumentation/grpc-1.6/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ muzzle {
module = "grpc-core"
versions = "[1.6.0,)"

//extraDependency("com.google.protobuf:protobuf-java:3.3.1")
extraDependency("com.google.protobuf:protobuf-java:3.3.1")
extraDependency("io.grpc:grpc-netty:1.6.0")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.javaagent.instrumentation.hypertrace.com.google.protobuf.DescriptorProtos.FileDescriptorProto;
import io.opentelemetry.javaagent.instrumentation.hypertrace.com.google.protobuf.Descriptors;
import com.google.protobuf.Descriptors;
import io.opentelemetry.javaagent.instrumentation.hypertrace.com.google.protobuf.Descriptors.Descriptor;
import io.opentelemetry.javaagent.instrumentation.hypertrace.com.google.protobuf.Descriptors.FileDescriptor;
import io.opentelemetry.javaagent.instrumentation.hypertrace.com.google.protobuf.DynamicMessage;
import io.opentelemetry.javaagent.instrumentation.hypertrace.com.google.protobuf.Message;
import com.google.protobuf.Message;
import io.opentelemetry.javaagent.instrumentation.hypertrace.com.google.protobuf.util.JsonFormat;

public class ProtobufRoundTripConverter {
Expand All @@ -49,7 +49,8 @@ public static DynamicMessage convertToRelocatedDynamicMessage(Object message) th

// 3. Get the unrelocated file descriptor and its proto representation.
Descriptors.FileDescriptor unrelocatedFileDescriptor = originalDescriptor.getFile();
FileDescriptorProto unrelocatedFileProto = unrelocatedFileDescriptor.toProto();
com.google.protobuf.DescriptorProtos.FileDescriptorProto unrelocatedFileProto =
unrelocatedFileDescriptor.toProto();
byte[] fileProtoBytes = unrelocatedFileProto.toByteArray();

// 4. Parse the file descriptor proto using relocated classes.
Expand Down