Stackdriver with go lang giving error

import(
go.opencensus.io/exporter/stackdriver
go.opencensus.io/trace
)

exporter, err := stackdriver.NewExporter(stackdriver.Options{
	ProjectID:            "Google-project-ID",
	BundleDelayThreshold: time.Second / 10,
	BundleCountThreshold: 10})
if err != nil {
	log.Println(err)
}
trace.RegisterExporter(exporter)
_, span := trace.StartSpan(context.Background(), "main")
defer span.End()

when i try to integrate stackdriver with my code i get
panic: http: multiple registrations for /debug/requests

goroutine 1 [running]:
net/http.(*ServeMux).Handle(0x1c78bc0, 0x17daff4, 0xf, 0x1853420, 0x1803d28)
/usr/local/Cellar/go/1.10.2/libexec/src/net/http/server.go:2353 +0x239
net/http.(*ServeMux).HandleFunc(0x1c78bc0, 0x17daff4, 0xf, 0x1803d28)
/usr/local/Cellar/go/1.10.2/libexec/src/net/http/server.go:2368 +0x55
net/http.HandleFunc(0x17daff4, 0xf, 0x1803d28)
/usr/local/Cellar/go/1.10.2/libexec/src/net/http/server.go:2380 +0x4b
golang.org/x/net/trace.init.0()

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.