-
Notifications
You must be signed in to change notification settings - Fork 534
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
[mysql] fix: ensure span name is a string to avoid [object Object] as span name #208
[mysql] fix: ensure span name is a string to avoid [object Object] as span name #208
Conversation
b086883
to
637c5ad
Compare
Codecov Report
@@ Coverage Diff @@
## master #208 +/- ##
==========================================
- Coverage 95.20% 94.94% -0.26%
==========================================
Files 92 79 -13
Lines 4731 4236 -495
Branches 491 432 -59
==========================================
- Hits 4504 4022 -482
+ Misses 227 214 -13 |
@@ -124,6 +124,34 @@ describe('[email protected]', () => { | |||
assert.strictEqual(plugin.moduleName, 'mysql'); | |||
}); | |||
|
|||
it('should name the span correctly when the query is a string', done => { |
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.
Nit: can you reverse the logic in test
describe('when the query is a string', ()=> {
it('span should have correct name', ...)
})
describe('when the query is a an object', ()=> {
it('span should have correct name', ...)
})
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.
that does read better!
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.
@naseemkullah just a gently ping on this :)
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.
pong!
Sorry dropped the ball on this :)
Signed-off-by: Naseem <[email protected]>
Signed-off-by: Naseem <[email protected]>
637c5ad
to
9055d97
Compare
Which problem is this PR solving?
Short description of the changes
Ensured that the span name is always a string. The approach differs when the query is a string vs an object:
Also replaced deprecated
equals
method in tests