Skip to content

Commit

Permalink
Fix based on comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ADOT Patch workflow committed Feb 6, 2024
1 parent 76b9278 commit adcb3d3
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
_INTERNAL_OPERATION: str = "InternalOperation"
_LOCAL_ROOT: str = "LOCAL_ROOT"

_GENERATOR = _AwsMetricAttributeGenerator()
_GENERATOR: _AwsMetricAttributeGenerator = _AwsMetricAttributeGenerator()


# pylint: disable=too-many-public-methods
Expand Down Expand Up @@ -422,14 +422,14 @@ def test_remote_attributes_combinations(self):

# Validate behaviour of extracting Remote Service from net.peer.name and net.peer.port
keys, values = self._mock_attribute(
[SpanAttributes.NET_PEER_NAME, SpanAttributes.NET_SOCK_PEER_PORT],
[SpanAttributes.NET_PEER_NAME, SpanAttributes.NET_PEER_PORT],
["192.168.0.0", "8081"],
keys,
values,
)
self._validate_expected_remote_attributes("192.168.0.0", _UNKNOWN_REMOTE_OPERATION)
self._validate_expected_remote_attributes("192.168.0.0:8081", _UNKNOWN_REMOTE_OPERATION)
keys, values = self._mock_attribute(
[SpanAttributes.NET_PEER_NAME, SpanAttributes.NET_SOCK_PEER_PORT], [None, None], keys, values
[SpanAttributes.NET_PEER_NAME, SpanAttributes.NET_PEER_PORT], [None, None], keys, values
)

# Validate behaviour of extracting Remote Service from net.peer.socket.addr
Expand Down Expand Up @@ -543,9 +543,9 @@ def _update_resource_with_service_name(self) -> None:
def _mock_attribute(
self,
keys: list[str],
values: [Optional[str]],
exist_keys: Optional[str] = None,
exist_values: Optional[Optional[str]] = None,
values: Optional[list[str]],
exist_keys: Optional[list[str]] = None,
exist_values: Optional[list[str]] = None,
) -> (Optional[list[str]], Optional[list[str]]):
if exist_keys is not None and exist_values is not None:
for key in exist_keys:
Expand Down

0 comments on commit adcb3d3

Please sign in to comment.