com.github.kristofa.brave.http.HttpSpanCollector Java Examples
The following examples show how to use
com.github.kristofa.brave.http.HttpSpanCollector.
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: ZipkinConfig.java From spring-cloud-k8s-sample with Apache License 2.0 | 5 votes |
@Bean public SpanCollector spanCollector() { HttpSpanCollector.Config spanConfig = HttpSpanCollector.Config.builder().compressionEnabled(false)// 默认false,span在transport之前是否会被gzipped。 .connectTimeout(5000)// 5s,默认10s .flushInterval(1)// 1s .readTimeout(6000)// 5s,默认60s .build(); return HttpSpanCollector.create(zipkinServerUrl, spanConfig, new EmptySpanCollectorMetricsHandler()); }
Example #2
Source File: ZipkinConfig.java From spring-cloud-k8s-sample with Apache License 2.0 | 5 votes |
@Bean public SpanCollector spanCollector() { HttpSpanCollector.Config spanConfig = HttpSpanCollector.Config.builder().compressionEnabled(false)// 默认false,span在transport之前是否会被gzipped。 .connectTimeout(5000)// 5s,默认10s .flushInterval(1)// 1s .readTimeout(6000)// 5s,默认60s .build(); return HttpSpanCollector.create(zipkinServerUrl, spanConfig, new EmptySpanCollectorMetricsHandler()); }
Example #3
Source File: ZipkinConfig.java From spring-cloud-k8s-sample with Apache License 2.0 | 5 votes |
@Bean public SpanCollector spanCollector() { HttpSpanCollector.Config spanConfig = HttpSpanCollector.Config.builder().compressionEnabled(false)// 默认false,span在transport之前是否会被gzipped。 .connectTimeout(5000)// 5s,默认10s .flushInterval(1)// 1s .readTimeout(6000)// 5s,默认60s .build(); return HttpSpanCollector.create(zipkinServerUrl, spanConfig, new EmptySpanCollectorMetricsHandler()); }
Example #4
Source File: ZipkinConfig.java From spring-cloud-k8s-sample with Apache License 2.0 | 5 votes |
@Bean public SpanCollector spanCollector() { HttpSpanCollector.Config spanConfig = HttpSpanCollector.Config.builder().compressionEnabled(false)// 默认false,span在transport之前是否会被gzipped。 .connectTimeout(5000)// 5s,默认10s .flushInterval(1)// 1s .readTimeout(6000)// 5s,默认60s .build(); return HttpSpanCollector.create(zipkinServerUrl, spanConfig, new EmptySpanCollectorMetricsHandler()); }
Example #5
Source File: TracingConfig.java From x7 with Apache License 2.0 | 5 votes |
@ConditionalOnMissingBean(Brave.class) @ConditionalOnProperty( value = {"tracing.zipkin.url"}) @Bean public SpanCollector spanCollector() { HttpSpanCollector.Config config = HttpSpanCollector.Config.builder().compressionEnabled(properties.isCompressionEnabled()).connectTimeout(properties.getConnectTimeout()) .flushInterval(properties.getFlushInterval()).readTimeout(properties.getReadTimeout()).build(); return HttpSpanCollector.create(properties.getUrl(), config, new EmptySpanCollectorMetricsHandler()); }
Example #6
Source File: FeginZipkinTracingClient.java From msf4j with Apache License 2.0 | 5 votes |
/** * Constructor of FeginZipkinTracingClient. * * @param client * @param instanceName * @param zipkinUrl URL of the receiver of DAS server. */ public FeginZipkinTracingClient(Client client, String instanceName, String zipkinUrl) { this.clientDelegate = client; Brave.Builder builder = new Brave.Builder(instanceName); builder.spanCollector(HttpSpanCollector.create(zipkinUrl, new EmptySpanCollectorMetricsHandler())); Brave brave = builder.build(); requestInterceptor = brave.clientRequestInterceptor(); responseInterceptor = brave.clientResponseInterceptor(); }
Example #7
Source File: MSF4JZipkinTracingInterceptor.java From msf4j with Apache License 2.0 | 5 votes |
/** * Constructor of the MSF4JTracingInterceptor. * * @param microServiceName Name of the Microservice * @param zipkinUrl Base URL of the Zipkin server */ public MSF4JZipkinTracingInterceptor(String microServiceName, String zipkinUrl) { Brave.Builder builder = new Brave.Builder(microServiceName); builder.spanCollector(HttpSpanCollector.create(zipkinUrl, new EmptySpanCollectorMetricsHandler())); Brave brave = builder.build(); reqInterceptor = brave.serverRequestInterceptor(); respInterceptor = brave.serverResponseInterceptor(); }