Skip to content

Commit

Permalink
fix(memcached): low cardinality span name (open-telemetry#1104)
Browse files Browse the repository at this point in the history
  • Loading branch information
aadharsh-rengarajan authored Aug 10, 2022
1 parent 4d62c92 commit cff4e77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class Instrumentation extends InstrumentationBase<typeof Memcached> {
const query = original.apply(this, arguments as any);
const callback = query.callback;

span.updateName(`${query.type} ${query.key}`);
span.updateName(`memcached ${query.type}`);
span.setAttributes({
'db.memcached.key': query.key,
'db.memcached.lifetime': query.lifetime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ const assertSpans = (actualSpans: any[], expectedSpans: any[]) => {
assert.notStrictEqual(span, undefined);
assert.notStrictEqual(expected, undefined);
assertMatch(span.name, new RegExp(expected.op));
assertMatch(span.name, new RegExp(expected.key));
assertMatch(span.name, new RegExp('memcached'));
assert.strictEqual(span.kind, SpanKind.CLIENT);
assert.strictEqual(span.attributes['db.statement'], expected.statement);
for (const attr in DEFAULT_ATTRIBUTES) {
Expand Down

0 comments on commit cff4e77

Please sign in to comment.