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

The server.address attribute in HTTP client spans is always an IP address #699

Open
fstab opened this issue Mar 25, 2024 · 0 comments
Open

Comments

@fstab
Copy link
Member

fstab commented Mar 25, 2024

This is a minor issue, creating it anyway as I have an example running right now and can provide screenshots.

The screenshot below shows the span attributes of an HTTP client span created by Beyla:

screenshot_2024-03-25_21:58:03_186103176

It looks great, however, the server.address is not very helpful. My application performs an outgoing request to a K8S service rusttestserver.default.svc.cluster.local and it would be more helpful to see the actual host name instead of the IP.

For comparison, I set up a similar scenario in Java with the OpenTelemetry Java instrumentation agent. The Java agent uses the host name, see screenshot below:

screenshot_2024-03-25_21:47:19_804803440

My first intuition was that we could look up the host via DNS. However, the semantic conventions spec explicitly advice against this, because if an HTTP client request is explicitly made to an IP address then the IP address should be used in server.address.

I'm wondering if we can use the host name from the host: header of the request? I guess the host: header should always contain what the client used, either an IP address or a host name.

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

No branches or pull requests

1 participant