jaegertracing / jaeger-analytics-java

Data analytics pipeline and models for tracing data
Apache License 2.0
45 stars 24 forks source link

Testcontainer query does not work with current jaeger #64

Open hacst opened 3 years ago

hacst commented 3 years ago

Describe the bug Trying to establish a gRPC connection to 16686 fails with the current jaegertracing/all-in-one:1.24.0 as it is not http2 and presumably not gRPC. As documented in https://www.jaegertracing.io/docs/1.24/deployment/#query-service--ui gRPC query functionality is on port 16685 instead of 16686.

I created a patch at https://github.com/hacst/jaeger-analytics-java/commit/774959448921d0370217fa3fd1d89800715cbda9 (untested right now) but I'm unsure how involved this would be to get landed.

To Reproduce Steps to reproduce the behavior:

Any operation on the QueryServiceBlockingStub which initiates a request will fail with a failure to establish the underlying HTTP2 channel:

JaegerAllInOne jaeger = new JaegerAllInOne("jaegertracing/all-in-one:1.24.0")
jaeger.start();
jaeger.createBlockingQueryService().findTraces(...)

Expected behavior Query completes without any connectivity issues

Version (please complete the following information):

hacst commented 3 years ago

Workaround for the meantime:

class FixedJaegerAllInOne extends JaegerAllInOne {
  public static final int JAEGER_GRPC_QUERY_PORT = 16685;
  public FixedJaegerAllInOne(String dockerImageName) {
      super(dockerImageName);
      withExposedPorts(JAEGER_ADMIN_PORT,
              JAEGER_COLLECTOR_THRIFT_PORT,
              JAEGER_COLLECTOR_GRPC_PORT,
              JAEGER_QUERY_PORT,
              ZIPKIN_PORT,
              JAEGER_GRPC_QUERY_PORT); // << Added grpc endpoint
  }

  @Override
  public QueryServiceBlockingStub createBlockingQueryService() {
      ManagedChannel channel = ManagedChannelBuilder.forTarget(
              String.format("%s:%d", jaeger.getContainerIpAddress(), jaeger.getMappedPort(JAEGER_GRPC_QUERY_PORT))).usePlaintext().build();
      return QueryServiceGrpc.newBlockingStub(channel);
  }
}
JaegerAllInOne jaeger = new FixedJaegerAllInOne("jaegertracing/all-in-one:1.24.0");
wakingrufus commented 1 month ago

Thanks for the workaround @hacst !!