-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZIO Telemetry and ZIO grpc #544
Comments
Hi @omidb , I am not familiar with zio-telemetry. It sounds like zio-telemetry doesn't work in conjunction with zio-grpc (and not the other way around). I wouldn't expect to have resources to debug zio-telemetry itself and understand why it doesn't emit metrics - I suggest to investigate this with the zio-telemetry project. |
(That's not to suggest it's not caused by something within zio-grpc problem, I'd be happy to accept a bug report/PR that specifies an unexpected behavior in terms of zio-grpc) |
@thesamet I will be working with telemetry team to figure this out. I had a question though. It seems that I need to do something like this: https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/grpc-1.6/library
|
These are grpc-java inceptors, so fortunately you can use them directly without zio-grpc in the way. In the client-side,
|
I have a full example now that works for the future users: val openTelemetry = GlobalOpenTelemetry.get()
val grpcTelemetry = GrpcTelemetry.create(openTelemetry)
val intercept = GrpcTelemetry.create(openTelemetry).newServerInterceptor()
val serverLayer = ServerLayer.fromServiceList(
io.grpc.ServerBuilder
.forPort(9090)
.intercept(intercept)
.addService(ProtoReflectionService.newInstance()),
ServiceList
.addFromEnvironment[Welcomer]
) on the client side: val openTelemetry = GlobalOpenTelemetry.get()
val grpcTelemetry = GrpcTelemetry.create(openTelemetry);
val clientLayer: Layer[Throwable, GreeterClient] =
GreeterClient.live(
ZManagedChannel(
ManagedChannelBuilder
.forAddress("localhost", 9090)
.intercept(grpcTelemetry.newClientInterceptor())
.usePlaintext()
)
) |
Hi,
I can easily run this example form ZIO telemetry: https://zio.dev/zio-telemetry/opentelemetry-instrumentation-example
This uses ZIO http and Open Telemetry. I have created the same thing using the ZIO grpc but I'm not successful.
I don't see any spans or my services in Jaeger. Although I see it with the ZIO http example.
What am I missing?
and here is the client:
to launch them:
first this:
and then we can launch the services.
and
The text was updated successfully, but these errors were encountered: