cmd/pkgsite: remove dcensus
Since the fetch code no longer records metrics, the pkgsite command
doesn't need to talk to OpenCensus.
For golang/go#48010
Change-Id: I2793046725cd8c66ddfb585370ba2bf4890a9366
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/346810
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
diff --git a/cmd/pkgsite/main.go b/cmd/pkgsite/main.go
index 0a6d2ba..3aa7d41 100644
--- a/cmd/pkgsite/main.go
+++ b/cmd/pkgsite/main.go
@@ -39,7 +39,6 @@
"github.com/google/safehtml/template"
"golang.org/x/pkgsite/internal"
- "golang.org/x/pkgsite/internal/dcensus"
"golang.org/x/pkgsite/internal/fetch"
"golang.org/x/pkgsite/internal/fetchdatasource"
"golang.org/x/pkgsite/internal/frontend"
@@ -112,7 +111,7 @@
if err != nil {
die("%s\nMaybe you need to provide the location of static assets with -static.", err)
}
- router := dcensus.NewRouter(frontend.TagRoute)
+ router := http.NewServeMux()
server.Install(router.Handle, nil, nil)
mw := middleware.Timeout(54 * time.Second)
log.Infof(ctx, "Listening on addr %s", *httpAddr)