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

[ServiceBus] update None in network trace params to empty str #32221

Closed
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __init__(self, endpoint, **kwargs): # pylint:disable=too-many-statements
custom_endpoint = f"{custom_parsed_url.hostname}:{custom_port}{custom_parsed_url.path}"
self._container_id = kwargs.pop("container_id", None) or str(uuid.uuid4()) # type: str
self._network_trace = kwargs.get("network_trace", False)
self._network_trace_params = {"amqpConnection": self._container_id, "amqpSession": None, "amqpLink": None}
self._network_trace_params = {"amqpConnection": self._container_id, "amqpSession": "", "amqpLink": ""}

transport = kwargs.get("transport")
self._transport_type = kwargs.pop("transport_type", TransportType.Amqp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, session, auth, **kwargs):
self._network_trace_params = {
"amqpConnection": self._session._connection._container_id,
"amqpSession": self._session.name,
"amqpLink": None
"amqpLink": ""
}

self._token_status_code = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ async def close_async(self):
if self._keep_alive_thread:
await self._keep_alive_thread
self._keep_alive_thread = None
self._network_trace_params["amqpConnection"] = None
self._network_trace_params["amqpSession"] = None
self._network_trace_params["amqpConnection"] = ""
self._network_trace_params["amqpSession"] = ""

async def auth_complete_async(self):
"""Whether the authentication handshake is complete during
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self, endpoint, **kwargs): # pylint:disable=too-many-statements
uuid.uuid4()
) # type: str
self._network_trace = kwargs.get("network_trace", False)
self._network_trace_params = {"amqpConnection": self._container_id, "amqpSession": None, "amqpLink": None}
self._network_trace_params = {"amqpConnection": self._container_id, "amqpSession": "", "amqpLink": ""}

transport = kwargs.get("transport")
self._transport_type = kwargs.pop("transport_type", TransportType.Amqp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, session, endpoint='$management', **kwargs):
self._network_trace_params = {
"amqpConnection": self._session._connection._container_id,
"amqpSession": self._session.name,
"amqpLink": None
"amqpLink": ""
}
self._mgmt_link = self._session.create_request_response_link_pair(
endpoint=endpoint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, session, auth, **kwargs):
self._network_trace_params = {
"amqpConnection": self._session._connection._container_id,
"amqpSession": self._session.name,
"amqpLink": None
"amqpLink": ""
}

self._token_status_code = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def __init__(self, hostname, **kwargs):
"remote_idle_timeout_empty_frame_send_ratio", None
)
self._network_trace = kwargs.pop("network_trace", False)
self._network_trace_params = {"amqpConnection": None, "amqpSession": None, "amqpLink": None}
self._network_trace_params = {"amqpConnection": "", "amqpSession": "", "amqpLink": ""}

# Session settings
self._outgoing_window = kwargs.pop("outgoing_window", OUTGOING_WINDOW)
Expand Down Expand Up @@ -377,8 +377,8 @@ def close(self):
except RuntimeError: # Probably thread failed to start in .open()
logging.debug("Keep alive thread failed to join.", exc_info=True)
self._keep_alive_thread = None
self._network_trace_params["amqpConnection"] = None
self._network_trace_params["amqpSession"] = None
self._network_trace_params["amqpConnection"] = ""
self._network_trace_params["amqpSession"] = ""

def auth_complete(self):
"""Whether the authentication handshake is complete during
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, session, endpoint='$management', **kwargs):
self._network_trace_params = {
"amqpConnection": self._session._connection._container_id,
"amqpSession": self._session.name,
"amqpLink": None
"amqpLink": ""
}
self._mgmt_link = self._session.create_request_response_link_pair(
endpoint=endpoint,
Expand Down