Disable default APM tracer.
This commit is contained in:
parent
67e17def56
commit
fb51ebcba6
3 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
dist/
|
dist/
|
||||||
!dist/traefik
|
!dist/traefik
|
||||||
site/
|
site/
|
||||||
|
vendor/
|
||||||
|
.github/
|
||||||
|
.semaphoreci/
|
||||||
|
.travis/
|
||||||
|
.idea/
|
||||||
|
|
|
@ -21,8 +21,8 @@ RUN mkdir -p /usr/local/bin \
|
||||||
# Download golangci-lint binary to bin folder in $GOPATH
|
# 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
|
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
|
# Download misspell binary to bin folder in $GOPATH
|
||||||
RUN GO111MODULE=off go get github.com/client9/misspell/cmd/misspell
|
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
|
# Download goreleaser binary to bin folder in $GOPATH
|
||||||
RUN curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh
|
RUN curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh
|
||||||
|
|
|
@ -15,6 +15,13 @@ import (
|
||||||
// Name sets the name of this tracer.
|
// Name sets the name of this tracer.
|
||||||
const Name = "elastic"
|
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.
|
// Config provides configuration settings for a elastic.co tracer.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
ServerURL string `description:"Set the URL of the Elastic APM server." json:"serverURL,omitempty" toml:"serverURL,omitempty" yaml:"serverURL,omitempty"`
|
ServerURL string `description:"Set the URL of the Elastic APM server." json:"serverURL,omitempty" toml:"serverURL,omitempty" yaml:"serverURL,omitempty"`
|
||||||
|
|
Loading…
Reference in a new issue