Skip to content
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 correct run-context for 'memcached' instrumentation #2475

Merged
merged 5 commits into from
Dec 2, 2021

Conversation

trentm
Copy link
Member

@trentm trentm commented Nov 26, 2021

This ensures that a created 'memcached' span is not the currentSpan
in user code after the call.

Refs: #2430

Checklist

  • Implement code
  • Add tests
  • Add CHANGELOG.asciidoc entry
  • TAV=memcached run

This ensures that a created 'memcached' span is not the currentSpan
in user code after the call.

Refs: #2430
@trentm trentm requested a review from astorm November 26, 2021 00:22
@trentm trentm self-assigned this Nov 26, 2021
@github-actions github-actions bot added the agent-nodejs Make available for APM Agents project planning. label Nov 26, 2021
@apmmachine
Copy link
Contributor

apmmachine commented Nov 26, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-12-01T21:37:35.119+0000

  • Duration: 21 min 33 sec

  • Commit: 2dcb7ea

Test stats 🧪

Test Results
Failed 0
Passed 22
Skipped 0
Total 22

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run module tests for <modules> : Run TAV tests for one or more modules, where <modules> can be either a comma separated list of modules (e.g. memcached,redis) or the string literal ALL to test all modules

  • run benchmark tests : Run the benchmark test only.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@trentm
Copy link
Member Author

trentm commented Nov 26, 2021

run module tests for memcached

@trentm
Copy link
Member Author

trentm commented Nov 30, 2021

run module tests for memcached

@trentm
Copy link
Member Author

trentm commented Nov 30, 2021

astorm
astorm previously approved these changes Dec 2, 2021
Copy link
Contributor

@astorm astorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Approving. diff was a little gnarly, but it looks like it does the thing.

}
}
}
return function wrappedCommand (queryCompiler, _server) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it doesn't look like the function ever uses _server

Copy link
Member Author

@trentm trentm Dec 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yah, a _ prefix on args is my sometimes way of saying "this is the expected position of this argument in the call signature, but I'm not using it". This _ prefix pattern is this eslint rule (typescript-eslint/typescript-eslint#1510) which I believe is a default in standards set of eslint style rules.

Happy to drop it if you prefer. For trailing args it is purely for self-documenting. For non-trailing args (e.g.

sendError (_error, cb) {
) it is more helpful/necessary.

@trentm trentm merged commit eabf1cb into master Dec 2, 2021
@trentm trentm deleted the trentm/run-context-memcached branch December 2, 2021 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-nodejs Make available for APM Agents project planning.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants