admin
2022-01-12 c9fdff7d45ae118eac10397d8f34661e9f2e968a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.ks.lijin.config;
 
import org.springframework.context.annotation.Configuration;
 
@Configuration
public class ZipkinConfiguration {
 
//
//    @Value("${zipkin.http.sender.address}")
//    private String address;
//
//    @Value("${zipkin.http.sender.connectTimeout}")
//    private int connectTimeout;
//
//    @Value("${zipkin.http.sender.readTimeout}")
//    private int readTimeout;
//
//    @Value("${zipkin.brave.name}")
//    private String braveName;
//
//
//    @Bean
//    public Tracing tracing() {
//        Sender sender = OkHttpSender.create(address);
//        AsyncReporter reporter = AsyncReporter.builder(sender)
//                .closeTimeout(connectTimeout, TimeUnit.MILLISECONDS)
//                .messageTimeout(readTimeout, TimeUnit.MILLISECONDS)
//                .build();
//        Tracing tracing = Tracing.newBuilder()
//                .localServiceName(braveName)
//                .propagationFactory(ExtraFieldPropagation.newFactory(B3Propagation.FACTORY, "shiliew"))
//                .sampler(Sampler.ALWAYS_SAMPLE)
//                .spanReporter(reporter)
//                .build();
//        return tracing;
//    }
 
}