Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent: Support exporters with loopback host #43

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

holesch
Copy link
Owner

@holesch holesch commented Feb 8, 2024

If an Exporter and the Hub run on the same host and the Exporter
connects to the hub via localhost, then the host of the Place is the
loopback address for every agent. This prevents agents from connecting
if they are on a remote host.

Fixed by replacing the host of the Place with the host of the Hub, if
the host of the Place is the loopback address.

I considered replacing the host in /api/v1/places on the Hub, but then
clients would get different responses based on their source IP address,
which doesn't work well with HTTP caching, if it will ever be used.

If an Exporter and the Hub run on the same host and the Exporter
connects to the hub via localhost, then the host of the Place is the
loopback address for every agent. This prevents agents from connecting
if they are on a remote host.

Fixed by replacing the host of the Place with the host of the Hub, if
the host of the Place is the loopback address.

I considered replacing the host in `/api/v1/places` on the Hub, but then
clients would get different responses based on their source IP address,
which doesn't work well with HTTP caching, if it will ever be used.
@holesch holesch merged commit f97ca01 into master Feb 8, 2024
4 checks passed
@holesch holesch deleted the support-localhost-exporters branch February 8, 2024 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant