Skip to content

Commit feb40e5

Browse files
authored
ref(metrics): Rename metric (#364)
1 parent e227aa7 commit feb40e5

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

etl/src/metrics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ static REGISTER_METRICS: Once = Once::new();
77
pub const ETL_TABLES_TOTAL: &str = "etl_tables_total";
88
pub const ETL_BATCH_ITEMS_WRITTEN_TOTAL: &str = "etl_batch_items_written_total";
99
pub const ETL_TABLE_ROWS_TOTAL_WRITTEN: &str = "etl_table_rows_total_written";
10-
pub const ETL_ITEMS_SEND_DURATION_SECONDS: &str = "etl_items_send_duration_seconds";
10+
pub const ETL_BATCH_ITEMS_SEND_DURATION_SECONDS: &str = "etl_batch_items_send_duration_seconds";
1111
pub const ETL_TRANSACTION_DURATION_SECONDS: &str = "etl_transaction_duration_seconds";
1212
pub const ETL_TRANSACTION_SIZE: &str = "etl_transaction_size";
1313
pub const ETL_COPIED_TABLE_ROW_SIZE_BYTES: &str = "etl_copied_table_row_size_bytes";
@@ -47,9 +47,9 @@ pub(crate) fn register_metrics() {
4747
);
4848

4949
describe_histogram!(
50-
ETL_ITEMS_SEND_DURATION_SECONDS,
50+
ETL_BATCH_ITEMS_SEND_DURATION_SECONDS,
5151
Unit::Seconds,
52-
"Time taken in seconds to send batch items to the destination, labeled by worker_type and action"
52+
"Time taken in seconds to send a batch of items to the destination, labeled by worker_type and action"
5353
);
5454

5555
describe_histogram!(

etl/src/replication/apply.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ use crate::conversions::event::{
2626
use crate::destination::Destination;
2727
use crate::error::{ErrorKind, EtlResult};
2828
use crate::metrics::{
29-
ACTION_LABEL, DESTINATION_LABEL, ETL_BATCH_ITEMS_WRITTEN_TOTAL,
30-
ETL_ITEMS_SEND_DURATION_SECONDS, ETL_TRANSACTION_DURATION_SECONDS, ETL_TRANSACTION_SIZE,
29+
ACTION_LABEL, DESTINATION_LABEL, ETL_BATCH_ITEMS_SEND_DURATION_SECONDS,
30+
ETL_BATCH_ITEMS_WRITTEN_TOTAL, ETL_TRANSACTION_DURATION_SECONDS, ETL_TRANSACTION_SIZE,
3131
PIPELINE_ID_LABEL, WORKER_TYPE_LABEL,
3232
};
3333
use crate::replication::client::PgReplicationClient;
@@ -755,7 +755,7 @@ where
755755

756756
let send_duration_seconds = before_sending.elapsed().as_secs_f64();
757757
histogram!(
758-
ETL_ITEMS_SEND_DURATION_SECONDS,
758+
ETL_BATCH_ITEMS_SEND_DURATION_SECONDS,
759759
WORKER_TYPE_LABEL => "apply",
760760
ACTION_LABEL => "table_streaming",
761761
PIPELINE_ID_LABEL => pipeline_id.to_string(),

etl/src/replication/table_sync.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ use crate::failpoints::{
2222
etl_fail_point,
2323
};
2424
use crate::metrics::{
25-
ACTION_LABEL, DESTINATION_LABEL, ETL_BATCH_ITEMS_WRITTEN_TOTAL,
26-
ETL_ITEMS_SEND_DURATION_SECONDS, ETL_TABLE_ROWS_TOTAL_WRITTEN, PIPELINE_ID_LABEL,
25+
ACTION_LABEL, DESTINATION_LABEL, ETL_BATCH_ITEMS_SEND_DURATION_SECONDS,
26+
ETL_BATCH_ITEMS_WRITTEN_TOTAL, ETL_TABLE_ROWS_TOTAL_WRITTEN, PIPELINE_ID_LABEL,
2727
WORKER_TYPE_LABEL,
2828
};
2929
use crate::replication::client::PgReplicationClient;
@@ -245,7 +245,7 @@ where
245245

246246
let send_duration_seconds = before_sending.elapsed().as_secs_f64();
247247
histogram!(
248-
ETL_ITEMS_SEND_DURATION_SECONDS,
248+
ETL_BATCH_ITEMS_SEND_DURATION_SECONDS,
249249
WORKER_TYPE_LABEL => "table_sync",
250250
ACTION_LABEL => "table_copy",
251251
PIPELINE_ID_LABEL => pipeline_id.to_string(),

0 commit comments

Comments
 (0)