Skip to content

Commit 43e5a03

Browse files
authored
Change default APM server_url to 'http://127.0.0.1:8200' to avoid IPv6 ambiguity (#727)
The current default APM server URL -- 'http://localhost:8200' -- is ambiguous. "localhost" can resolve to a '127.0.0.1' (IPv4) or '[::1]' (IPv6). At least in Node v17 the default `dns.lookup()` ordering of results was changed to no longer explicitly sort IPv4 addresses first. That means that on systems where the default resolver returns '[::1]' first for "localhost" will result in a broken attempt to talk to a default-configured local APM server: elastic/apm-agent-nodejs#3045 This is because APM server only binds to the IPv4 port: elastic/apm-server#1405
1 parent fe8f116 commit 43e5a03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

specs/agents/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Also known as "central configuration". Agents can query the APM Server for confi
7777

7878
Agents should poll the APM Server for config periodically by sending an HTTP request to the `/config/v1/agents` endpoint. Agents must specify their service name, and optionally environment. The server will use these to filter the configuration down to the relevant service and environment. There are two methods for sending these parameters:
7979

80-
1. Using the `GET` method, pass them as query parameters: `http://localhost:8200/config/v1/agents?service.name=opbeans&service.environment=production`
80+
1. Using the `GET` method, pass them as query parameters: `http://127.0.0.1:8200/config/v1/agents?service.name=opbeans&service.environment=production`
8181
2. Using the `POST` method, encode the parameters as a JSON object in the body, e.g. `{"service": {"name": "opbeans", "environment": "production"}}`
8282

8383
The server will respond with a JSON object, where each key maps a config attribute to a string value. The string value should be interpreted the same as if it were passed in via an environment variable. Upon receiving these config changes, the agent will update its configuration dynamically, overriding any config previously specified. That is, config via Kibana takes highest precedence.
@@ -139,7 +139,7 @@ To decrease onboarding friction,
139139
APM agents MUST not require any configuration to send data to a local APM Server.
140140
After onboarding, users can customize settings for which the defaults aren't appropriate.
141141

142-
By default, agents MUST send data to the APM Server at `http://localhost:8200/`.
142+
By default, agents MUST send data to the APM Server at `http://127.0.0.1:8200/`.
143143
If possible, agents SHOULD detect sensible defaults for `service.name` and `service.version`.
144144
In any case agents MUST include `service.name` - if discovering it is not possible then the default value: `unknown-${service.agent.name}-service` MUST be used.
145145
This naming pattern allows the UI to display inline help on how to manually configure the name.

0 commit comments

Comments
 (0)