From 2105609ec5ba529fba0317c70f7d9d92f8ce4c8f Mon Sep 17 00:00:00 2001 From: Kaung Zin Hein <83657429+Zen-cronic@users.noreply.github.com> Date: Tue, 27 Aug 2024 06:32:13 -0400 Subject: [PATCH] fix(instrumentation-generic-pool): update span name typo (#2405) Should be 'generic-pool.acquire' instead of 'generic-pool.aquire' Signed-off-by: Kaung Zin Hein Co-authored-by: Marc Pichler --- .../src/instrumentation.ts | 4 ++-- .../test/index.test.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts index 202fb2b411..d6787f9d46 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts @@ -109,7 +109,7 @@ export class GenericPoolInstrumentation extends InstrumentationBase { ) { const parent = api.context.active(); const span = instrumentation.tracer.startSpan( - 'generic-pool.aquire', + 'generic-pool.acquire', {}, parent ); @@ -156,7 +156,7 @@ export class GenericPoolInstrumentation extends InstrumentationBase { } const parent = api.context.active(); const span = instrumentation.tracer.startSpan( - 'generic-pool.aquire', + 'generic-pool.acquire', {}, parent ); diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/test/index.test.ts b/plugins/node/opentelemetry-instrumentation-generic-pool/test/index.test.ts index d7453d204f..e2e634d4be 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/test/index.test.ts +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/test/index.test.ts @@ -94,7 +94,7 @@ describe('GenericPool instrumentation', () => { assert.strictEqual(await acquire(), CLIENT); const [span] = memoryExporter.getFinishedSpans(); assert.strictEqual(memoryExporter.getFinishedSpans().length, 1); - assert.strictEqual(span.name, 'generic-pool.aquire'); + assert.strictEqual(span.name, 'generic-pool.acquire'); }); it('should attach it to the parent span', async () => { @@ -107,7 +107,7 @@ describe('GenericPool instrumentation', () => { assert.strictEqual(memoryExporter.getFinishedSpans().length, 2); const [span] = memoryExporter.getFinishedSpans(); - assert.strictEqual(span.name, 'generic-pool.aquire'); + assert.strictEqual(span.name, 'generic-pool.acquire'); assert.strictEqual(span.parentSpanId, rootSpan.spanContext().spanId); }); });