This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "ztunnel_outbound", | |
"active_state": { | |
"version_info": "2022-09-13T11:17:20Z/5", | |
"listener": { | |
"@type": "type.googleapis.com/envoy.config.listener.v3.Listener", | |
"name": "ztunnel_outbound", | |
"address": { | |
"socket_address": { | |
"address": "0.0.0.0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"configs": [ | |
{ | |
"@type": "type.googleapis.com/envoy.admin.v2alpha.BootstrapConfigDump", | |
"bootstrap": { | |
"node": { | |
"id": "sidecar~10.40.0.17~ratings-v1-f745cf57b-kx8lf.default~default.svc.cluster.local", | |
"cluster": "ratings.default", | |
"metadata": { | |
"ISTIO_PROXY_SHA": "istio-proxy:c33dc49585e5e7b5f616c8b5377a5f1f52505e20", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
public class DBAccess { | |
@Traced | |
public void save2db() { | |
try { | |
Thread.sleep((long) (Math.random() * 100)); | |
} catch (InterruptedException e) { | |
e.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Aspect | |
@Component | |
public class TracingAspect { | |
@Autowired | |
Tracer tracer; | |
@Around("@annotation(com.zhaohuabing.demo.instrument.Traced)") | |
public Object aroundAdvice(ProceedingJoinPoint jp) throws Throwable { | |
String class_name = jp.getTarget().getClass().getName(); | |
String method_name = jp.getSignature().getName(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: jaeger-query | |
namespace: istio-system | |
annotations: | |
labels: | |
app: jaeger | |
jaeger-infra: jaeger-service | |
chart: tracing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bean | |
public Tracer jaegerTracer() { | |
// The following environment variables need to set | |
// JAEGER_ENDPOINT="http://10.42.126.171:28019/api/traces" | |
// JAEGER_PROPAGATION="b3" | |
// JAEGER_TRACEID_128BIT="true" Use 128bit tracer id to be compatible with the | |
// trace id generated by istio/envoy | |
return Configuration.fromEnv("eshop-opentracing").getTracer(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RequestMapping(value = "/checkout") | |
public String checkout(@RequestHeader HttpHeaders headers) { | |
String result = ""; | |
// Use HTTP GET in this demo. In a real world use case,We should use HTTP POST | |
// instead. | |
// The three services are bundled in one jar for simplicity. To make it work, | |
// define three services in Kubernets. | |
result += restTemplate.exchange("http://inventory:8080/createOrder", HttpMethod.GET, | |
new HttpEntity<>(passTracingHeader(headers)), String.class).getBody(); | |
result += "<BR>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version_info": "0", | |
"listener": { | |
"name": "0.0.0.0_1030", | |
"address": { | |
"socket_address": { | |
"address": "0.0.0.0", | |
"port_value": 1030 | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"clusterName": "outbound|15011||istio-pilot.istio-system.svc.cluster.local", | |
"endpoints": [ | |
{ | |
"locality": { | |
}, | |
"lbEndpoints": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"node": { | |
"id": "sidecar~192.168.206.23~productpage-v1-54b8b9f55-bx2dq.default~default.svc.cluster.local", | |
"cluster": "productpage", | |
"metadata": { | |
"INTERCEPTION_MODE": "REDIRECT", | |
"ISTIO_PROXY_SHA": "istio-proxy:6166ae7ebac7f630206b2fe4e6767516bf198313", | |
"ISTIO_PROXY_VERSION": "1.0.0", | |
"ISTIO_VERSION": "1.0.0", |
NewerOlder