Skip to content

Commit

Permalink
Revert "feat: add zone to other metrics"
Browse files Browse the repository at this point in the history
This reverts commit a37cb70.
  • Loading branch information
bennet-esyoil committed Sep 9, 2024
1 parent a37cb70 commit 618ccac
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions lib/queue-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ const deliveryStatusCounter = new promClient.Counter({
const messagePushCounter = new promClient.Counter({
name: 'zonemta_message_push',
help: 'Messages pushed to queue',
labelNames: ['result', 'zone']
labelNames: ['result']
});
const bounceCounter = new promClient.Counter({
name: 'zonemta_bounce_generation',
help: 'Bounce generation',
labelNames: ['zone']
help: 'Bounce generation'
});
const dropCounter = new promClient.Counter({
name: 'zonemta_message_drop',
help: 'Messages dropped',
labelNames: ['zone']
help: 'Messages dropped'
});

const promMetrics = {
Expand Down Expand Up @@ -215,9 +213,7 @@ class QueueServer {

case 'BOUNCE':
{
bounceCounter.inc({
zone: client.zone.name
});
bounceCounter.inc();
const bounce = data;
bounce.headers = new Headers(bounce.headers || []);
plugins.handler.runHooks(
Expand All @@ -234,9 +230,7 @@ class QueueServer {
break;

case 'REMOVE':
dropCounter.inc({
zone: client.zone.name
});
dropCounter.inc();
this.queue.removeMessage(data.id, err => {
if (!client) {
// client already errored or closed
Expand Down Expand Up @@ -296,8 +290,7 @@ class QueueServer {
case 'PUSH':
this.queue.push(data.id, data.envelope, err => {
messagePushCounter.inc({
result: err ? 'fail' : 'success',
zone: client.zone.name
result: err ? 'fail' : 'success'
});
if (!client) {
// client already errored or closed
Expand Down

0 comments on commit 618ccac

Please sign in to comment.