diff --git a/lib/instrumentation/kafkajs/record-linking-metrics.js b/lib/instrumentation/kafkajs/record-linking-metrics.js index 9f51eab433..03868e1d44 100644 --- a/lib/instrumentation/kafkajs/record-linking-metrics.js +++ b/lib/instrumentation/kafkajs/record-linking-metrics.js @@ -11,7 +11,7 @@ function recordLinkingMetrics({ agent, brokers, topic, producer = true }) { const kind = producer === true ? 'Produce' : 'Consume' for (const broker of brokers) { agent.metrics - .getOrCreateMetric(`MessageBroker/Kafka/Nodes/${broker}/${kind}/Named/${topic}`) + .getOrCreateMetric(`MessageBroker/Kafka/Nodes/${broker}/${kind}/${topic}`) .incrementCallCount() } } diff --git a/test/versioned/kafkajs/kafka.tap.js b/test/versioned/kafkajs/kafka.tap.js index 705af5a4d1..d585bfafe8 100644 --- a/test/versioned/kafkajs/kafka.tap.js +++ b/test/versioned/kafkajs/kafka.tap.js @@ -75,7 +75,7 @@ tap.test('send records correctly', (t) => { t.equal(sendMetric.callCount, 1) const produceTrackingMetric = agent.metrics.getMetric( - `MessageBroker/Kafka/Nodes/${broker}/Produce/Named/${topic}` + `MessageBroker/Kafka/Nodes/${broker}/Produce/${topic}` ) t.equal(produceTrackingMetric.callCount, 1) } @@ -205,7 +205,7 @@ tap.test('sendBatch records correctly', (t) => { t.equal(sendMetric.callCount, 1) const produceTrackingMetric = agent.metrics.getMetric( - `MessageBroker/Kafka/Nodes/${broker}/Produce/Named/${topic}` + `MessageBroker/Kafka/Nodes/${broker}/Produce/${topic}` ) t.equal(produceTrackingMetric.callCount, 1) @@ -262,7 +262,7 @@ tap.test('consume outside of a transaction', async (t) => { t.equal(sendMetric.callCount, 1) const consumeTrackingMetric = agent.metrics.getMetric( - `MessageBroker/Kafka/Nodes/${broker}/Consume/Named/${topic}` + `MessageBroker/Kafka/Nodes/${broker}/Consume/${topic}` ) t.equal(consumeTrackingMetric.callCount, 1) @@ -376,7 +376,7 @@ tap.test('consume batch inside of a transaction', async (t) => { t.equal(sendMetric.callCount, 1) const consumeTrackingMetric = agent.metrics.getMetric( - `MessageBroker/Kafka/Nodes/${broker}/Consume/Named/${topic}` + `MessageBroker/Kafka/Nodes/${broker}/Consume/${topic}` ) t.equal(consumeTrackingMetric.callCount, 1)