elastic / apm

Elastic Application Performance Monitoring - resources and general issue tracking for Elastic APM.
https://www.elastic.co/apm
Apache License 2.0
374 stars 111 forks source link

Change default APM server_url to 'http://127.0.0.1:8200' to avoid IPv6 ambiguity #735

Open trentm opened 1 year ago

trentm commented 1 year ago

Description

The current default APM server URL -- 'http://localhost:8200/' -- is ambiguous. "localhost" can resolve to a '127.0.0.1' (IPv4) or '[::1]' (IPv6), or possibly other custom-added IP addresses. The spec has been changed to require http://127.0.0.1:8200 be the default server_url.

Agent Issues

Other places to update

(Not sure if I should make separate issues for each of these.)

SylvainJuge commented 1 year ago

Is that required to change all occurrences of localhost:8200 to 127.0.0.1 in agent documentation also ? Or does just changing the default in agent configuration should be enough ?

trentm commented 1 year ago

Is that required to change all occurrences of localhost:8200 to 127.0.0.1 in agent documentation also ?

I think changing the docs would be good (at least where the server_url config var is documented) to be clear and avoid possible confusion, but I don't think it is likely to cause a problem. Is changing that a large amount of work in some areas? I don't want to create a make-work project.

SylvainJuge commented 1 year ago

Thanks, I'll update the java agent docs for consistency then, a simple sed s/localhost:8200/127.0.0.1:8200/g should be enough in most cases.

SylvainJuge commented 1 year ago

I forgot to mention that there are also a few references in Kibana (at least for the agent setup instructions) : https://github.com/search?q=repo%3Aelastic%2Fkibana+%22localhost%3A8200%22&type=code

trentm commented 1 year ago

I forgot to mention that there are also a few references in Kibana

@SylvainJuge Thanks! I've added some checkboxes to the description to look into update those (and some other hits I found).