Skip to content

Commit

Permalink
Add checking instrumentation scope in test base (#3539)
Browse files Browse the repository at this point in the history
  • Loading branch information
lzchen committed Nov 22, 2023
1 parent 36aaa84 commit c0576a0
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ def assertEqualSpanInstrumentationInfo(self, span, module):
self.assertEqual(span.instrumentation_info.name, module.__name__)
self.assertEqual(span.instrumentation_info.version, module.__version__)

def assertEqualSpanInstrumentationScope(self, span, module):
self.assertEqual(span.instrumentation_scope.name, module.__name__)
self.assertEqual(
span.instrumentation_scope.version, module.__version__
)

def assertSpanHasAttributes(self, span, attributes):
for key, val in attributes.items():
self.assertIn(key, span.attributes)
Expand Down

0 comments on commit c0576a0

Please sign in to comment.