You are looking at preliminary documentation for a future release.
This project is still in development; do not use it in a production environment.
Configurationedit
Configure the agent with AgentConfiguration
in the agent’s start()
function.
let config = AgentConfiguration() config.collectorHost = "192.168.0.1" config.collectorPort = 8200 config.collectorTLS = true config.secretToken = "<secret token>" Agent.start(with:config)
Configuration optionsedit
collectorHost
edit
- Type: String
-
Default:
127.0.0.1
The APM Server host.
collectorPort
edit
- Type: Int
-
Default:
8200
The APM Server port.
collectorTLS
edit
- Type: Bool
- Default: false
Flags whether the APM Server is secured with TLS.
secretToken
edit
- Type: String
- Default: nil
-
Env:
OTEL_EXPORTER_OTLP_HEADERS
Sets the secret token for connecting to an authenticated APM Server. If using the env-var, the whole header map must be define per OpenTelemetry Protocol Exporter Config (e.g.: OTEL_EXPORTER_OTLP_HEADERS="Authorization=bearer <secret token>"
)