GRPC Instrumentation not adding rpc.body to spans
shashank11p opened this issue · 2 comments
shashank11p commented
The GRPC instrumentation is not able to add rpc.request.body and rpc.response.body attributes to spans as the protobuf classes are shaded in the javaagent so the instrumentation looks for shaded classes, while during runtime the actual classes are used.
So we should not shade the protobuf dependencies in javaagent. But javaagent also needs to have protobuf dependency for config. So we need to have the protobuf in javaagent to be in agentClassLoader, and do not shade it so that GRPC instrumentation works.
pavolloffay commented
We should also include gRPC in our smoke tests and test the payload capture.
pavolloffay commented
The best way to resolve this is to:
- remove shading of config dependencies (protobuf, fasterxml...)
- put the config dependencies into agent classloader
- create config interface that will be backed by the implementation in the agent classloader.
- load the config in the component installer