Skip to content

Commit

Permalink
[indexer grpc] More fields to short connection metric (aptos-labs#10385)
Browse files Browse the repository at this point in the history
  • Loading branch information
larry-aptos authored and Poytr1 committed Oct 4, 2023
1 parent fd27c57 commit 33fcb2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ pub static CONNECTION_COUNT: Lazy<IntCounter> = Lazy::new(|| {
/// Count of the short connections; i.e., < 10 seconds.
pub static SHORT_CONNECTION_COUNT: Lazy<IntCounterVec> = Lazy::new(|| {
register_int_counter_vec!(
"indexer_grpc_data_service_short_connection_by_user_count",
"indexer_grpc_data_service_short_connection_by_user_processor_count",
"Count of the short connections; i.e., < 10 seconds",
&["request_token", "email"],
&["request_token", "email", "processor"],
)
.unwrap()
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ impl RawData for RawDataServerWrapper {
.with_label_values(&[
request_metadata.request_api_key_name.as_str(),
request_metadata.request_email.as_str(),
request_metadata.processor_name.as_str(),
])
.inc();
// Connection will be dropped anyway, so we ignore the error here.
Expand Down Expand Up @@ -205,6 +206,7 @@ impl RawData for RawDataServerWrapper {
.with_label_values(&[
request_metadata.request_api_key_name.as_str(),
request_metadata.request_email.as_str(),
request_metadata.processor_name.as_str(),
])
.inc();
// Connection will be dropped anyway, so we ignore the error here.
Expand Down Expand Up @@ -374,6 +376,7 @@ impl RawData for RawDataServerWrapper {
.with_label_values(&[
request_metadata.request_api_key_name.as_str(),
request_metadata.request_email.as_str(),
request_metadata.processor_name.as_str(),
])
.inc();
}
Expand Down

0 comments on commit 33fcb2e

Please sign in to comment.