Skip to content

Commit

Permalink
fix based on comments
Browse files Browse the repository at this point in the history
  • Loading branch information
XinRanZhAWS committed Jan 30, 2024
1 parent 61d26e8 commit 99ff24c
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,11 @@ def attributes_side_effect(key):

self.assertFalse(should_generate_service_metric_attributes(self.span_data_mock))
self.assertFalse(should_generate_dependency_metric_attributes(self.span_data_mock))
self.attributes_mock.get.side_effect = (
lambda key: MessagingOperationValues.RECEIVE if key == SpanAttributes.MESSAGING_OPERATION else None
)
def get_side_effect(key):
if key == SpanAttributes.MESSAGING_OPERATION:
return MessagingOperationValues.RECEIVE
return None

self.attributes_mock.get.side_effect = get_side_effect
self.assertTrue(should_generate_service_metric_attributes(self.span_data_mock))
self.assertTrue(should_generate_dependency_metric_attributes(self.span_data_mock))

0 comments on commit 99ff24c

Please sign in to comment.