Comments (2)
GrpcClientAutoConfiguration 中
if (bean instanceof Tracer) {
this.registry.addClientInterceptors(new TraceClientInterceptor((Tracer) bean, new MetadataInjector()));
}
执行不到,你可以主动添加试试看,我这里自己加了就好了
`protected static class TraceClientAutoConfiguration {
@Autowired
Tracer tracer;
@Bean
public BeanPostProcessor clientInterceptorPostProcessor(GlobalClientInterceptorRegistry registry) {
System.out.println(this.tracer);
//解决调用链问题
registry.addClientInterceptors(new TraceClientInterceptor(tracer, new MetadataInjector()));
return new ClientInterceptorPostProcessor(registry);
}
private static class ClientInterceptorPostProcessor implements BeanPostProcessor {
private GlobalClientInterceptorRegistry registry;
public ClientInterceptorPostProcessor(
GlobalClientInterceptorRegistry registry) {
this.registry = registry;
}
@Override
public Object postProcessBeforeInitialization(Object bean,
String beanName)
throws BeansException {
return bean;
}
@Override
public Object postProcessAfterInitialization(Object bean,
String beanName)
throws BeansException {
if (bean instanceof Tracer) {
this.registry.addClientInterceptors(new TraceClientInterceptor((Tracer) bean, new MetadataInjector()));
}
return bean;
}
}
}`
from grpc-spring.
@xiaomin0322 在 1.4.1.RELEASE 中已经 fix 了
from grpc-spring.
Related Issues (20)
- HTTP/2 client preface string missing or corrupt HOT 5
- Received grpc requests twice HOT 3
- grpc 正向代理
- Spring Security AccessDecisionManager is deprecated. What's the alternative? HOT 1
- SSLContextGrpcAuthenticationReader reads the wrong certificate from the peer certificates array HOT 2
- [Docs] gRPC-Spring-Boot-Starter Documentation: Getting Started - Project Setup (Server and Client) Exhibitory Imagery HOT 3
- Only in the Kubernetes environment, adding the server.servlet.context-path parameter to the spring boot web results in GRPC server startup failure HOT 1
- Add support for grpc-servlet
- Update gRPC to 1.63 due to client retry fixed in this version of gRPC HOT 1
- Add custom metadata HOT 9
- GrpcExceptionListener handle exceptions outside of observation scope HOT 2
- GRPC health check using actuator HOT 1
- How to disable grpc-spring-boot-starter? HOT 1
- how to can exclude grpc-inprocess
- Security scans findings HOT 3
- Metric grpc_server_processing_duration_seconds_max is always 0 HOT 2
- Failed to release a message: UnpooledSlicedByteBuf(freed) HOT 3
- GRPC server graceful shutdown HOT 15
- grails can not work HOT 7
- Getting "Could not generate CGLIB subclass of class" error after upgrading to version 3.1.0.RELEASE HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grpc-spring.