Skip to content

Commit

Permalink
Work done: (#257)
Browse files Browse the repository at this point in the history
* restructured metrics (moved to separate module)
* added rest-api specific metrics (current connections, response times)
* added db specific metrics (amount of data fetched from "raw" fields for events)
* added rpc specific metrics

Co-authored-by: Jakub Zajkowski <[email protected]>
  • Loading branch information
zajko and Jakub Zajkowski authored Mar 13, 2024
1 parent 379e920 commit 380cd41
Show file tree
Hide file tree
Showing 38 changed files with 825 additions and 314 deletions.
88 changes: 50 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ members = [
"event_sidecar",
"json_rpc",
"listener",
"metrics",
"rpc_sidecar",
"sidecar",
"types"
Expand All @@ -18,6 +19,7 @@ casper-rpc-sidecar = { path = "./rpc_sidecar", version = "1.0.0" }
datasize = "0.2.11"
futures = "0"
futures-util = "0.3.28"
metrics = { path = "./metrics", version = "1.0.0" }
once_cell = "1.18.0"
thiserror = "1"
tokio = "1.23.1"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ To monitor the Sidecar's memory consumption, observe the metrics page, `http://S
process_resident_memory_bytes 292110336
```

If memory consumption is high without an apparent reason, please inform the Sidecar team by creating an [issue in GitHub](https://github.com/CasperLabs/event-sidecar/issues).
If memory consumption is high without an apparent reason, please inform the Sidecar team by creating an [issue in GitHub](https://github.com/casper-network/casper-sidecar/issues).

Remember to check the `event_stream_buffer_length` setting in the configuration because it dramatically impacts how much memory the Sidecar consumes. Also, some events, like step events, consume more memory.

Expand Down
8 changes: 5 additions & 3 deletions event_sidecar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ readme = "README.md"
description = "App for storing and republishing sse events of a casper node"
license-file = "../LICENSE"
documentation = "README.md"
homepage = "https://github.com/CasperLabs/event-sidecar"
repository = "https://github.com/CasperLabs/event-sidecar"
homepage = "https://github.com/casper-network/casper-sidecar/"
repository = "https://github.com/casper-network/casper-sidecar/"

[features]
additional-metrics = ["casper-event-types/additional-metrics"]
Expand All @@ -31,7 +31,8 @@ hyper = "0.14.4"
indexmap = "2.0.0"
itertools = "0.10.3"
jsonschema = "0.17.1"
once_cell = { workspace = true }
metrics = { workspace = true }
pin-project = "1.1.5"
rand = "0.8.3"
regex = "1.6.0"
reqwest = "0.11.11"
Expand All @@ -57,6 +58,7 @@ casper-event-types = { path = "../types", version = "1.0.0", features = ["sse-da
casper-types = { workspace = true, features = ["std", "testing"] }
colored = "2.0.0"
futures-util = { workspace = true }
once_cell = { workspace = true }
pg-embed = { git = "https://github.com/faokunega/pg-embed", tag = "v0.8.0" }
portpicker = "0.1.1"
pretty_assertions = "1.3.0"
Expand Down
2 changes: 1 addition & 1 deletion event_sidecar/src/admin_server.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::types::config::AdminApiServerConfig;
use crate::utils::{resolve_address, root_filter, Unexpected};
use anyhow::Error;
use casper_event_types::metrics::metrics_summary;
use hyper::Server;
use metrics::metrics_summary;
use std::net::TcpListener;
use std::process::ExitCode;
use std::time::Duration;
Expand Down
Loading

0 comments on commit 380cd41

Please sign in to comment.