diff --git a/.dockerignore b/.dockerignore index a79fd48b6..7f1710076 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,8 @@ dist/ !dist/traefik site/ +vendor/ +.github/ +.semaphoreci/ +.travis/ +.idea/ diff --git a/build.Dockerfile b/build.Dockerfile index e063c839f..f060e91f3 100644 --- a/build.Dockerfile +++ b/build.Dockerfile @@ -21,8 +21,8 @@ RUN mkdir -p /usr/local/bin \ # Download golangci-lint binary to bin folder in $GOPATH RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.23.6 -# Download golangci-lint and misspell binary to bin folder in $GOPATH -RUN GO111MODULE=off go get github.com/client9/misspell/cmd/misspell +# Download misspell binary to bin folder in $GOPATH +RUN curl -sfL https://raw.githubusercontent.com/client9/misspell/master/install-misspell.sh | bash -s -- -b $GOPATH/bin v0.3.4 # Download goreleaser binary to bin folder in $GOPATH RUN curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh diff --git a/pkg/tracing/elastic/elastic.go b/pkg/tracing/elastic/elastic.go index e1df66b20..9f3580dca 100644 --- a/pkg/tracing/elastic/elastic.go +++ b/pkg/tracing/elastic/elastic.go @@ -15,6 +15,13 @@ import ( // Name sets the name of this tracer. const Name = "elastic" +func init() { + // The APM lib uses the init() function to create a default tracer. + // So this default tracer must be disabled. + // https://github.com/elastic/apm-agent-go/blob/8dd383d0d21776faad8841fe110f35633d199a03/tracer.go#L61-L65 + apm.DefaultTracer.Close() +} + // Config provides configuration settings for a elastic.co tracer. type Config struct { ServerURL string `description:"Set the URL of the Elastic APM server." json:"serverURL,omitempty" toml:"serverURL,omitempty" yaml:"serverURL,omitempty"`