-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sdk: Basic connection metrics (#2299)
- Loading branch information
Showing
5 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use once_cell::sync::Lazy; | ||
use prometheus::{HistogramVec, IntCounterVec}; | ||
use spacetimedb_lib::ConnectionId; | ||
use spacetimedb_metrics::metrics_group; | ||
|
||
metrics_group!( | ||
pub struct ClientMetrics { | ||
#[name = spacetime_client_received_total] | ||
#[help = "The cumulative number of received websocket messages"] | ||
#[labels(db: Box<str>, connection_id: ConnectionId)] | ||
pub websocket_received: IntCounterVec, | ||
|
||
#[name = spacetime_client_received_msg_size] | ||
#[help = "The size of received websocket messages"] | ||
#[labels(db: Box<str>, connection_id: ConnectionId)] | ||
pub websocket_received_msg_size: HistogramVec, | ||
} | ||
); | ||
|
||
pub static CLIENT_METRICS: Lazy<ClientMetrics> = Lazy::new(ClientMetrics::new); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d92a3f5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Criterion benchmark results
Error when comparing benchmarks: Couldn't find AWS credentials in environment, credentials file, or IAM role.
Caused by:
Couldn't find AWS credentials in environment, credentials file, or IAM role.
d92a3f5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Callgrind benchmark results
Error when comparing benchmarks: Couldn't find AWS credentials in environment, credentials file, or IAM role.Caused by:
Couldn't find AWS credentials in environment, credentials file, or IAM role.