Skip to content

gRPC client ClassNotFoundException #3445

Description

@AlasdairMacleanGlobal

Describe the bug

Version 1.3.1 of the javaagent when used in a project with gRPC clients logs an error and doesn't appear to instrument the gRPC clients.

Version 1.3.0 doesn't appear to have this issue.

Steps to reproduce

I've only reproduced this in a private project - if others can't immediately reproduce it I can create a stand-alone project.

Steps:

  • Starting with a Spring Boot project which configures a set of gRPC (1.28.0) clients
  • Run with -javaagent:opentelemetry-javaagent-all.jar version 1.3.1
  • At the point ManagedChannelBuilder.build() is called the error occurs

What did you expect to see?

No error

What did you see instead?

[otel.javaagent 2021-06-29 16:19:28:701 +0100] [main] WARN io.opentelemetry.javaagent.instrumentation.api.instrumenter.ReflectionPeerServiceAttributesExtractorFactory - Could not add PeerServiceAttributesExtractor wrapping io.opentelemetry.javaagent.shaded.instrumentation.grpc.v1_6.GrpcNetAttributesExtractor
java.lang.ClassNotFoundException: io/opentelemetry/javaagent/shaded/instrumentation/grpc/v1_6/GrpcNetAttributesExtractor

Full stack attached: stack.txt

What version are you using?

1.3.1

Environment

Compiler: OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
OS: MacOS Catalina 10.15.7

Additional context

  • The class io.opentelemetry.javaagent.shaded.instrumentation.grpc.v1_6.GrpcNetAttributesExtractor from the error doesn't seem to exist in the agent jar
  • Possibly a red herring, but could this be related to a recent change which looks to have moved gRPC ServiceAttributesExtractor: Fix PeerServiceAttributesExtractor#createUsingReflection() #3378 ?
  • The release notes for 1.3.1 mention it requires the 1.3.0 SDK (which I haven't added as a dependency) - could that be related? Worth noting the README "Getting Started" links to 1.3.1 agent jar currently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions