Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Adding DB API integration + MySQL connector integration #264
Adding DB API integration + MySQL connector integration #264
Changes from 2 commits
2c2f2ba
47824f2
b5d81b8
f9f03a8
10f3f53
e6158c8
315e583
cb8a835
857eed6
aefc210
ebee38c
9cfc808
9997b46
d47adcd
ce8e261
d7a1d07
03a25b4
4b0e20f
7a66815
7952e63
28108a1
93468c0
3f0c082
d480718
83d95e7
f5fa462
0a37e3f
26e4983
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
are MockSpan and MockTracer needed? I feel like we have a no-op tracer now with the API.
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.
I wanted to test the integration code is creating the span correctly, API tracer is no-op so it will not create anything, are you suggesting to use unittest.Mock with a side effect or some other pattern to test here?
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.
Using no-op tracer in tests but still using MockSpan to check all attributes are set up correctly
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.
could use a Mock object which takes the Tracer as as a spec: https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock
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.
if the purpose here is to provide a general test utility for tracers, I guess I'd rather see it shared in something like opentelemetry-api. But I'm not sure if sharing test fixtures across projects is an accepted policy.
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.
Mocking tracer using mock library now, for Span I prefer to create my own mock class so is easier to test the integration adding correct attributes to the Span