-
Notifications
You must be signed in to change notification settings - Fork 227
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
fix: ensure run-context for mysql span does not spill into user code #2463
Conversation
This fixes the 'mysql' instrumentation to not have the mysql span context be active in user code. This ensures that user code cannot create a child span of the mysql span, which would (a) be misleading and (b) cause problems for coming exit span and compressed span work. Refs: #2430
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
This passed a full |
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.
👍 does what is says, approving.
agent.logger.debug('intercepted call to mysql %s.query', objType) | ||
|
||
var span = ins.createSpan(null, 'db', 'mysql', 'query') | ||
if (!span) { |
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.
+1 for bailing out early if the span didn't start -- there doesn't appear to be any significant code path that follows in the function for an undefined span.
This fixes the 'mysql' instrumentation to not have the mysql span
context be active in user code. This ensures that user code cannot
create a child span of the mysql span, which would (a) be misleading
and (b) cause problems for coming exit span and compressed span work.
Refs: #2430
Checklist