Skip to content

Commit

Permalink
rename queue populator metrics
Browse files Browse the repository at this point in the history
Some queue populator metrics are shared between all extensions and not
specific to replication.

Issue: BB-527
  • Loading branch information
Kerkesni committed Jan 16, 2025
1 parent 40ad455 commit 61a5c13
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/queuePopulator/QueuePopulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,25 @@ const metricLabels = ['origin', 'logName', 'logId'];
*/

const logReadOffsetMetric = ZenkoMetrics.createGauge({
name: 's3_replication_read_offset',
name: 's3_backbeat_populator_read_offset',
help: 'Current read offset of metadata journal',
labelNames: metricLabels,
});

const logSizeMetric = ZenkoMetrics.createGauge({
name: 's3_replication_log_size',
name: 's3_backbeat_populator_log_size',
help: 'Current size of metadata journal',
labelNames: metricLabels,
});

const logTimestamp = ZenkoMetrics.createGauge({
name: 's3_replication_log_timestamp',
name: 's3_backbeat_populator_log_timestamp',
help: 'Last timestamp read from the metadata journal',
labelNames: metricLabels,
});

const messageMetrics = ZenkoMetrics.createCounter({
name: 's3_replication_populator_messages_total',
name: 's3_backbeat_populator_messages_total',
help: 'Total number of Kafka messages produced by the queue populator',
labelNames: [...metricLabels, 'publishStatus'],
});
Expand Down
2 changes: 1 addition & 1 deletion monitoring/replication/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,7 @@
"targets": [
{
"datasource": null,
"expr": "clamp_min(\n max(mongodb_mongod_replset_oplog_head_timestamp{\n namespace=\"${namespace}\", job=\"${job_mongod}\"})\n -\n min(s3_replication_log_timestamp{namespace=\"${namespace}\",\n job=\"${job_queue_populator}\"}),\n0)",
"expr": "clamp_min(\n max(mongodb_mongod_replset_oplog_head_timestamp{\n namespace=\"${namespace}\", job=\"${job_mongod}\"})\n -\n min(s3_backbeat_populator_log_timestamp{namespace=\"${namespace}\",\n job=\"${job_queue_populator}\"}),\n0)",
"format": "time_series",
"hide": false,
"instant": false,
Expand Down
2 changes: 1 addition & 1 deletion monitoring/replication/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def up(component: str, expr: str = None, title: str = None, **kwargs):
' max(mongodb_mongod_replset_oplog_head_timestamp{',
' namespace="${namespace}", job="${job_mongod}"})',
' -',
' min(s3_replication_log_timestamp{namespace="${namespace}",',
' min(s3_backbeat_populator_log_timestamp{namespace="${namespace}",',
' job="${job_queue_populator}"}),',
'0)',
]),
Expand Down

0 comments on commit 61a5c13

Please sign in to comment.