Slide 26
Slide 26 text
© 2017 InfluxData. All rights reserved.
26
func xyz(ctx context.Context, ...) {
...
span, ctx := opentracing.StartSpanFromContext(ctx, "operation_name")
defer span.Finish()
span.LogFields(
log.String("event", "soft error"),
log.String("type", "cache timeout"),
log.Int("waited.millis", 1500))
...
}
https://github.com/opentracing/opentracing-go
Opentracing: Create a Span from the Context