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

Fix client address is set to server address in new semconv #3354

Merged
merged 8 commits into from
Mar 24, 2025
Merged
Prev Previous commit
Next Next commit
refactor: only populate server address if missing
y-young committed Mar 18, 2025
commit dc434f73abca5b8dfbdeaf54f93a5125411104df
Original file line number Diff line number Diff line change
@@ -354,7 +354,8 @@ def _set_http_host_server(result, host, sem_conv_opt_in_mode):
if _report_old(sem_conv_opt_in_mode):
set_string_attribute(result, SpanAttributes.HTTP_HOST, host)
if _report_new(sem_conv_opt_in_mode):
set_string_attribute(result, SERVER_ADDRESS, host)
if not result.get(SERVER_ADDRESS):
set_string_attribute(result, SERVER_ADDRESS, host)


# net.peer.ip -> net.sock.peer.addr