Java Code Examples for brave.propagation.ThreadLocalSpan#create()
The following examples show how to use
brave.propagation.ThreadLocalSpan#create() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TracingChannelInterceptor.java From spring-cloud-sleuth with Apache License 2.0 | 6 votes |
TracingChannelInterceptor(Tracing tracing, Propagation.Setter<MessageHeaderAccessor, String> setter, Propagation.Getter<MessageHeaderAccessor, String> getter) { this.tracing = tracing; this.tracer = tracing.tracer(); this.threadLocalSpan = ThreadLocalSpan.create(this.tracer); this.injector = tracing.propagation().injector(setter); this.extractor = tracing.propagation().extractor(getter); this.integrationObjectSupportPresent = ClassUtils.isPresent( "org.springframework.integration.context.IntegrationObjectSupport", null); this.hasDirectChannelClass = ClassUtils .isPresent("org.springframework.integration.channel.DirectChannel", null); this.directWithAttributesChannelClass = ClassUtils .isPresent(STREAM_DIRECT_CHANNEL, null) ? ClassUtils.resolveClassName(STREAM_DIRECT_CHANNEL, null) : null; }
Example 2
Source File: ZipkinHttpClientImpl.java From ratpack-zipkin with Apache License 2.0 | 5 votes |
@Inject public ZipkinHttpClientImpl(final HttpClient delegate, final HttpTracing httpTracing) { this.delegate = delegate; this.threadLocalSpan = ThreadLocalSpan.create(httpTracing.tracing().tracer()); this.currentTraceContext = httpTracing.tracing().currentTraceContext(); this.nextThreadLocalSpan = new NextSpan(threadLocalSpan, httpTracing.clientSampler()); this.handler = HttpClientHandler.create(httpTracing, ADAPTER); this.injector = httpTracing.tracing().propagation().injector(MutableHeaders::set); }
Example 3
Source File: TraceMongoCommandListener.java From brave with Apache License 2.0 | 4 votes |
TraceMongoCommandListener(MongoDBTracing mongoDBTracing) { this(ThreadLocalSpan.create(mongoDBTracing.tracing.tracer())); }