Slide 6
Slide 6 text
©2018 Wantedly, Inc.
func main() {
exporter, err := datadog.NewExporter(datadog.Options{Service: "my-app"})
if err != nil {
log.Fatal(err)
}
defer exporter.Stop()
trace.RegisterExporter(exporter)
// For demoing purposes, always sample.
trace.ApplyConfig(trace.Config{
DefaultSampler: trace.AlwaysSample(),
})
ctx, span := trace.StartSpan(context.Background(), "/foo")
bar(ctx)
span.End()
}
https://github.com/DataDog/opencensus-go-exporter-datadog/blob/master/examples/trace/main.go
0QFO$FOTVT(P%BUBEPHͷ͍ํ