packagemainimport("log""github.com/Datadog/opencensus-go-exporter-datadog""go.opencensus.io/stats/view")funcmain(){dd,err:=datadog.NewExporter(datadog.Options{})iferr!=nil{log.Fatalf("Failed to create the Datadog exporter: %v",err)}// It is imperative to invoke flush before your main function exits
deferdd.Stop()// Register it as a metrics exporter
view.RegisterExporter(dd)}

packagemainimport("log""github.com/Datadog/opencensus-go-exporter-datadog""go.opencensus.io/trace")funcmain(){dd,err:=datadog.NewExporter(datadog.Options{})iferr!=nil{log.Fatalf("Failed to create the Datadog exporter: %v",err)}// It is imperative to invoke flush before your main function exits
deferdd.Stop()// Register it as a metrics exporter
trace.RegisterExporter(dd)}

packagemainimport("log""github.com/Datadog/opencensus-go-exporter-datadog""go.opencensus.io/stats/view""go.opencensus.io/trace")funcmain(){dd,err:=datadog.NewExporter(datadog.Options{})iferr!=nil{log.Fatalf("Failed to create the Datadog exporter: %v",err)}// It is imperative to invoke flush before your main function exits
deferdd.Stop()// Register it as a metrics exporter
view.RegisterExporter(sd)// Register it as a metrics exporter
trace.RegisterExporter(dd)}