8000 Fix socket by sl0thentr0py · Pull Request #3819 · getsentry/sentry-python · GitHub
[go: up one dir, main page]

Skip to content
8000

Fix socket #3819

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

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sentry_sdk/integrations/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ def create_connection(
origin=SocketIntegration.origin,
only_if_parent=True,
) as span:
span.set_data("address", address)
host, port = address
span.set_data("address.host", host)
span.set_data("address.port", port)
span.set_data("timeout", timeout)
span.set_data("source_address", source_address)

Expand Down
4 changes: 2 additions & 2 deletions tests/integrations/socket/test_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def test_create_connection_trace(sentry_init, capture_events):
assert connect_span["description"] == "example.com:443"
assert connect_span["data"] == ApproxDict(
{
"address": ["example.com", 443],
"address.host": "example.com",
"address.port": 443,
"timeout": timeout,
"source_address": None,
}
)

Expand Down
Loading
0