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

feat: memcached instrumentation #539

Merged
merged 25 commits into from
Jun 30, 2021
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ba4ebfa
feat: first iteration of memcache instrumentation
rauno56 Jun 16, 2021
ab4cd1e
feat: add memcached docker commands for tests
rauno56 Jun 16, 2021
0be9b2f
test: test collecting statements
rauno56 Jun 16, 2021
5508b38
refactor: finish the instrumentation and the docs
rauno56 Jun 17, 2021
8e6e290
style: sort db configs in unit tests
rauno56 Jun 17, 2021
da68c7a
test: add memcached service to tests
rauno56 Jun 17, 2021
d8f5a09
style: lint
rauno56 Jun 17, 2021
584eb5a
chore: update versions
rauno56 Jun 17, 2021
52bd8d6
style: lint fix test utils
rauno56 Jun 17, 2021
d7defc1
fix: add env cars for memcached host and port for tests
rauno56 Jun 17, 2021
37f1b6b
test: fix hardcoded localhost values from tests
rauno56 Jun 17, 2021
a6d8e63
feat: rename the unnamed span to something more descriptive
rauno56 Jun 17, 2021
e8cbfac
style: lint-fix
rauno56 Jun 17, 2021
636b295
docs: add a disclamer about the dangers of `collectCommand`
rauno56 Jun 18, 2021
a95dcfc
Merge branch 'main' into feat/memcached-instrumentation
rauno56 Jun 28, 2021
d2d3361
refactor: use component logger
rauno56 Jun 28, 2021
b3cbb6a
feat: update versions
rauno56 Jun 28, 2021
875f606
Merge branch 'main' into feat/memcached-instrumentation
rauno56 Jun 28, 2021
9ec9897
feat: default to {} in setConfig
rauno56 Jun 28, 2021
27a6921
refactor: rename `collecCommand` configuration option
rauno56 Jun 28, 2021
4ef4fd2
feat: add example for memcached
rauno56 Jun 28, 2021
607b31c
fix: use semantic attribute for db.statement
rauno56 Jun 28, 2021
4668d9f
fix: use `serviceName` parameter
rauno56 Jun 28, 2021
d92c8ce
test: test cb context
rauno56 Jun 28, 2021
9fde92b
feat: return to parent context in callback
rauno56 Jun 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style: lint
  • Loading branch information
rauno56 committed Jun 17, 2021
commit d8f5a097e2882a68abe1d156a270438ffb3e1b7b
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ export class Instrumentation extends InstrumentationBase<typeof Memcached> {
'memcached',
['>=2.2'],
(moduleExports, moduleVersion) => {
api.diag.debug(`Patching ${Instrumentation.COMPONENT}@${moduleVersion}`);
api.diag.debug(
`Patching ${Instrumentation.COMPONENT}@${moduleVersion}`
);
this.ensureWrapped(
moduleVersion,
moduleExports.prototype,
Expand All @@ -63,7 +65,9 @@ export class Instrumentation extends InstrumentationBase<typeof Memcached> {
return moduleExports;
},
(moduleExports, moduleVersion) => {
api.diag.debug(`Unpatching ${Instrumentation.COMPONENT}@${moduleVersion}`);
api.diag.debug(
`Unpatching ${Instrumentation.COMPONENT}@${moduleVersion}`
);
if (moduleExports === undefined) return;
// `command` is documented API missing from the types
this._unwrap(moduleExports.prototype, 'command' as keyof Memcached);
Expand Down