-
Notifications
You must be signed in to change notification settings - Fork 802
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
CallOptions.withStreamTracerFactory api #954
Comments
@ST-DDT please guide. |
The same way as in plain grpc java.
Please don't ping me if you posted the issues just a few hours ago. |
@ST-DDT Sorry accidentally tagged you here... wanted to tag on https://github.com/yidongnan/grpc-spring-boot-starter/issues/951 Thanks for your reply. |
@ST-DDT please help Not able to find withStreamTracerFactory in both the options GrpcChannelConfigurer or StubTransformer. Tried this but not sure if this will replace any existing ClientStreamTracker or not.
|
@ST-DDT Grpc-java suggested to use newStub(channel, callOptions) grpc/grpc-java#2143, How to go about it in grpc-spring-boot-starter ? |
You can replace the stub with a stub transformer or provide a custom stub factory. But it was also mentioned that you could use an interceptor to set it. Which I would recommend. |
Not sure how to attach Tracer with interceptor. This is how we create stub. This is the client tracer that i need to attach.
@ST-DDT please guide. |
Somewhat like this: @GrpcGlobalClientInterceptor
class MyInterceptor implements ClientInterceptor {
@Override
public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next) {
return next.newCall(method, callOptions.withStreamTracerFactory(tracerFactory));
}
} |
Wanted to use below grpc-java api's to trace network issues / retry logging.
How i can use these with spring grpc ?
The text was updated successfully, but these errors were encountered: