Slide 24
Slide 24 text
Traces
!24
import (
// ...
"contrib.go.opencensus.io/exporter/jaeger"
"go.opencensus.io/trace"
)
func main() {
je, err := jaeger.NewExporter(jaeger.Options{
CollectorEndpoint: "http://localhost:14268/api/traces",
Process: jaeger.Process{
ServiceName: "servicea",
Tags: []jaeger.Tag{
jaeger.StringTag("server", "1"),
jaeger.StringTag("port", port),
jaeger.BoolTag("demo", true),
},
},
})
trace.RegisterExporter(je)
}