2019-11-27 15:00:07 +00:00
|
|
|
# Elastic
|
|
|
|
|
2021-09-29 08:40:14 +00:00
|
|
|
To enable the Elastic tracer:
|
2019-11-27 15:00:07 +00:00
|
|
|
|
|
|
|
```yaml tab="File (YAML)"
|
|
|
|
tracing:
|
|
|
|
elastic: {}
|
|
|
|
```
|
|
|
|
|
2021-06-18 22:08:08 +00:00
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[tracing]
|
|
|
|
[tracing.elastic]
|
|
|
|
```
|
|
|
|
|
2019-11-27 15:00:07 +00:00
|
|
|
```bash tab="CLI"
|
|
|
|
--tracing.elastic=true
|
|
|
|
```
|
|
|
|
|
|
|
|
#### `serverURL`
|
|
|
|
|
|
|
|
_Optional, Default="http://localhost:8200"_
|
|
|
|
|
2021-09-29 08:40:14 +00:00
|
|
|
URL of the Elastic APM server.
|
2019-11-27 15:00:07 +00:00
|
|
|
|
|
|
|
```yaml tab="File (YAML)"
|
|
|
|
tracing:
|
|
|
|
elastic:
|
|
|
|
serverURL: "http://apm:8200"
|
|
|
|
```
|
|
|
|
|
2021-06-18 22:08:08 +00:00
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[tracing]
|
|
|
|
[tracing.elastic]
|
|
|
|
serverURL = "http://apm:8200"
|
|
|
|
```
|
|
|
|
|
2019-11-27 15:00:07 +00:00
|
|
|
```bash tab="CLI"
|
|
|
|
--tracing.elastic.serverurl="http://apm:8200"
|
|
|
|
```
|
|
|
|
|
|
|
|
#### `secretToken`
|
|
|
|
|
|
|
|
_Optional, Default=""_
|
|
|
|
|
2021-09-29 08:40:14 +00:00
|
|
|
Token used to connect to Elastic APM Server.
|
2019-11-27 15:00:07 +00:00
|
|
|
|
|
|
|
```yaml tab="File (YAML)"
|
|
|
|
tracing:
|
|
|
|
elastic:
|
|
|
|
secretToken: "mytoken"
|
|
|
|
```
|
|
|
|
|
2021-06-18 22:08:08 +00:00
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[tracing]
|
|
|
|
[tracing.elastic]
|
|
|
|
secretToken = "mytoken"
|
|
|
|
```
|
|
|
|
|
2019-11-27 15:00:07 +00:00
|
|
|
```bash tab="CLI"
|
|
|
|
--tracing.elastic.secrettoken="mytoken"
|
|
|
|
```
|
|
|
|
|
|
|
|
#### `serviceEnvironment`
|
|
|
|
|
|
|
|
_Optional, Default=""_
|
|
|
|
|
2021-09-29 08:40:14 +00:00
|
|
|
Environment's name where Traefik is deployed in, e.g. `production` or `staging`.
|
2019-11-27 15:00:07 +00:00
|
|
|
|
|
|
|
```yaml tab="File (YAML)"
|
|
|
|
tracing:
|
|
|
|
elastic:
|
|
|
|
serviceEnvironment: "production"
|
|
|
|
```
|
|
|
|
|
2021-06-18 22:08:08 +00:00
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[tracing]
|
|
|
|
[tracing.elastic]
|
|
|
|
serviceEnvironment = "production"
|
|
|
|
```
|
|
|
|
|
2019-11-27 15:00:07 +00:00
|
|
|
```bash tab="CLI"
|
|
|
|
--tracing.elastic.serviceenvironment="production"
|
|
|
|
```
|
|
|
|
|
|
|
|
### Further
|
|
|
|
|
|
|
|
Additional configuration of Elastic APM Go agent can be done using environment variables.
|
|
|
|
See [APM Go agent reference](https://www.elastic.co/guide/en/apm/agent/go/current/configuration.html).
|