-
Notifications
You must be signed in to change notification settings - Fork 664
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
Update gettracer #1854
Update gettracer #1854
Changes from 3 commits
b01c83e
dde7db2
69794b5
ec67bbb
a7ef4d4
2900539
1082009
c1d9481
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -257,19 +257,27 @@ def test_invalid_instrumentation_info(self): | |
tracer1 = tracer_provider.get_tracer("") | ||
with self.assertLogs(level=ERROR): | ||
tracer2 = tracer_provider.get_tracer(None) | ||
self.assertEqual( | ||
tracer1.instrumentation_info, tracer2.instrumentation_info | ||
) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. any reason for this test to be moved? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believed that having the more granular tests for the individual tracer would provide more information upon failing; then, this test just makes sure that the two tracers created are identical, which is asserted after each individual attribute is checked. I'm not sure if that's good practice, though, so I'd appreciate the feedback! |
||
self.assertIsInstance( | ||
tracer1.instrumentation_info, InstrumentationInfo | ||
) | ||
span1 = tracer1.start_span("foo") | ||
self.assertTrue(span1.is_recording()) | ||
self.assertEqual(tracer1.instrumentation_info.version, "") | ||
self.assertEqual( | ||
tracer1.instrumentation_info.name, "ERROR:MISSING MODULE NAME" | ||
self.assertEqual(tracer1.instrumentation_info.name, "") | ||
|
||
self.assertIsInstance( | ||
tracer2.instrumentation_info, InstrumentationInfo | ||
) | ||
span2 = tracer2.start_span("bar") | ||
self.assertTrue(span2.is_recording()) | ||
self.assertEqual(tracer2.instrumentation_info.version, "") | ||
self.assertEqual(tracer2.instrumentation_info.name, "") | ||
|
||
self.assertEqual( | ||
tracer1.instrumentation_info, tracer2.instrumentation_info | ||
) | ||
|
||
def test_span_processor_for_source(self): | ||
tracer_provider = trace.TracerProvider() | ||
tracer1 = tracer_provider.get_tracer("instr1") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be added to the "Unreleased" section of the changelog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just did it. Thanks!