本文整理了Java中brave.Tracing.propagation()
方法的一些代码示例,展示了Tracing.propagation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tracing.propagation()
方法的具体详情如下:
包路径:brave.Tracing
类名称:Tracing
方法名:propagation
[英]When a trace leaves the process, it needs to be propagated, usually via headers. This utility is used to inject or extract a trace context from remote requests.
[中]当跟踪离开进程时,它需要传播,通常是通过头。此实用程序用于从远程请求中注入或提取跟踪上下文。
代码示例来源:origin: openzipkin/brave
KafkaStreamsTracing(Builder builder) { // intentionally hidden constructor
this.tracing = builder.tracing;
this.extractor = tracing.propagation().extractor(KafkaStreamsPropagation.GETTER);
}
代码示例来源:origin: openzipkin/brave
JmsTracing(Builder builder) { // intentionally hidden constructor
this.tracing = builder.tracing;
this.extractor = tracing.propagation().extractor(GETTER);
this.remoteServiceName = builder.remoteServiceName;
this.propagationKeys = new LinkedHashSet<>(tracing.propagation().keys());
}
代码示例来源:origin: openzipkin/brave
TracingJMSProducer(JMSProducer delegate, JmsTracing jmsTracing) {
super(delegate, jmsTracing);
this.extractor = jmsTracing.tracing.propagation().extractor(GETTER);
}
代码示例来源:origin: openzipkin/brave
/**
* {@link ExtensionLoader} supplies the tracing implementation which must be named "tracing". For
* example, if using the {@link SpringExtensionFactory}, only a bean named "tracing" will be
* injected.
*/
public void setTracing(Tracing tracing) {
tracer = tracing.tracer();
extractor = tracing.propagation().extractor(GETTER);
injector = tracing.propagation().injector(SETTER);
}
代码示例来源:origin: spring-cloud/spring-cloud-sleuth
TraceContext.Injector<ClientRequest.Builder> injector() {
if (this.injector == null) {
this.injector = this.beanFactory.getBean(HttpTracing.class).tracing()
.propagation().injector(SETTER);
}
return this.injector;
}
代码示例来源:origin: spring-cloud/spring-cloud-sleuth
TraceContext.Extractor<HttpHeaders> extractor() {
if (this.extractor == null) {
this.extractor = this.beanFactory.getBean(HttpTracing.class).tracing()
.propagation().extractor(GETTER);
}
return this.extractor;
}
代码示例来源:origin: openzipkin/brave
@Inject TracingClientFilter(HttpTracing httpTracing) {
if (httpTracing == null) throw new NullPointerException("HttpTracing == null");
tracer = httpTracing.tracing().tracer();
handler = HttpClientHandler.create(httpTracing, new HttpAdapter());
injector = httpTracing.tracing().propagation().injector(SETTER);
}
代码示例来源:origin: openzipkin/brave
TracingHttpAsyncClientBuilder(HttpTracing httpTracing) { // intentionally hidden
if (httpTracing == null) throw new NullPointerException("httpTracing == null");
this.currentTraceContext = httpTracing.tracing().currentTraceContext();
this.handler = HttpClientHandler.create(httpTracing, new HttpAdapter());
this.injector = httpTracing.tracing().propagation().injector(SETTER);
}
代码示例来源:origin: openzipkin/brave
@Autowired TracingAsyncClientHttpRequestInterceptor(HttpTracing httpTracing) {
tracer = httpTracing.tracing().tracer();
handler = HttpClientHandler.create(httpTracing, new HttpAdapter());
injector = httpTracing.tracing().propagation().injector(SETTER);
}
代码示例来源:origin: openzipkin/brave
@Inject TracingApplicationEventListener(HttpTracing httpTracing, EventParser parser) {
tracer = httpTracing.tracing().tracer();
serverHandler = HttpServerHandler.create(httpTracing, new Adapter());
extractor = httpTracing.tracing().propagation().extractor(GETTER);
this.parser = parser;
}
代码示例来源:origin: openzipkin/brave
@Autowired TracingClientHttpRequestInterceptor(HttpTracing httpTracing) {
tracer = httpTracing.tracing().tracer();
handler = HttpClientHandler.create(httpTracing, new HttpAdapter());
injector = httpTracing.tracing().propagation().injector(SETTER);
}
代码示例来源:origin: openzipkin/brave
SparkTracing(HttpTracing httpTracing) { // intentionally hidden constructor
tracer = httpTracing.tracing().tracer();
handler = HttpServerHandler.create(httpTracing, ADAPTER);
extractor = httpTracing.tracing().propagation().extractor(Request::headers);
}
代码示例来源:origin: openzipkin/brave
TracingInterceptor(HttpTracing httpTracing) {
if (httpTracing == null) throw new NullPointerException("HttpTracing == null");
tracer = httpTracing.tracing().tracer();
remoteServiceName = httpTracing.serverName();
handler = HttpClientHandler.create(httpTracing, new HttpAdapter());
injector = httpTracing.tracing().propagation().injector(SETTER);
}
代码示例来源:origin: spring-cloud/spring-cloud-sleuth
TracingDoOnRequest(HttpTracing httpTracing) {
this.tracer = httpTracing.tracing().tracer();
this.handler = HttpClientHandler.create(httpTracing, new HttpAdapter());
this.propagation = httpTracing.tracing().propagation();
this.injector = this.propagation.injector(SETTER);
this.httpTracing = httpTracing;
}
代码示例来源:origin: openzipkin/brave
TracingMainExec(HttpTracing httpTracing, ClientExecChain mainExec) {
this.tracer = httpTracing.tracing().tracer();
this.handler = HttpClientHandler.create(httpTracing, new HttpAdapter());
this.injector = httpTracing.tracing().propagation().injector(SETTER);
this.mainExec = mainExec;
}
代码示例来源:origin: openzipkin/brave
TracingRoutingContextHandler(HttpTracing httpTracing) {
tracer = httpTracing.tracing().tracer();
serverHandler = HttpServerHandler.create(httpTracing, new VertxHttpServerAdapter());
extractor = httpTracing.tracing().propagation().extractor(GETTER);
}
代码示例来源:origin: spring-cloud/spring-cloud-sleuth
AbstractHttpHeadersFilter(HttpTracing httpTracing) {
this.tracer = httpTracing.tracing().tracer();
this.handler = HttpClientHandler.create(httpTracing, new ServerHttpAdapter());
this.injector = httpTracing.tracing().propagation().injector(SETTER);
this.httpTracing = httpTracing;
}
代码示例来源:origin: spring-cloud/spring-cloud-sleuth
TracingFeignClient(HttpTracing httpTracing, Client delegate) {
this.tracer = httpTracing.tracing().tracer();
this.handler = HttpClientHandler.create(httpTracing, new HttpAdapter());
this.injector = httpTracing.tracing().propagation().injector(SETTER);
this.delegate = delegate;
}
代码示例来源:origin: openzipkin/brave
TracingFilter(HttpTracing httpTracing) {
tracer = httpTracing.tracing().tracer();
currentTraceContext = httpTracing.tracing().currentTraceContext();
handler = HttpServerHandler.create(httpTracing, ADAPTER);
extractor = httpTracing.tracing().propagation().extractor(GETTER);
}
代码示例来源:origin: openzipkin/brave
TracingHttpServerHandler(HttpTracing httpTracing) {
tracer = httpTracing.tracing().tracer();
sampler = httpTracing.serverSampler();
parser = httpTracing.serverParser();
adapter = new HttpNettyAdapter();
extractor = httpTracing.tracing().propagation().extractor(GETTER);
}
内容来源于网络,如有侵权,请联系作者删除!