Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logs translation when SpanTranslator is at FINE/DEBUG level #73

Merged
merged 1 commit into from
Apr 10, 2018

Conversation

codefromthecrypt
Copy link
Member

We've had a number of support issues around translation. This adds debug
logging which can help determine the cause of failures.

2018-04-09 13:51:19.279 DEBUG [/] 7295 --- [   XNIO-2 I/O-2] z.t.stackdriver.SpanTranslator           : >> translating zipkin span: {"traceId":"e7d33ab8fe95b3cb","id":"e7d33ab8fe95b3cb","kind":"SERVER","name":"get /","timestamp":1523253078006004,"duration":158196,"localEndpoint":{"serviceName":"frontend","ipv4":"192.168.1.113"},"remoteEndpoint":{"ipv6":"::1","port":60162},"tags":{"http.method":"GET","http.path":"/","mvc.controller.class":"Frontend","mvc.controller.method":"callBackend"}}
2018-04-09 13:51:19.281 DEBUG [/] 7295 --- [   XNIO-2 I/O-2] z.t.stackdriver.SpanTranslator           : << translated to stackdriver span: span_id: 16704760009066918859
kind: RPC_SERVER
name: "get /"
start_time {
  seconds: 1523253078
  nanos: 6004000
}
end_time {
  seconds: 1523253078
  nanos: 164200000
}
labels {
  key: "/http/method"
  value: "GET"
}
labels {
  key: "zipkin.io/http.path"
  value: "/"
}
labels {
  key: "zipkin.io/mvc.controller.class"
  value: "Frontend"
}
labels {
  key: "zipkin.io/mvc.controller.method"
  value: "callBackend"
}
labels {
  key: "zipkin.io/endpoint.ipv4"
  value: "192.168.1.113"
}
labels {
  key: "/component"
  value: "frontend"
}
labels {
  key: "/agent"
  value: "zipkin-java"
}

@codefromthecrypt
Copy link
Member Author

@jsw does this look helpful?

We've had a number of support issues around translation. This adds debug
logging which can help determine the cause of failures.

```
2018-04-09 13:51:19.279 DEBUG [/] 7295 --- [   XNIO-2 I/O-2] z.t.stackdriver.SpanTranslator           : >> translating zipkin span: {"traceId":"e7d33ab8fe95b3cb","id":"e7d33ab8fe95b3cb","kind":"SERVER","name":"get /","timestamp":1523253078006004,"duration":158196,"localEndpoint":{"serviceName":"frontend","ipv4":"192.168.1.113"},"remoteEndpoint":{"ipv6":"::1","port":60162},"tags":{"http.method":"GET","http.path":"/","mvc.controller.class":"Frontend","mvc.controller.method":"callBackend"}}
2018-04-09 13:51:19.281 DEBUG [/] 7295 --- [   XNIO-2 I/O-2] z.t.stackdriver.SpanTranslator           : << translated to stackdriver span: span_id: 16704760009066918859
kind: RPC_SERVER
name: "get /"
start_time {
  seconds: 1523253078
  nanos: 6004000
}
end_time {
  seconds: 1523253078
  nanos: 164200000
}
labels {
  key: "/http/method"
  value: "GET"
}
labels {
  key: "zipkin.io/http.path"
  value: "/"
}
labels {
  key: "zipkin.io/mvc.controller.class"
  value: "Frontend"
}
labels {
  key: "zipkin.io/mvc.controller.method"
  value: "callBackend"
}
labels {
  key: "zipkin.io/endpoint.ipv4"
  value: "192.168.1.113"
}
labels {
  key: "/component"
  value: "frontend"
}
labels {
  key: "/agent"
  value: "zipkin-java"
}
```
@jsw
Copy link

jsw commented Apr 9, 2018

@adriancole Thanks! A couple other ideas that may help

@codefromthecrypt
Copy link
Member Author

codefromthecrypt commented Apr 10, 2018 via email

@jsw
Copy link

jsw commented Apr 10, 2018

No strong opinion and not urgent. I imagine it might be useful at some point to troubleshoot how zipkin spans are translated to Stackdriver spans. Haven't gotten to the point where I am applying that level of detail to the data I am sending. Documentation or a pointer to code that shows the mapping would be helpful.

@codefromthecrypt codefromthecrypt merged commit ebc2d6b into master Apr 10, 2018
@codefromthecrypt codefromthecrypt deleted the log-translation branch April 10, 2018 07:11
@codefromthecrypt
Copy link
Member Author

cutting 0.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants