diff --git a/Cargo.lock b/Cargo.lock index efab3640ec..bc24b44f3a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -839,7 +839,7 @@ dependencies = [ [[package]] name = "clickhouse-inserter" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "async-channel", @@ -863,7 +863,7 @@ dependencies = [ [[package]] name = "clickhouse-user-query" -version = "2.0.33" +version = "2.0.38" dependencies = [ "clickhouse", "serde", @@ -1501,7 +1501,7 @@ checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" [[package]] name = "epoxy" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "axum 0.8.4", @@ -1540,7 +1540,7 @@ dependencies = [ [[package]] name = "epoxy-protocol" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "rivet-util", @@ -1827,7 +1827,7 @@ dependencies = [ [[package]] name = "gasoline" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "async-stream", @@ -1875,7 +1875,7 @@ dependencies = [ [[package]] name = "gasoline-macros" -version = "2.0.33" +version = "2.0.38" dependencies = [ "proc-macro2", "quote", @@ -2921,7 +2921,7 @@ dependencies = [ [[package]] name = "namespace" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "epoxy", @@ -3436,16 +3436,18 @@ checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "pegboard" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "base64 0.22.1", + "bytes", "epoxy", "futures-util", "gasoline", "lazy_static", "namespace", "nix 0.30.1", + "portpicker", "rand 0.8.5", "reqwest", "reqwest-eventsource", @@ -3457,13 +3459,16 @@ dependencies = [ "rivet-metrics", "rivet-runner-protocol", "rivet-runtime", + "rivet-test-deps", "rivet-types", "rivet-util", "serde", "serde_bare", "serde_json", "strum", + "tokio", "tracing", + "tracing-subscriber", "universaldb", "universalpubsub", "url", @@ -3472,33 +3477,9 @@ dependencies = [ "vbare", ] -[[package]] -name = "pegboard-actor-kv" -version = "2.0.33" -dependencies = [ - "anyhow", - "futures-util", - "gasoline", - "pegboard", - "portpicker", - "rivet-config", - "rivet-runner-protocol", - "rivet-test-deps", - "rivet-util-id", - "serde", - "serde_bare", - "tokio", - "tracing", - "tracing-logfmt", - "tracing-subscriber", - "universaldb", - "url", - "uuid", -] - [[package]] name = "pegboard-gateway" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "async-trait", @@ -3531,7 +3512,7 @@ dependencies = [ [[package]] name = "pegboard-runner" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "async-trait", @@ -3546,7 +3527,6 @@ dependencies = [ "lazy_static", "namespace", "pegboard", - "pegboard-actor-kv", "rivet-config", "rivet-data", "rivet-error", @@ -4269,7 +4249,7 @@ dependencies = [ [[package]] name = "rivet-api-builder" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "axum 0.8.4", @@ -4312,7 +4292,7 @@ dependencies = [ [[package]] name = "rivet-api-peer" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "axum 0.8.4", @@ -4323,7 +4303,6 @@ dependencies = [ "indexmap 2.10.0", "namespace", "pegboard", - "pegboard-actor-kv", "rivet-api-builder", "rivet-api-types", "rivet-api-util", @@ -4343,7 +4322,7 @@ dependencies = [ [[package]] name = "rivet-api-public" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "axum 0.8.4", @@ -4376,7 +4355,7 @@ dependencies = [ [[package]] name = "rivet-api-public-openapi-gen" -version = "2.0.33" +version = "2.0.38" dependencies = [ "rivet-api-public", "serde_json", @@ -4385,7 +4364,7 @@ dependencies = [ [[package]] name = "rivet-api-types" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "gasoline", @@ -4400,7 +4379,7 @@ dependencies = [ [[package]] name = "rivet-api-util" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "axum 0.8.4", @@ -4420,7 +4399,7 @@ dependencies = [ [[package]] name = "rivet-bootstrap" -version = "2.0.33" +version = "2.0.38" dependencies = [ "epoxy", "gasoline", @@ -4439,7 +4418,7 @@ dependencies = [ [[package]] name = "rivet-cache" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "futures-util", @@ -4480,14 +4459,14 @@ dependencies = [ [[package]] name = "rivet-cache-result" -version = "2.0.33" +version = "2.0.38" dependencies = [ "rivet-util", ] [[package]] name = "rivet-config" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "config", @@ -4504,9 +4483,18 @@ dependencies = [ "uuid", ] +[[package]] +name = "rivet-config-schema-gen" +version = "2.0.38" +dependencies = [ + "rivet-config", + "schemars 0.8.22", + "serde_json", +] + [[package]] name = "rivet-data" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "gasoline", @@ -4520,7 +4508,7 @@ dependencies = [ [[package]] name = "rivet-engine" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "async-trait", @@ -4589,7 +4577,7 @@ dependencies = [ [[package]] name = "rivet-env" -version = "2.0.33" +version = "2.0.38" dependencies = [ "lazy_static", "uuid", @@ -4597,7 +4585,7 @@ dependencies = [ [[package]] name = "rivet-error" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "indoc", @@ -4609,7 +4597,7 @@ dependencies = [ [[package]] name = "rivet-error-macros" -version = "2.0.33" +version = "2.0.38" dependencies = [ "indoc", "proc-macro2", @@ -4620,7 +4608,7 @@ dependencies = [ [[package]] name = "rivet-guard" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "axum 0.8.4", @@ -4666,7 +4654,7 @@ dependencies = [ [[package]] name = "rivet-guard-core" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "async-trait", @@ -4713,7 +4701,7 @@ dependencies = [ [[package]] name = "rivet-logs" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "chrono", @@ -4727,7 +4715,7 @@ dependencies = [ [[package]] name = "rivet-metrics" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "console-subscriber", @@ -4746,7 +4734,7 @@ dependencies = [ [[package]] name = "rivet-metrics-aggregator" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "epoxy", @@ -4761,7 +4749,7 @@ dependencies = [ [[package]] name = "rivet-pools" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "async-nats", @@ -4794,7 +4782,7 @@ dependencies = [ [[package]] name = "rivet-postgres-util" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "rustls 0.23.29", @@ -4805,7 +4793,7 @@ dependencies = [ [[package]] name = "rivet-runner-protocol" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "gasoline", @@ -4822,7 +4810,7 @@ dependencies = [ [[package]] name = "rivet-runtime" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "console-subscriber", @@ -4849,7 +4837,7 @@ dependencies = [ [[package]] name = "rivet-service-manager" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "chrono", @@ -4866,7 +4854,7 @@ dependencies = [ [[package]] name = "rivet-telemetry" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "rivet-config", @@ -4890,7 +4878,7 @@ dependencies = [ [[package]] name = "rivet-test-deps" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "futures-util", @@ -4908,7 +4896,7 @@ dependencies = [ [[package]] name = "rivet-test-deps-docker" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "portpicker", @@ -4939,7 +4927,7 @@ dependencies = [ [[package]] name = "rivet-tracing-utils" -version = "2.0.33" +version = "2.0.38" dependencies = [ "futures-util", "lazy_static", @@ -4949,7 +4937,7 @@ dependencies = [ [[package]] name = "rivet-types" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "gasoline", @@ -4966,7 +4954,7 @@ dependencies = [ [[package]] name = "rivet-ups-protocol" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "base64 0.22.1", @@ -4979,7 +4967,7 @@ dependencies = [ [[package]] name = "rivet-util" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "async-trait", @@ -5011,7 +4999,7 @@ dependencies = [ [[package]] name = "rivet-util-id" -version = "2.0.33" +version = "2.0.38" dependencies = [ "serde", "thiserror 1.0.69", @@ -5022,7 +5010,7 @@ dependencies = [ [[package]] name = "rivet-workflow-worker" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "epoxy", @@ -6817,7 +6805,7 @@ checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" [[package]] name = "universaldb" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "async-trait", @@ -6848,7 +6836,7 @@ dependencies = [ [[package]] name = "universalpubsub" -version = "2.0.33" +version = "2.0.38" dependencies = [ "anyhow", "async-nats", diff --git a/Cargo.toml b/Cargo.toml index 7ab76dc331..e3c138bf2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [workspace] resolver = "2" members = [ - "engine/packages/actor-kv", "engine/packages/api-builder", "engine/packages/api-peer", "engine/packages/api-public", + "engine/packages/api-public-openapi-gen", "engine/packages/api-types", "engine/packages/api-util", "engine/packages/bootstrap", @@ -14,7 +14,7 @@ members = [ "engine/packages/clickhouse-inserter", "engine/packages/clickhouse-user-query", "engine/packages/config", - "engine/packages/api-public-openapi-gen", + "engine/packages/config-schema-gen", "engine/packages/engine", "engine/packages/env", "engine/packages/epoxy", @@ -53,98 +53,98 @@ members = [ "engine/sdks/rust/ups-protocol" ] -[workspace.package] -version = "2.0.38" -edition = "2024" -authors = [ "Rivet Gaming, LLC " ] -license = "Apache-2.0" - -[workspace.dependencies] -anyhow = "1.0.82" -async-channel = "2.1.1" -async-nats = "0.33" -async-stream = "0.3" -async-trait = "0.1" -axum-test = "17" -base64 = "0.22" -bcrypt = "0.13.0" -bytes = "1.6.0" -cjson = "0.1" -colored_json = "5.0.0" -console-subscriber = "0.4" -dirs = "5.0.1" -divan = "0.1.17" -foundationdb-tuple = "0.9.1" -fs_extra = "1.3.0" -futures = "0.3.30" -futures-util = "0.3" -glob = "0.3.1" -governor = "0.6" -heck = "0.5" -hex = "0.4" -http = "1.3.1" -http-body = "1.0.0" -http-body-util = "0.1.1" -hyper-tls = "0.5.0" -hyper-tungstenite = "0.17.0" -include_dir = "0.7.4" -indoc = "2.0.5" -itertools = "0.14.0" -json5 = "0.4.1" -lazy_static = "1.4" -libc = "0.2" -lz4_flex = "0.11.3" -maplit = "1.0.2" -md5 = "0.7.0" -once_cell = "1.20.2" -opentelemetry-appender-tracing = "0.28.1" -papaya = "0.2.1" -pest_derive = "2.7" -portpicker = "0.1" -prettyplease = "0.2" -prometheus = "0.14" -quote = "1.0" -rand = "0.8" -regex = "1.4" -rstest = "0.26.1" -rustls-pemfile = "2.2.0" -rustyline = "15.0.0" -scc = "3.3.2" -semver = "1.0.27" -serde_bare = "0.5.0" -serde_html_form = "0.2.7" -serde_yaml = "0.9.34" -sha2 = "0.10" -slog = "2.7" -slog-async = "2.8" -slog-term = "2.9" -statrs = "0.18" -sysinfo = "0.37.2" -tabled = "0.17.0" -tempfile = "3.13.0" -testcontainers = "0.24" -thiserror = "1.0.64" -tokio-cron-scheduler = "0.13.0" -tokio-native-tls = "0.3.1" -tokio-stream = "0.1.15" -tokio-tungstenite = "0.26.0" -tokio-util = "0.7" -tower = "0.5" -tracing = "0.1.40" -tracing-core = "0.1" -tracing-opentelemetry = "0.29" -tracing-slog = "0.2" -vergen-gitcl = "1.0.0" -reqwest-eventsource = "0.6.0" - -[workspace.dependencies.vergen] -version = "9.0.4" -features = [ "build", "cargo", "rustc" ] - -[workspace.dependencies.sentry] -version = "0.45.0" -default-features = false -features = [ + [workspace.package] + version = "2.0.38" + edition = "2024" + authors = [ "Rivet Gaming, LLC " ] + license = "Apache-2.0" + + [workspace.dependencies] + anyhow = "1.0.82" + async-channel = "2.1.1" + async-nats = "0.33" + async-stream = "0.3" + async-trait = "0.1" + axum-test = "17" + base64 = "0.22" + bcrypt = "0.13.0" + bytes = "1.6.0" + cjson = "0.1" + colored_json = "5.0.0" + console-subscriber = "0.4" + dirs = "5.0.1" + divan = "0.1.17" + foundationdb-tuple = "0.9.1" + fs_extra = "1.3.0" + futures = "0.3.30" + futures-util = "0.3" + glob = "0.3.1" + governor = "0.6" + heck = "0.5" + hex = "0.4" + http = "1.3.1" + http-body = "1.0.0" + http-body-util = "0.1.1" + hyper-tls = "0.5.0" + hyper-tungstenite = "0.17.0" + include_dir = "0.7.4" + indoc = "2.0.5" + itertools = "0.14.0" + json5 = "0.4.1" + lazy_static = "1.4" + libc = "0.2" + lz4_flex = "0.11.3" + maplit = "1.0.2" + md5 = "0.7.0" + once_cell = "1.20.2" + opentelemetry-appender-tracing = "0.28.1" + papaya = "0.2.1" + pest_derive = "2.7" + portpicker = "0.1" + prettyplease = "0.2" + prometheus = "0.14" + quote = "1.0" + rand = "0.8" + regex = "1.4" + rstest = "0.26.1" + rustls-pemfile = "2.2.0" + rustyline = "15.0.0" + scc = "3.3.2" + semver = "1.0.27" + serde_bare = "0.5.0" + serde_html_form = "0.2.7" + serde_yaml = "0.9.34" + sha2 = "0.10" + slog = "2.7" + slog-async = "2.8" + slog-term = "2.9" + statrs = "0.18" + sysinfo = "0.37.2" + tabled = "0.17.0" + tempfile = "3.13.0" + testcontainers = "0.24" + thiserror = "1.0.64" + tokio-cron-scheduler = "0.13.0" + tokio-native-tls = "0.3.1" + tokio-stream = "0.1.15" + tokio-tungstenite = "0.26.0" + tokio-util = "0.7" + tower = "0.5" + tracing = "0.1.40" + tracing-core = "0.1" + tracing-opentelemetry = "0.29" + tracing-slog = "0.2" + vergen-gitcl = "1.0.0" + reqwest-eventsource = "0.6.0" + + [workspace.dependencies.vergen] + version = "9.0.4" + features = [ "build", "cargo", "rustc" ] + + [workspace.dependencies.sentry] + version = "0.45.0" + default-features = false + features = [ "anyhow", "backtrace", "contexts", @@ -155,9 +155,9 @@ features = [ "tracing" ] -[workspace.dependencies.windows] -version = "0.58" -features = [ + [workspace.dependencies.windows] + version = "0.58" + features = [ "Win32", "Win32_Storage", "Win32_Storage_FileSystem", @@ -166,341 +166,341 @@ features = [ "Win32_Security" ] -[workspace.dependencies.pest] -version = "2.7" + [workspace.dependencies.pest] + version = "2.7" -[workspace.dependencies.rocksdb] -version = "0.24" -features = [ "multi-threaded-cf" ] + [workspace.dependencies.rocksdb] + version = "0.24" + features = [ "multi-threaded-cf" ] -[workspace.dependencies.hyper-util] -version = "0.1.10" -features = [ "full" ] + [workspace.dependencies.hyper-util] + version = "0.1.10" + features = [ "full" ] -[workspace.dependencies.rustls] -version = "0.23.25" -default-features = false -features = [ "ring", "std", "logging" ] + [workspace.dependencies.rustls] + version = "0.23.25" + default-features = false + features = [ "ring", "std", "logging" ] -[workspace.dependencies.tokio-rustls] -version = "0.26.2" -default-features = false -features = [ "ring", "logging" ] + [workspace.dependencies.tokio-rustls] + version = "0.26.2" + default-features = false + features = [ "ring", "logging" ] -[workspace.dependencies.utoipa] -version = "5.4.0" -features = [ "uuid" ] + [workspace.dependencies.utoipa] + version = "5.4.0" + features = [ "uuid" ] -[workspace.dependencies.axum] -version = "0.8" -features = [ "http2", "macros" ] + [workspace.dependencies.axum] + version = "0.8" + features = [ "http2", "macros" ] -[workspace.dependencies.axum-extra] -version = "0.10.1" -features = [ "query" ] + [workspace.dependencies.axum-extra] + version = "0.10.1" + features = [ "query" ] -[workspace.dependencies.tower-http] -version = "0.6" -features = [ "cors", "trace" ] + [workspace.dependencies.tower-http] + version = "0.6" + features = [ "cors", "trace" ] -[workspace.dependencies.serde_json] -version = "1.0.128" -features = [ "raw_value" ] + [workspace.dependencies.serde_json] + version = "1.0.128" + features = [ "raw_value" ] -[workspace.dependencies.nix] -version = "0.30" -default-features = false -features = [ "fs", "user", "signal" ] + [workspace.dependencies.nix] + version = "0.30" + default-features = false + features = [ "fs", "user", "signal" ] -[workspace.dependencies.chrono] -version = "0.4.38" -features = [ "now" ] + [workspace.dependencies.chrono] + version = "0.4.38" + features = [ "now" ] -[workspace.dependencies.clap] -version = "4.3" -features = [ "derive", "cargo" ] + [workspace.dependencies.clap] + version = "4.3" + features = [ "derive", "cargo" ] -[workspace.dependencies.rivet-term] -git = "https://github.com/rivet-dev/rivet-term" -rev = "55e328470b68c557fb9bc8298369f90182d35b6d" + [workspace.dependencies.rivet-term] + git = "https://github.com/rivet-dev/rivet-term" + rev = "55e328470b68c557fb9bc8298369f90182d35b6d" -[workspace.dependencies.clickhouse] -version = "0.11.2" -features = [ "uuid" ] + [workspace.dependencies.clickhouse] + version = "0.11.2" + features = [ "uuid" ] -[workspace.dependencies.config] -version = "0.14.0" -default-features = false -features = [ "async", "json", "yaml" ] + [workspace.dependencies.config] + version = "0.14.0" + default-features = false + features = [ "async", "json", "yaml" ] -[workspace.dependencies.hyper] -version = "0.14" -features = [ "server", "http1", "tcp" ] + [workspace.dependencies.hyper] + version = "0.14" + features = [ "server", "http1", "tcp" ] -[workspace.dependencies.indexmap] -version = "2.0" -features = [ "serde" ] + [workspace.dependencies.indexmap] + version = "2.0" + features = [ "serde" ] -[workspace.dependencies.ipnet] -version = "2.10.1" -features = [ "serde" ] + [workspace.dependencies.ipnet] + version = "2.10.1" + features = [ "serde" ] -[workspace.dependencies.moka] -version = "0.12" -features = [ "future" ] + [workspace.dependencies.moka] + version = "0.12" + features = [ "future" ] -[workspace.dependencies.opentelemetry] -version = "0.28" -features = [ "trace", "metrics", "logs" ] + [workspace.dependencies.opentelemetry] + version = "0.28" + features = [ "trace", "metrics", "logs" ] -[workspace.dependencies.opentelemetry-otlp] -version = "0.28" -features = [ "trace", "metrics", "logs", "grpc-tonic" ] + [workspace.dependencies.opentelemetry-otlp] + version = "0.28" + features = [ "trace", "metrics", "logs", "grpc-tonic" ] -[workspace.dependencies.opentelemetry_sdk] -version = "0.28" -features = [ "trace", "metrics", "logs" ] + [workspace.dependencies.opentelemetry_sdk] + version = "0.28" + features = [ "trace", "metrics", "logs" ] -[workspace.dependencies.opentelemetry-semantic-conventions] -version = "0.28" -features = [ "semconv_experimental" ] + [workspace.dependencies.opentelemetry-semantic-conventions] + version = "0.28" + features = [ "semconv_experimental" ] -[workspace.dependencies.opentelemetry-stdout] -version = "0.28.0" -features = [ "trace", "metrics", "logs" ] + [workspace.dependencies.opentelemetry-stdout] + version = "0.28.0" + features = [ "trace", "metrics", "logs" ] -[workspace.dependencies.proc-macro2] -version = "1.0" -features = [ "span-locations" ] + [workspace.dependencies.proc-macro2] + version = "1.0" + features = [ "span-locations" ] -[workspace.dependencies.reqwest] -version = "0.12.22" -features = [ "json" ] + [workspace.dependencies.reqwest] + version = "0.12.22" + features = [ "json" ] -[workspace.dependencies.schemars] -version = "0.8.21" -features = [ "url", "uuid1" ] + [workspace.dependencies.schemars] + version = "0.8.21" + features = [ "url", "uuid1" ] -[workspace.dependencies.serde] -version = "1.0" -features = [ "derive" ] + [workspace.dependencies.serde] + version = "1.0" + features = [ "derive" ] -[workspace.dependencies.strum] -version = "0.26.3" -features = [ "derive" ] + [workspace.dependencies.strum] + version = "0.26.3" + features = [ "derive" ] -[workspace.dependencies.syn] -version = "2.0" -features = [ "full", "extra-traits" ] + [workspace.dependencies.syn] + version = "2.0" + features = [ "full", "extra-traits" ] -[workspace.dependencies.url] -version = "2.5.4" -features = [ "serde" ] + [workspace.dependencies.url] + version = "2.5.4" + features = [ "serde" ] -[workspace.dependencies.urlencoding] -version = "2.1" + [workspace.dependencies.urlencoding] + version = "2.1" -[workspace.dependencies.uuid] -version = "1.11.0" -features = [ "v4", "serde" ] + [workspace.dependencies.uuid] + version = "1.11.0" + features = [ "v4", "serde" ] -[workspace.dependencies.tokio] -version = "1.44.0" -features = [ "full", "tracing" ] + [workspace.dependencies.tokio] + version = "1.44.0" + features = [ "full", "tracing" ] -[workspace.dependencies.tokio-postgres] -version = "0.7" -features = [ "with-chrono-0_4" ] + [workspace.dependencies.tokio-postgres] + version = "0.7" + features = [ "with-chrono-0_4" ] -[workspace.dependencies.deadpool-postgres] -version = "0.14.1" + [workspace.dependencies.deadpool-postgres] + version = "0.14.1" -[workspace.dependencies.tokio-postgres-rustls] -version = "0.13" + [workspace.dependencies.tokio-postgres-rustls] + version = "0.13" -[workspace.dependencies.webpki-roots] -version = "0.26" + [workspace.dependencies.webpki-roots] + version = "0.26" -[workspace.dependencies.tracing-logfmt] -version = "0.3" -features = [ "ansi_logs" ] + [workspace.dependencies.tracing-logfmt] + version = "0.3" + features = [ "ansi_logs" ] -[workspace.dependencies.tracing-subscriber] -version = "0.3" -default-features = false -features = [ "ansi", "fmt", "json", "env-filter" ] + [workspace.dependencies.tracing-subscriber] + version = "0.3" + default-features = false + features = [ "ansi", "fmt", "json", "env-filter" ] -[workspace.dependencies.vbare] -version = "0.0.4" + [workspace.dependencies.vbare] + version = "0.0.4" -[workspace.dependencies.vbare-compiler] -version = "0.0.4" + [workspace.dependencies.vbare-compiler] + version = "0.0.4" -[workspace.dependencies.pegboard-actor-kv] -path = "engine/packages/actor-kv" + [workspace.dependencies.rivet-api-builder] + path = "engine/packages/api-builder" -[workspace.dependencies.rivet-api-builder] -path = "engine/packages/api-builder" + [workspace.dependencies.rivet-api-peer] + path = "engine/packages/api-peer" -[workspace.dependencies.rivet-api-peer] -path = "engine/packages/api-peer" + [workspace.dependencies.rivet-api-public] + path = "engine/packages/api-public" -[workspace.dependencies.rivet-api-public] -path = "engine/packages/api-public" + [workspace.dependencies.rivet-api-public-openapi-gen] + path = "engine/packages/api-public-openapi-gen" -[workspace.dependencies.rivet-api-types] -path = "engine/packages/api-types" + [workspace.dependencies.rivet-api-types] + path = "engine/packages/api-types" -[workspace.dependencies.rivet-api-util] -path = "engine/packages/api-util" + [workspace.dependencies.rivet-api-util] + path = "engine/packages/api-util" -[workspace.dependencies.rivet-bootstrap] -path = "engine/packages/bootstrap" + [workspace.dependencies.rivet-bootstrap] + path = "engine/packages/bootstrap" -[workspace.dependencies.rivet-cache] -path = "engine/packages/cache" + [workspace.dependencies.rivet-cache] + path = "engine/packages/cache" -[workspace.dependencies.rivet-cache-purge] -path = "engine/packages/cache-purge" + [workspace.dependencies.rivet-cache-purge] + path = "engine/packages/cache-purge" -[workspace.dependencies.rivet-cache-result] -path = "engine/packages/cache-result" + [workspace.dependencies.rivet-cache-result] + path = "engine/packages/cache-result" -[workspace.dependencies.clickhouse-inserter] -path = "engine/packages/clickhouse-inserter" + [workspace.dependencies.clickhouse-inserter] + path = "engine/packages/clickhouse-inserter" -[workspace.dependencies.clickhouse-user-query] -path = "engine/packages/clickhouse-user-query" + [workspace.dependencies.clickhouse-user-query] + path = "engine/packages/clickhouse-user-query" -[workspace.dependencies.rivet-config] -path = "engine/packages/config" + [workspace.dependencies.rivet-config] + path = "engine/packages/config" -[workspace.dependencies.rivet-api-public-openapi-gen] -path = "engine/packages/api-public-openapi-gen" + [workspace.dependencies.rivet-config-schema-gen] + path = "engine/packages/config-schema-gen" -[workspace.dependencies.rivet-engine] -path = "engine/packages/engine" + [workspace.dependencies.rivet-engine] + path = "engine/packages/engine" -[workspace.dependencies.rivet-env] -path = "engine/packages/env" + [workspace.dependencies.rivet-env] + path = "engine/packages/env" -[workspace.dependencies.epoxy] -path = "engine/packages/epoxy" + [workspace.dependencies.epoxy] + path = "engine/packages/epoxy" -[workspace.dependencies.rivet-error] -path = "engine/packages/error" + [workspace.dependencies.rivet-error] + path = "engine/packages/error" -[workspace.dependencies.rivet-error-macros] -path = "engine/packages/error-macros" + [workspace.dependencies.rivet-error-macros] + path = "engine/packages/error-macros" -[workspace.dependencies.gasoline] -path = "engine/packages/gasoline" + [workspace.dependencies.gasoline] + path = "engine/packages/gasoline" -[workspace.dependencies.gas] -package = "gasoline" -path = "engine/packages/gasoline" + [workspace.dependencies.gas] + package = "gasoline" + path = "engine/packages/gasoline" -[workspace.dependencies.gasoline-macros] -path = "engine/packages/gasoline-macros" + [workspace.dependencies.gasoline-macros] + path = "engine/packages/gasoline-macros" -[workspace.dependencies.rivet-guard] -path = "engine/packages/guard" + [workspace.dependencies.rivet-guard] + path = "engine/packages/guard" -[workspace.dependencies.rivet-guard-core] -path = "engine/packages/guard-core" + [workspace.dependencies.rivet-guard-core] + path = "engine/packages/guard-core" -[workspace.dependencies.rivet-logs] -path = "engine/packages/logs" + [workspace.dependencies.rivet-logs] + path = "engine/packages/logs" -[workspace.dependencies.rivet-metrics] -path = "engine/packages/metrics" + [workspace.dependencies.rivet-metrics] + path = "engine/packages/metrics" -[workspace.dependencies.rivet-metrics-aggregator] -path = "engine/packages/metrics-aggregator" + [workspace.dependencies.rivet-metrics-aggregator] + path = "engine/packages/metrics-aggregator" -[workspace.dependencies.namespace] -path = "engine/packages/namespace" + [workspace.dependencies.namespace] + path = "engine/packages/namespace" -[workspace.dependencies.pegboard] -path = "engine/packages/pegboard" + [workspace.dependencies.pegboard] + path = "engine/packages/pegboard" -[workspace.dependencies.pegboard-gateway] -path = "engine/packages/pegboard-gateway" + [workspace.dependencies.pegboard-gateway] + path = "engine/packages/pegboard-gateway" -[workspace.dependencies.pegboard-runner] -path = "engine/packages/pegboard-runner" + [workspace.dependencies.pegboard-runner] + path = "engine/packages/pegboard-runner" -[workspace.dependencies.rivet-pools] -path = "engine/packages/pools" + [workspace.dependencies.rivet-pools] + path = "engine/packages/pools" -[workspace.dependencies.rivet-postgres-util] -path = "engine/packages/postgres-util" + [workspace.dependencies.rivet-postgres-util] + path = "engine/packages/postgres-util" -[workspace.dependencies.rivet-runtime] -path = "engine/packages/runtime" + [workspace.dependencies.rivet-runtime] + path = "engine/packages/runtime" -[workspace.dependencies.rivet-service-manager] -path = "engine/packages/service-manager" + [workspace.dependencies.rivet-service-manager] + path = "engine/packages/service-manager" -[workspace.dependencies.rivet-telemetry] -path = "engine/packages/telemetry" + [workspace.dependencies.rivet-telemetry] + path = "engine/packages/telemetry" -[workspace.dependencies.rivet-test-deps] -path = "engine/packages/test-deps" + [workspace.dependencies.rivet-test-deps] + path = "engine/packages/test-deps" -[workspace.dependencies.rivet-test-deps-docker] -path = "engine/packages/test-deps-docker" + [workspace.dependencies.rivet-test-deps-docker] + path = "engine/packages/test-deps-docker" -[workspace.dependencies.rivet-tracing-reconfigure] -path = "engine/packages/tracing-reconfigure" + [workspace.dependencies.rivet-tracing-reconfigure] + path = "engine/packages/tracing-reconfigure" -[workspace.dependencies.rivet-tracing-utils] -path = "engine/packages/tracing-utils" + [workspace.dependencies.rivet-tracing-utils] + path = "engine/packages/tracing-utils" -[workspace.dependencies.rivet-types] -path = "engine/packages/types" + [workspace.dependencies.rivet-types] + path = "engine/packages/types" -[workspace.dependencies.universaldb] -path = "engine/packages/universaldb" + [workspace.dependencies.universaldb] + path = "engine/packages/universaldb" -[workspace.dependencies.universalpubsub] -path = "engine/packages/universalpubsub" + [workspace.dependencies.universalpubsub] + path = "engine/packages/universalpubsub" -[workspace.dependencies.rivet-util] -path = "engine/packages/util" + [workspace.dependencies.rivet-util] + path = "engine/packages/util" -[workspace.dependencies.util] -package = "rivet-util" -path = "engine/packages/util" + [workspace.dependencies.util] + package = "rivet-util" + path = "engine/packages/util" -[workspace.dependencies.rivet-util-id] -path = "engine/packages/util-id" + [workspace.dependencies.rivet-util-id] + path = "engine/packages/util-id" -[workspace.dependencies.rivet-workflow-worker] -path = "engine/packages/workflow-worker" + [workspace.dependencies.rivet-workflow-worker] + path = "engine/packages/workflow-worker" -[workspace.dependencies.rivet-api-full] -path = "engine/sdks/rust/api-full" + [workspace.dependencies.rivet-api-full] + path = "engine/sdks/rust/api-full" -[workspace.dependencies.rivet-data] -path = "engine/sdks/rust/data" + [workspace.dependencies.rivet-data] + path = "engine/sdks/rust/data" -[workspace.dependencies.epoxy-protocol] -path = "engine/sdks/rust/epoxy-protocol" + [workspace.dependencies.epoxy-protocol] + path = "engine/sdks/rust/epoxy-protocol" -[workspace.dependencies.rivet-runner-protocol] -path = "engine/sdks/rust/runner-protocol" + [workspace.dependencies.rivet-runner-protocol] + path = "engine/sdks/rust/runner-protocol" -[workspace.dependencies.rivet-ups-protocol] -path = "engine/sdks/rust/ups-protocol" + [workspace.dependencies.rivet-ups-protocol] + path = "engine/sdks/rust/ups-protocol" [profile.dev] overflow-checks = false debug = true lto = "off" -[profile.dev.build-override] -opt-level = 3 + [profile.dev.build-override] + opt-level = 3 [profile.release] debug = false diff --git a/docs/engine/GASOLINE/GOTCHAS.md b/docs/engine/GASOLINE/GOTCHAS.md index aa90e9e132..64dabe6294 100644 --- a/docs/engine/GASOLINE/GOTCHAS.md +++ b/docs/engine/GASOLINE/GOTCHAS.md @@ -1,3 +1,11 @@ # Gotchas -TODO +## Signal tags + +Internally, it is more efficient to order signal tags in a manner of most unique to least unique: + +- Given a workflow with tags: + - namespace = foo + - type = normal + +The signal should be published with `namespace = foo` first, then `type = normal` diff --git a/docs/engine/GASOLINE/WORKFLOW_HISTORY.md b/docs/engine/GASOLINE/WORKFLOW_HISTORY.md index 2dba84cad5..ee12dc3fae 100644 --- a/docs/engine/GASOLINE/WORKFLOW_HISTORY.md +++ b/docs/engine/GASOLINE/WORKFLOW_HISTORY.md @@ -68,7 +68,7 @@ If we want this workflow to remain the same but new workflows to execute a diffe // Activity foo ctx.activity(...).await?; -match ctx.check_version(2).await { +match ctx.check_version(2).await? { // The existing workflow will always match this path because the next event (activity bar) has version 1 1 => { // Here we need to keep the workflow steps as expected by the history, run activity bar @@ -81,7 +81,7 @@ match ctx.check_version(2).await { } } -ctx.sleep().await +ctx.sleep().await?; ``` Version checks are durable because if history already exists at the location they are added then they do not manipulate the database and read the version of that history event. But if the version check is at the end of the current branch of events (as in a new workflow), it will be inserted as an event itself. This means the workflow history for both workflows will look like this: diff --git a/engine/docker/dev-host/grafana/dashboards/epoxy.json b/engine/docker/dev-host/grafana/dashboards/epoxy.json new file mode 100644 index 0000000000..2f4f526fdc --- /dev/null +++ b/engine/docker/dev-host/grafana/dashboards/epoxy.json @@ -0,0 +1,1606 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_proposals_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Proposals/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 1, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_epoxy_proposal_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Proposal Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_pre_accept_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Pre Accepts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 4, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_accept_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Accepts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_commit_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Commits/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 7, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_epoxy_request_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Request Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_requests_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Requests/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_quorum_size{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Quorum Size", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 32 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_quorum_attempts_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Quorum Attempts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_ballot_epoch{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Epoch", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_ballot_number{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Number", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_instance_number{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Instance Number", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 48 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_replicas_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Replicas Total", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 48 + }, + "id": 14, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_ballot_rejections_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Rejections/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 56 + }, + "id": 15, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_interference_detected_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Interference/s", + "type": "timeseries" + } + ], + "preload": false, + "schemaVersion": 41, + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up,rivet_project)", + "includeAll": true, + "label": "Project", + "multi": true, + "name": "project", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up,rivet_project)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + }, + { + "current": { + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "includeAll": true, + "label": "Datacenter", + "multi": true, + "name": "datacenter", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Epoxy", + "uid": "", + "version": 0 +} \ No newline at end of file diff --git a/engine/docker/dev-host/grafana/dashboards/gasoline.json b/engine/docker/dev-host/grafana/dashboards/gasoline.json index bc9ab21960..0c6616f4e3 100644 --- a/engine/docker/dev-host/grafana/dashboards/gasoline.json +++ b/engine/docker/dev-host/grafana/dashboards/gasoline.json @@ -772,7 +772,7 @@ "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 0, + "fillOpacity": 30, "gradientMode": "none", "hideFrom": { "legend": false, @@ -793,7 +793,7 @@ "spanNulls": false, "stacking": { "group": "A", - "mode": "none" + "mode": "normal" }, "thresholdsStyle": { "mode": "off" @@ -1033,7 +1033,7 @@ }, "gridPos": { "h": 8, - "w": 13, + "w": 12, "x": 0, "y": 43 }, @@ -1073,6 +1073,95 @@ "title": "Active Workers", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 43 + }, + "id": 33, + "interval": "15s", + "options": { + "calculate": false, + "calculation": { + "xBuckets": { + "mode": "size" + } + }, + "cellGap": 0, + "cellValues": {}, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "max": "60", + "min": 0, + "reverse": false, + "unit": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gasoline_worker_bumps_per_tick_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "legendFormat": "{{le}}", + "range": true, + "refId": "A" + } + ], + "title": "Worker Bumps Per Tick", + "type": "heatmap" + }, { "datasource": { "type": "prometheus", @@ -1635,13 +1724,102 @@ "title": "Load Shedding Ratio", "type": "heatmap" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 76 + }, + "id": 34, + "interval": "15s", + "options": { + "calculate": false, + "calculation": { + "xBuckets": { + "mode": "size" + } + }, + "cellGap": 0, + "cellValues": {}, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "max": "60", + "min": 0, + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gasoline_workflow_wake_delta_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\",workflow_name=~\"$workflow_name\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "legendFormat": "{{le}}", + "range": true, + "refId": "A" + } + ], + "title": "Workflow Wake Delta", + "type": "heatmap" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 76 + "y": 84 }, "id": 16, "panels": [], @@ -1672,7 +1850,7 @@ "h": 9, "w": 12, "x": 0, - "y": 77 + "y": 85 }, "id": 12, "interval": "15s", @@ -1801,7 +1979,7 @@ "h": 9, "w": 12, "x": 12, - "y": 77 + "y": 85 }, "id": 9, "interval": "15s", @@ -1863,7 +2041,7 @@ "h": 9, "w": 12, "x": 0, - "y": 86 + "y": 94 }, "id": 21, "interval": "15s", @@ -2024,7 +2202,7 @@ "h": 9, "w": 12, "x": 12, - "y": 86 + "y": 94 }, "id": 25, "interval": "15s", @@ -2086,7 +2264,7 @@ "h": 9, "w": 12, "x": 0, - "y": 95 + "y": 103 }, "id": 27, "interval": "15s", @@ -2174,7 +2352,7 @@ "h": 9, "w": 12, "x": 12, - "y": 95 + "y": 103 }, "id": 17, "interval": "15s", @@ -2262,7 +2440,7 @@ "h": 9, "w": 12, "x": 0, - "y": 104 + "y": 112 }, "id": 22, "interval": "15s", @@ -2350,7 +2528,7 @@ "h": 9, "w": 12, "x": 12, - "y": 104 + "y": 112 }, "id": 19, "interval": "15s", @@ -2423,9 +2601,11 @@ "list": [ { "current": { - "text": "All", + "text": [ + "prod" + ], "value": [ - "$__all" + "prod" ] }, "datasource": { @@ -2450,11 +2630,9 @@ }, { "current": { - "text": [ - "us-east-1" - ], + "text": "All", "value": [ - "us-east-1" + "$__all" ] }, "datasource": { @@ -2480,10 +2658,10 @@ { "current": { "text": [ - "pegboard_runner_pool" + "All" ], "value": [ - "pegboard_runner_pool" + "$__all" ] }, "datasource": { @@ -2515,5 +2693,5 @@ "timezone": "", "title": "Gasoline", "uid": "636d22f9-d18f-4086-8b45-7c50886a105c", - "version": 5 + "version": 7 } \ No newline at end of file diff --git a/engine/docker/dev-host/grafana/dashboards/guard.json b/engine/docker/dev-host/grafana/dashboards/guard.json index 03241fc4f5..f6190ff52c 100644 --- a/engine/docker/dev-host/grafana/dashboards/guard.json +++ b/engine/docker/dev-host/grafana/dashboards/guard.json @@ -37,6 +37,7 @@ "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", + "axisSoftMin": 0, "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", @@ -306,13 +307,114 @@ "title": "In-Flight Requests", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 8 + }, + "id": 19, + "options": { + "legend": { + "calcs": [ + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (router) (rate(rivet_guard_route_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\",k8s_pod_name=~\"$k8s_pod_name\"} [$__rate_interval]))", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Requests Routed/s", + "type": "timeseries" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 8 + "y": 16 }, "id": 16, "panels": [], @@ -384,7 +486,7 @@ "h": 8, "w": 8, "x": 0, - "y": 9 + "y": 17 }, "id": 2, "options": { @@ -488,7 +590,7 @@ "h": 8, "w": 8, "x": 8, - "y": 9 + "y": 17 }, "id": 5, "options": { @@ -550,7 +652,7 @@ "h": 8, "w": 8, "x": 16, - "y": 9 + "y": 17 }, "id": 1, "options": { @@ -613,7 +715,7 @@ "h": 1, "w": 24, "x": 0, - "y": 17 + "y": 25 }, "id": 17, "panels": [], @@ -685,7 +787,7 @@ "h": 8, "w": 8, "x": 0, - "y": 18 + "y": 26 }, "id": 7, "options": { @@ -789,7 +891,7 @@ "h": 8, "w": 8, "x": 8, - "y": 18 + "y": 26 }, "id": 8, "options": { @@ -851,7 +953,7 @@ "h": 8, "w": 8, "x": 16, - "y": 18 + "y": 26 }, "id": 9, "options": { @@ -914,7 +1016,7 @@ "h": 1, "w": 24, "x": 0, - "y": 26 + "y": 34 }, "id": 15, "panels": [], @@ -986,7 +1088,7 @@ "h": 8, "w": 8, "x": 0, - "y": 27 + "y": 35 }, "id": 10, "options": { @@ -1089,7 +1191,7 @@ "h": 8, "w": 8, "x": 8, - "y": 27 + "y": 35 }, "id": 11, "options": { @@ -1192,7 +1294,7 @@ "h": 8, "w": 8, "x": 16, - "y": 27 + "y": 35 }, "id": 12, "options": { @@ -1239,9 +1341,11 @@ "list": [ { "current": { - "text": "All", + "text": [ + "prod" + ], "value": [ - "$__all" + "prod" ] }, "datasource": { @@ -1319,12 +1423,12 @@ ] }, "time": { - "from": "now-12h", + "from": "now-15m", "to": "now" }, "timepicker": {}, "timezone": "browser", "title": "Guard", "uid": "cen785ige8fswd", - "version": 3 + "version": 6 } \ No newline at end of file diff --git a/engine/docker/dev-host/grafana/dashboards/pegboard.json b/engine/docker/dev-host/grafana/dashboards/pegboard.json new file mode 100644 index 0000000000..52bd7422d4 --- /dev/null +++ b/engine/docker/dev-host/grafana/dashboards/pegboard.json @@ -0,0 +1,1274 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 13, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_pegboard_actor_allocate_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Actor Allocate Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_actor_pending_allocation{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Actor Pending Allocation", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 4, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gateway_tunnel_ping_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Tunnel Ping", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 1, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_serverless_desired_slots{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Serverless Desired Slots", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 7, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_serverless_outbound_req_active{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Outbound Req Active", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_serverless_outbound_req_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Outbound Req Started/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_runner_connection_active{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Connection Active", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_runner_connection_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Connections/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 32 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_event_multiplexer_count{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Event Multiplexer Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_ingested_events_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Events Ingested/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 3, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_pegboard_runner_receive_init_packet_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Runner Receive Init Packet Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_runner_version_upgrade_drain_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Upgrade Drain", + "type": "timeseries" + } + ], + "preload": false, + "schemaVersion": 41, + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": [ + "prod" + ], + "value": [ + "prod" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up,rivet_project)", + "includeAll": true, + "label": "Project", + "multi": true, + "name": "project", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up,rivet_project)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + }, + { + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "includeAll": true, + "label": "Datacenter", + "multi": true, + "name": "datacenter", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Pegboard", + "uid": "afa77odsjjk74d", + "version": 1 +} \ No newline at end of file diff --git a/engine/docker/dev-multidc-multinode/core/grafana/dashboards/epoxy.json b/engine/docker/dev-multidc-multinode/core/grafana/dashboards/epoxy.json new file mode 100644 index 0000000000..2f4f526fdc --- /dev/null +++ b/engine/docker/dev-multidc-multinode/core/grafana/dashboards/epoxy.json @@ -0,0 +1,1606 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_proposals_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Proposals/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 1, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_epoxy_proposal_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Proposal Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_pre_accept_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Pre Accepts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 4, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_accept_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Accepts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_commit_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Commits/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 7, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_epoxy_request_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Request Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_requests_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Requests/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_quorum_size{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Quorum Size", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 32 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_quorum_attempts_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Quorum Attempts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_ballot_epoch{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Epoch", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_ballot_number{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Number", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_instance_number{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Instance Number", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 48 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_replicas_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Replicas Total", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 48 + }, + "id": 14, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_ballot_rejections_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Rejections/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 56 + }, + "id": 15, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_interference_detected_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Interference/s", + "type": "timeseries" + } + ], + "preload": false, + "schemaVersion": 41, + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up,rivet_project)", + "includeAll": true, + "label": "Project", + "multi": true, + "name": "project", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up,rivet_project)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + }, + { + "current": { + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "includeAll": true, + "label": "Datacenter", + "multi": true, + "name": "datacenter", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Epoxy", + "uid": "", + "version": 0 +} \ No newline at end of file diff --git a/engine/docker/dev-multidc-multinode/core/grafana/dashboards/gasoline.json b/engine/docker/dev-multidc-multinode/core/grafana/dashboards/gasoline.json index bc9ab21960..0c6616f4e3 100644 --- a/engine/docker/dev-multidc-multinode/core/grafana/dashboards/gasoline.json +++ b/engine/docker/dev-multidc-multinode/core/grafana/dashboards/gasoline.json @@ -772,7 +772,7 @@ "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 0, + "fillOpacity": 30, "gradientMode": "none", "hideFrom": { "legend": false, @@ -793,7 +793,7 @@ "spanNulls": false, "stacking": { "group": "A", - "mode": "none" + "mode": "normal" }, "thresholdsStyle": { "mode": "off" @@ -1033,7 +1033,7 @@ }, "gridPos": { "h": 8, - "w": 13, + "w": 12, "x": 0, "y": 43 }, @@ -1073,6 +1073,95 @@ "title": "Active Workers", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 43 + }, + "id": 33, + "interval": "15s", + "options": { + "calculate": false, + "calculation": { + "xBuckets": { + "mode": "size" + } + }, + "cellGap": 0, + "cellValues": {}, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "max": "60", + "min": 0, + "reverse": false, + "unit": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gasoline_worker_bumps_per_tick_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "legendFormat": "{{le}}", + "range": true, + "refId": "A" + } + ], + "title": "Worker Bumps Per Tick", + "type": "heatmap" + }, { "datasource": { "type": "prometheus", @@ -1635,13 +1724,102 @@ "title": "Load Shedding Ratio", "type": "heatmap" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 76 + }, + "id": 34, + "interval": "15s", + "options": { + "calculate": false, + "calculation": { + "xBuckets": { + "mode": "size" + } + }, + "cellGap": 0, + "cellValues": {}, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "max": "60", + "min": 0, + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gasoline_workflow_wake_delta_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\",workflow_name=~\"$workflow_name\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "legendFormat": "{{le}}", + "range": true, + "refId": "A" + } + ], + "title": "Workflow Wake Delta", + "type": "heatmap" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 76 + "y": 84 }, "id": 16, "panels": [], @@ -1672,7 +1850,7 @@ "h": 9, "w": 12, "x": 0, - "y": 77 + "y": 85 }, "id": 12, "interval": "15s", @@ -1801,7 +1979,7 @@ "h": 9, "w": 12, "x": 12, - "y": 77 + "y": 85 }, "id": 9, "interval": "15s", @@ -1863,7 +2041,7 @@ "h": 9, "w": 12, "x": 0, - "y": 86 + "y": 94 }, "id": 21, "interval": "15s", @@ -2024,7 +2202,7 @@ "h": 9, "w": 12, "x": 12, - "y": 86 + "y": 94 }, "id": 25, "interval": "15s", @@ -2086,7 +2264,7 @@ "h": 9, "w": 12, "x": 0, - "y": 95 + "y": 103 }, "id": 27, "interval": "15s", @@ -2174,7 +2352,7 @@ "h": 9, "w": 12, "x": 12, - "y": 95 + "y": 103 }, "id": 17, "interval": "15s", @@ -2262,7 +2440,7 @@ "h": 9, "w": 12, "x": 0, - "y": 104 + "y": 112 }, "id": 22, "interval": "15s", @@ -2350,7 +2528,7 @@ "h": 9, "w": 12, "x": 12, - "y": 104 + "y": 112 }, "id": 19, "interval": "15s", @@ -2423,9 +2601,11 @@ "list": [ { "current": { - "text": "All", + "text": [ + "prod" + ], "value": [ - "$__all" + "prod" ] }, "datasource": { @@ -2450,11 +2630,9 @@ }, { "current": { - "text": [ - "us-east-1" - ], + "text": "All", "value": [ - "us-east-1" + "$__all" ] }, "datasource": { @@ -2480,10 +2658,10 @@ { "current": { "text": [ - "pegboard_runner_pool" + "All" ], "value": [ - "pegboard_runner_pool" + "$__all" ] }, "datasource": { @@ -2515,5 +2693,5 @@ "timezone": "", "title": "Gasoline", "uid": "636d22f9-d18f-4086-8b45-7c50886a105c", - "version": 5 + "version": 7 } \ No newline at end of file diff --git a/engine/docker/dev-multidc-multinode/core/grafana/dashboards/guard.json b/engine/docker/dev-multidc-multinode/core/grafana/dashboards/guard.json index 03241fc4f5..f6190ff52c 100644 --- a/engine/docker/dev-multidc-multinode/core/grafana/dashboards/guard.json +++ b/engine/docker/dev-multidc-multinode/core/grafana/dashboards/guard.json @@ -37,6 +37,7 @@ "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", + "axisSoftMin": 0, "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", @@ -306,13 +307,114 @@ "title": "In-Flight Requests", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 8 + }, + "id": 19, + "options": { + "legend": { + "calcs": [ + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (router) (rate(rivet_guard_route_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\",k8s_pod_name=~\"$k8s_pod_name\"} [$__rate_interval]))", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Requests Routed/s", + "type": "timeseries" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 8 + "y": 16 }, "id": 16, "panels": [], @@ -384,7 +486,7 @@ "h": 8, "w": 8, "x": 0, - "y": 9 + "y": 17 }, "id": 2, "options": { @@ -488,7 +590,7 @@ "h": 8, "w": 8, "x": 8, - "y": 9 + "y": 17 }, "id": 5, "options": { @@ -550,7 +652,7 @@ "h": 8, "w": 8, "x": 16, - "y": 9 + "y": 17 }, "id": 1, "options": { @@ -613,7 +715,7 @@ "h": 1, "w": 24, "x": 0, - "y": 17 + "y": 25 }, "id": 17, "panels": [], @@ -685,7 +787,7 @@ "h": 8, "w": 8, "x": 0, - "y": 18 + "y": 26 }, "id": 7, "options": { @@ -789,7 +891,7 @@ "h": 8, "w": 8, "x": 8, - "y": 18 + "y": 26 }, "id": 8, "options": { @@ -851,7 +953,7 @@ "h": 8, "w": 8, "x": 16, - "y": 18 + "y": 26 }, "id": 9, "options": { @@ -914,7 +1016,7 @@ "h": 1, "w": 24, "x": 0, - "y": 26 + "y": 34 }, "id": 15, "panels": [], @@ -986,7 +1088,7 @@ "h": 8, "w": 8, "x": 0, - "y": 27 + "y": 35 }, "id": 10, "options": { @@ -1089,7 +1191,7 @@ "h": 8, "w": 8, "x": 8, - "y": 27 + "y": 35 }, "id": 11, "options": { @@ -1192,7 +1294,7 @@ "h": 8, "w": 8, "x": 16, - "y": 27 + "y": 35 }, "id": 12, "options": { @@ -1239,9 +1341,11 @@ "list": [ { "current": { - "text": "All", + "text": [ + "prod" + ], "value": [ - "$__all" + "prod" ] }, "datasource": { @@ -1319,12 +1423,12 @@ ] }, "time": { - "from": "now-12h", + "from": "now-15m", "to": "now" }, "timepicker": {}, "timezone": "browser", "title": "Guard", "uid": "cen785ige8fswd", - "version": 3 + "version": 6 } \ No newline at end of file diff --git a/engine/docker/dev-multidc-multinode/core/grafana/dashboards/pegboard.json b/engine/docker/dev-multidc-multinode/core/grafana/dashboards/pegboard.json new file mode 100644 index 0000000000..52bd7422d4 --- /dev/null +++ b/engine/docker/dev-multidc-multinode/core/grafana/dashboards/pegboard.json @@ -0,0 +1,1274 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 13, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_pegboard_actor_allocate_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Actor Allocate Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_actor_pending_allocation{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Actor Pending Allocation", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 4, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gateway_tunnel_ping_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Tunnel Ping", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 1, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_serverless_desired_slots{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Serverless Desired Slots", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 7, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_serverless_outbound_req_active{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Outbound Req Active", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_serverless_outbound_req_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Outbound Req Started/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_runner_connection_active{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Connection Active", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_runner_connection_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Connections/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 32 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_event_multiplexer_count{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Event Multiplexer Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_ingested_events_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Events Ingested/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 3, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_pegboard_runner_receive_init_packet_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Runner Receive Init Packet Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_runner_version_upgrade_drain_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Upgrade Drain", + "type": "timeseries" + } + ], + "preload": false, + "schemaVersion": 41, + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": [ + "prod" + ], + "value": [ + "prod" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up,rivet_project)", + "includeAll": true, + "label": "Project", + "multi": true, + "name": "project", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up,rivet_project)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + }, + { + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "includeAll": true, + "label": "Datacenter", + "multi": true, + "name": "datacenter", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Pegboard", + "uid": "afa77odsjjk74d", + "version": 1 +} \ No newline at end of file diff --git a/engine/docker/dev-multidc/core/grafana/dashboards/epoxy.json b/engine/docker/dev-multidc/core/grafana/dashboards/epoxy.json new file mode 100644 index 0000000000..2f4f526fdc --- /dev/null +++ b/engine/docker/dev-multidc/core/grafana/dashboards/epoxy.json @@ -0,0 +1,1606 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_proposals_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Proposals/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 1, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_epoxy_proposal_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Proposal Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_pre_accept_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Pre Accepts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 4, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_accept_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Accepts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_commit_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Commits/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 7, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_epoxy_request_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Request Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_requests_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Requests/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_quorum_size{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Quorum Size", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 32 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_quorum_attempts_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Quorum Attempts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_ballot_epoch{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Epoch", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_ballot_number{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Number", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_instance_number{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Instance Number", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 48 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_replicas_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Replicas Total", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 48 + }, + "id": 14, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_ballot_rejections_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Rejections/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 56 + }, + "id": 15, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_interference_detected_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Interference/s", + "type": "timeseries" + } + ], + "preload": false, + "schemaVersion": 41, + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up,rivet_project)", + "includeAll": true, + "label": "Project", + "multi": true, + "name": "project", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up,rivet_project)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + }, + { + "current": { + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "includeAll": true, + "label": "Datacenter", + "multi": true, + "name": "datacenter", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Epoxy", + "uid": "", + "version": 0 +} \ No newline at end of file diff --git a/engine/docker/dev-multidc/core/grafana/dashboards/gasoline.json b/engine/docker/dev-multidc/core/grafana/dashboards/gasoline.json index bc9ab21960..0c6616f4e3 100644 --- a/engine/docker/dev-multidc/core/grafana/dashboards/gasoline.json +++ b/engine/docker/dev-multidc/core/grafana/dashboards/gasoline.json @@ -772,7 +772,7 @@ "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 0, + "fillOpacity": 30, "gradientMode": "none", "hideFrom": { "legend": false, @@ -793,7 +793,7 @@ "spanNulls": false, "stacking": { "group": "A", - "mode": "none" + "mode": "normal" }, "thresholdsStyle": { "mode": "off" @@ -1033,7 +1033,7 @@ }, "gridPos": { "h": 8, - "w": 13, + "w": 12, "x": 0, "y": 43 }, @@ -1073,6 +1073,95 @@ "title": "Active Workers", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 43 + }, + "id": 33, + "interval": "15s", + "options": { + "calculate": false, + "calculation": { + "xBuckets": { + "mode": "size" + } + }, + "cellGap": 0, + "cellValues": {}, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "max": "60", + "min": 0, + "reverse": false, + "unit": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gasoline_worker_bumps_per_tick_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "legendFormat": "{{le}}", + "range": true, + "refId": "A" + } + ], + "title": "Worker Bumps Per Tick", + "type": "heatmap" + }, { "datasource": { "type": "prometheus", @@ -1635,13 +1724,102 @@ "title": "Load Shedding Ratio", "type": "heatmap" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 76 + }, + "id": 34, + "interval": "15s", + "options": { + "calculate": false, + "calculation": { + "xBuckets": { + "mode": "size" + } + }, + "cellGap": 0, + "cellValues": {}, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "max": "60", + "min": 0, + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gasoline_workflow_wake_delta_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\",workflow_name=~\"$workflow_name\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "legendFormat": "{{le}}", + "range": true, + "refId": "A" + } + ], + "title": "Workflow Wake Delta", + "type": "heatmap" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 76 + "y": 84 }, "id": 16, "panels": [], @@ -1672,7 +1850,7 @@ "h": 9, "w": 12, "x": 0, - "y": 77 + "y": 85 }, "id": 12, "interval": "15s", @@ -1801,7 +1979,7 @@ "h": 9, "w": 12, "x": 12, - "y": 77 + "y": 85 }, "id": 9, "interval": "15s", @@ -1863,7 +2041,7 @@ "h": 9, "w": 12, "x": 0, - "y": 86 + "y": 94 }, "id": 21, "interval": "15s", @@ -2024,7 +2202,7 @@ "h": 9, "w": 12, "x": 12, - "y": 86 + "y": 94 }, "id": 25, "interval": "15s", @@ -2086,7 +2264,7 @@ "h": 9, "w": 12, "x": 0, - "y": 95 + "y": 103 }, "id": 27, "interval": "15s", @@ -2174,7 +2352,7 @@ "h": 9, "w": 12, "x": 12, - "y": 95 + "y": 103 }, "id": 17, "interval": "15s", @@ -2262,7 +2440,7 @@ "h": 9, "w": 12, "x": 0, - "y": 104 + "y": 112 }, "id": 22, "interval": "15s", @@ -2350,7 +2528,7 @@ "h": 9, "w": 12, "x": 12, - "y": 104 + "y": 112 }, "id": 19, "interval": "15s", @@ -2423,9 +2601,11 @@ "list": [ { "current": { - "text": "All", + "text": [ + "prod" + ], "value": [ - "$__all" + "prod" ] }, "datasource": { @@ -2450,11 +2630,9 @@ }, { "current": { - "text": [ - "us-east-1" - ], + "text": "All", "value": [ - "us-east-1" + "$__all" ] }, "datasource": { @@ -2480,10 +2658,10 @@ { "current": { "text": [ - "pegboard_runner_pool" + "All" ], "value": [ - "pegboard_runner_pool" + "$__all" ] }, "datasource": { @@ -2515,5 +2693,5 @@ "timezone": "", "title": "Gasoline", "uid": "636d22f9-d18f-4086-8b45-7c50886a105c", - "version": 5 + "version": 7 } \ No newline at end of file diff --git a/engine/docker/dev-multidc/core/grafana/dashboards/guard.json b/engine/docker/dev-multidc/core/grafana/dashboards/guard.json index 03241fc4f5..f6190ff52c 100644 --- a/engine/docker/dev-multidc/core/grafana/dashboards/guard.json +++ b/engine/docker/dev-multidc/core/grafana/dashboards/guard.json @@ -37,6 +37,7 @@ "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", + "axisSoftMin": 0, "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", @@ -306,13 +307,114 @@ "title": "In-Flight Requests", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 8 + }, + "id": 19, + "options": { + "legend": { + "calcs": [ + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (router) (rate(rivet_guard_route_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\",k8s_pod_name=~\"$k8s_pod_name\"} [$__rate_interval]))", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Requests Routed/s", + "type": "timeseries" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 8 + "y": 16 }, "id": 16, "panels": [], @@ -384,7 +486,7 @@ "h": 8, "w": 8, "x": 0, - "y": 9 + "y": 17 }, "id": 2, "options": { @@ -488,7 +590,7 @@ "h": 8, "w": 8, "x": 8, - "y": 9 + "y": 17 }, "id": 5, "options": { @@ -550,7 +652,7 @@ "h": 8, "w": 8, "x": 16, - "y": 9 + "y": 17 }, "id": 1, "options": { @@ -613,7 +715,7 @@ "h": 1, "w": 24, "x": 0, - "y": 17 + "y": 25 }, "id": 17, "panels": [], @@ -685,7 +787,7 @@ "h": 8, "w": 8, "x": 0, - "y": 18 + "y": 26 }, "id": 7, "options": { @@ -789,7 +891,7 @@ "h": 8, "w": 8, "x": 8, - "y": 18 + "y": 26 }, "id": 8, "options": { @@ -851,7 +953,7 @@ "h": 8, "w": 8, "x": 16, - "y": 18 + "y": 26 }, "id": 9, "options": { @@ -914,7 +1016,7 @@ "h": 1, "w": 24, "x": 0, - "y": 26 + "y": 34 }, "id": 15, "panels": [], @@ -986,7 +1088,7 @@ "h": 8, "w": 8, "x": 0, - "y": 27 + "y": 35 }, "id": 10, "options": { @@ -1089,7 +1191,7 @@ "h": 8, "w": 8, "x": 8, - "y": 27 + "y": 35 }, "id": 11, "options": { @@ -1192,7 +1294,7 @@ "h": 8, "w": 8, "x": 16, - "y": 27 + "y": 35 }, "id": 12, "options": { @@ -1239,9 +1341,11 @@ "list": [ { "current": { - "text": "All", + "text": [ + "prod" + ], "value": [ - "$__all" + "prod" ] }, "datasource": { @@ -1319,12 +1423,12 @@ ] }, "time": { - "from": "now-12h", + "from": "now-15m", "to": "now" }, "timepicker": {}, "timezone": "browser", "title": "Guard", "uid": "cen785ige8fswd", - "version": 3 + "version": 6 } \ No newline at end of file diff --git a/engine/docker/dev-multidc/core/grafana/dashboards/pegboard.json b/engine/docker/dev-multidc/core/grafana/dashboards/pegboard.json new file mode 100644 index 0000000000..52bd7422d4 --- /dev/null +++ b/engine/docker/dev-multidc/core/grafana/dashboards/pegboard.json @@ -0,0 +1,1274 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 13, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_pegboard_actor_allocate_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Actor Allocate Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_actor_pending_allocation{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Actor Pending Allocation", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 4, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gateway_tunnel_ping_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Tunnel Ping", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 1, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_serverless_desired_slots{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Serverless Desired Slots", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 7, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_serverless_outbound_req_active{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Outbound Req Active", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_serverless_outbound_req_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Outbound Req Started/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_runner_connection_active{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Connection Active", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_runner_connection_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Connections/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 32 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_event_multiplexer_count{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Event Multiplexer Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_ingested_events_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Events Ingested/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 3, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_pegboard_runner_receive_init_packet_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Runner Receive Init Packet Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_runner_version_upgrade_drain_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Upgrade Drain", + "type": "timeseries" + } + ], + "preload": false, + "schemaVersion": 41, + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": [ + "prod" + ], + "value": [ + "prod" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up,rivet_project)", + "includeAll": true, + "label": "Project", + "multi": true, + "name": "project", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up,rivet_project)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + }, + { + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "includeAll": true, + "label": "Datacenter", + "multi": true, + "name": "datacenter", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Pegboard", + "uid": "afa77odsjjk74d", + "version": 1 +} \ No newline at end of file diff --git a/engine/docker/dev-multinode/grafana/dashboards/epoxy.json b/engine/docker/dev-multinode/grafana/dashboards/epoxy.json new file mode 100644 index 0000000000..2f4f526fdc --- /dev/null +++ b/engine/docker/dev-multinode/grafana/dashboards/epoxy.json @@ -0,0 +1,1606 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_proposals_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Proposals/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 1, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_epoxy_proposal_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Proposal Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_pre_accept_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Pre Accepts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 4, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_accept_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Accepts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_commit_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Commits/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 7, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_epoxy_request_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Request Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_requests_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Requests/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_quorum_size{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Quorum Size", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 32 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_quorum_attempts_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Quorum Attempts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_ballot_epoch{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Epoch", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_ballot_number{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Number", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_instance_number{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Instance Number", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 48 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_replicas_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Replicas Total", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 48 + }, + "id": 14, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_ballot_rejections_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Rejections/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 56 + }, + "id": 15, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_interference_detected_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Interference/s", + "type": "timeseries" + } + ], + "preload": false, + "schemaVersion": 41, + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up,rivet_project)", + "includeAll": true, + "label": "Project", + "multi": true, + "name": "project", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up,rivet_project)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + }, + { + "current": { + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "includeAll": true, + "label": "Datacenter", + "multi": true, + "name": "datacenter", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Epoxy", + "uid": "", + "version": 0 +} \ No newline at end of file diff --git a/engine/docker/dev-multinode/grafana/dashboards/gasoline.json b/engine/docker/dev-multinode/grafana/dashboards/gasoline.json index bc9ab21960..0c6616f4e3 100644 --- a/engine/docker/dev-multinode/grafana/dashboards/gasoline.json +++ b/engine/docker/dev-multinode/grafana/dashboards/gasoline.json @@ -772,7 +772,7 @@ "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 0, + "fillOpacity": 30, "gradientMode": "none", "hideFrom": { "legend": false, @@ -793,7 +793,7 @@ "spanNulls": false, "stacking": { "group": "A", - "mode": "none" + "mode": "normal" }, "thresholdsStyle": { "mode": "off" @@ -1033,7 +1033,7 @@ }, "gridPos": { "h": 8, - "w": 13, + "w": 12, "x": 0, "y": 43 }, @@ -1073,6 +1073,95 @@ "title": "Active Workers", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 43 + }, + "id": 33, + "interval": "15s", + "options": { + "calculate": false, + "calculation": { + "xBuckets": { + "mode": "size" + } + }, + "cellGap": 0, + "cellValues": {}, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "max": "60", + "min": 0, + "reverse": false, + "unit": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gasoline_worker_bumps_per_tick_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "legendFormat": "{{le}}", + "range": true, + "refId": "A" + } + ], + "title": "Worker Bumps Per Tick", + "type": "heatmap" + }, { "datasource": { "type": "prometheus", @@ -1635,13 +1724,102 @@ "title": "Load Shedding Ratio", "type": "heatmap" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 76 + }, + "id": 34, + "interval": "15s", + "options": { + "calculate": false, + "calculation": { + "xBuckets": { + "mode": "size" + } + }, + "cellGap": 0, + "cellValues": {}, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "max": "60", + "min": 0, + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gasoline_workflow_wake_delta_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\",workflow_name=~\"$workflow_name\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "legendFormat": "{{le}}", + "range": true, + "refId": "A" + } + ], + "title": "Workflow Wake Delta", + "type": "heatmap" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 76 + "y": 84 }, "id": 16, "panels": [], @@ -1672,7 +1850,7 @@ "h": 9, "w": 12, "x": 0, - "y": 77 + "y": 85 }, "id": 12, "interval": "15s", @@ -1801,7 +1979,7 @@ "h": 9, "w": 12, "x": 12, - "y": 77 + "y": 85 }, "id": 9, "interval": "15s", @@ -1863,7 +2041,7 @@ "h": 9, "w": 12, "x": 0, - "y": 86 + "y": 94 }, "id": 21, "interval": "15s", @@ -2024,7 +2202,7 @@ "h": 9, "w": 12, "x": 12, - "y": 86 + "y": 94 }, "id": 25, "interval": "15s", @@ -2086,7 +2264,7 @@ "h": 9, "w": 12, "x": 0, - "y": 95 + "y": 103 }, "id": 27, "interval": "15s", @@ -2174,7 +2352,7 @@ "h": 9, "w": 12, "x": 12, - "y": 95 + "y": 103 }, "id": 17, "interval": "15s", @@ -2262,7 +2440,7 @@ "h": 9, "w": 12, "x": 0, - "y": 104 + "y": 112 }, "id": 22, "interval": "15s", @@ -2350,7 +2528,7 @@ "h": 9, "w": 12, "x": 12, - "y": 104 + "y": 112 }, "id": 19, "interval": "15s", @@ -2423,9 +2601,11 @@ "list": [ { "current": { - "text": "All", + "text": [ + "prod" + ], "value": [ - "$__all" + "prod" ] }, "datasource": { @@ -2450,11 +2630,9 @@ }, { "current": { - "text": [ - "us-east-1" - ], + "text": "All", "value": [ - "us-east-1" + "$__all" ] }, "datasource": { @@ -2480,10 +2658,10 @@ { "current": { "text": [ - "pegboard_runner_pool" + "All" ], "value": [ - "pegboard_runner_pool" + "$__all" ] }, "datasource": { @@ -2515,5 +2693,5 @@ "timezone": "", "title": "Gasoline", "uid": "636d22f9-d18f-4086-8b45-7c50886a105c", - "version": 5 + "version": 7 } \ No newline at end of file diff --git a/engine/docker/dev-multinode/grafana/dashboards/guard.json b/engine/docker/dev-multinode/grafana/dashboards/guard.json index 03241fc4f5..f6190ff52c 100644 --- a/engine/docker/dev-multinode/grafana/dashboards/guard.json +++ b/engine/docker/dev-multinode/grafana/dashboards/guard.json @@ -37,6 +37,7 @@ "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", + "axisSoftMin": 0, "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", @@ -306,13 +307,114 @@ "title": "In-Flight Requests", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 8 + }, + "id": 19, + "options": { + "legend": { + "calcs": [ + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (router) (rate(rivet_guard_route_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\",k8s_pod_name=~\"$k8s_pod_name\"} [$__rate_interval]))", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Requests Routed/s", + "type": "timeseries" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 8 + "y": 16 }, "id": 16, "panels": [], @@ -384,7 +486,7 @@ "h": 8, "w": 8, "x": 0, - "y": 9 + "y": 17 }, "id": 2, "options": { @@ -488,7 +590,7 @@ "h": 8, "w": 8, "x": 8, - "y": 9 + "y": 17 }, "id": 5, "options": { @@ -550,7 +652,7 @@ "h": 8, "w": 8, "x": 16, - "y": 9 + "y": 17 }, "id": 1, "options": { @@ -613,7 +715,7 @@ "h": 1, "w": 24, "x": 0, - "y": 17 + "y": 25 }, "id": 17, "panels": [], @@ -685,7 +787,7 @@ "h": 8, "w": 8, "x": 0, - "y": 18 + "y": 26 }, "id": 7, "options": { @@ -789,7 +891,7 @@ "h": 8, "w": 8, "x": 8, - "y": 18 + "y": 26 }, "id": 8, "options": { @@ -851,7 +953,7 @@ "h": 8, "w": 8, "x": 16, - "y": 18 + "y": 26 }, "id": 9, "options": { @@ -914,7 +1016,7 @@ "h": 1, "w": 24, "x": 0, - "y": 26 + "y": 34 }, "id": 15, "panels": [], @@ -986,7 +1088,7 @@ "h": 8, "w": 8, "x": 0, - "y": 27 + "y": 35 }, "id": 10, "options": { @@ -1089,7 +1191,7 @@ "h": 8, "w": 8, "x": 8, - "y": 27 + "y": 35 }, "id": 11, "options": { @@ -1192,7 +1294,7 @@ "h": 8, "w": 8, "x": 16, - "y": 27 + "y": 35 }, "id": 12, "options": { @@ -1239,9 +1341,11 @@ "list": [ { "current": { - "text": "All", + "text": [ + "prod" + ], "value": [ - "$__all" + "prod" ] }, "datasource": { @@ -1319,12 +1423,12 @@ ] }, "time": { - "from": "now-12h", + "from": "now-15m", "to": "now" }, "timepicker": {}, "timezone": "browser", "title": "Guard", "uid": "cen785ige8fswd", - "version": 3 + "version": 6 } \ No newline at end of file diff --git a/engine/docker/dev-multinode/grafana/dashboards/pegboard.json b/engine/docker/dev-multinode/grafana/dashboards/pegboard.json new file mode 100644 index 0000000000..52bd7422d4 --- /dev/null +++ b/engine/docker/dev-multinode/grafana/dashboards/pegboard.json @@ -0,0 +1,1274 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 13, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_pegboard_actor_allocate_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Actor Allocate Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_actor_pending_allocation{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Actor Pending Allocation", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 4, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gateway_tunnel_ping_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Tunnel Ping", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 1, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_serverless_desired_slots{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Serverless Desired Slots", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 7, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_serverless_outbound_req_active{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Outbound Req Active", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_serverless_outbound_req_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Outbound Req Started/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_runner_connection_active{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Connection Active", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_runner_connection_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Connections/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 32 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_event_multiplexer_count{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Event Multiplexer Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_ingested_events_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Events Ingested/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 3, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_pegboard_runner_receive_init_packet_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Runner Receive Init Packet Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_runner_version_upgrade_drain_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Upgrade Drain", + "type": "timeseries" + } + ], + "preload": false, + "schemaVersion": 41, + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": [ + "prod" + ], + "value": [ + "prod" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up,rivet_project)", + "includeAll": true, + "label": "Project", + "multi": true, + "name": "project", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up,rivet_project)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + }, + { + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "includeAll": true, + "label": "Datacenter", + "multi": true, + "name": "datacenter", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Pegboard", + "uid": "afa77odsjjk74d", + "version": 1 +} \ No newline at end of file diff --git a/engine/docker/dev/grafana/dashboards/epoxy.json b/engine/docker/dev/grafana/dashboards/epoxy.json new file mode 100644 index 0000000000..2f4f526fdc --- /dev/null +++ b/engine/docker/dev/grafana/dashboards/epoxy.json @@ -0,0 +1,1606 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_proposals_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Proposals/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 1, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_epoxy_proposal_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Proposal Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_pre_accept_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Pre Accepts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 4, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_accept_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Accepts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_commit_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Commits/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 7, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_epoxy_request_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Request Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_requests_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Requests/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_quorum_size{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Quorum Size", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 32 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_quorum_attempts_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Quorum Attempts/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_ballot_epoch{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Epoch", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_ballot_number{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Number", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_instance_number{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Instance Number", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 48 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_epoxy_replicas_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Replicas Total", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 48 + }, + "id": 14, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_ballot_rejections_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Ballot Rejections/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 56 + }, + "id": 15, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_interference_detected_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{rivet_datacenter}}", + "range": true, + "refId": "A" + } + ], + "title": "Interference/s", + "type": "timeseries" + } + ], + "preload": false, + "schemaVersion": 41, + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": "prod", + "value": "prod" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up,rivet_project)", + "includeAll": true, + "label": "Project", + "multi": true, + "name": "project", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up,rivet_project)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + }, + { + "current": { + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "includeAll": true, + "label": "Datacenter", + "multi": true, + "name": "datacenter", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Epoxy", + "uid": "", + "version": 0 +} \ No newline at end of file diff --git a/engine/docker/dev/grafana/dashboards/gasoline.json b/engine/docker/dev/grafana/dashboards/gasoline.json index bc9ab21960..0c6616f4e3 100644 --- a/engine/docker/dev/grafana/dashboards/gasoline.json +++ b/engine/docker/dev/grafana/dashboards/gasoline.json @@ -772,7 +772,7 @@ "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 0, + "fillOpacity": 30, "gradientMode": "none", "hideFrom": { "legend": false, @@ -793,7 +793,7 @@ "spanNulls": false, "stacking": { "group": "A", - "mode": "none" + "mode": "normal" }, "thresholdsStyle": { "mode": "off" @@ -1033,7 +1033,7 @@ }, "gridPos": { "h": 8, - "w": 13, + "w": 12, "x": 0, "y": 43 }, @@ -1073,6 +1073,95 @@ "title": "Active Workers", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 43 + }, + "id": 33, + "interval": "15s", + "options": { + "calculate": false, + "calculation": { + "xBuckets": { + "mode": "size" + } + }, + "cellGap": 0, + "cellValues": {}, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "max": "60", + "min": 0, + "reverse": false, + "unit": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gasoline_worker_bumps_per_tick_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "legendFormat": "{{le}}", + "range": true, + "refId": "A" + } + ], + "title": "Worker Bumps Per Tick", + "type": "heatmap" + }, { "datasource": { "type": "prometheus", @@ -1635,13 +1724,102 @@ "title": "Load Shedding Ratio", "type": "heatmap" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 76 + }, + "id": 34, + "interval": "15s", + "options": { + "calculate": false, + "calculation": { + "xBuckets": { + "mode": "size" + } + }, + "cellGap": 0, + "cellValues": {}, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "max": "60", + "min": 0, + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gasoline_workflow_wake_delta_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\",workflow_name=~\"$workflow_name\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "legendFormat": "{{le}}", + "range": true, + "refId": "A" + } + ], + "title": "Workflow Wake Delta", + "type": "heatmap" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 76 + "y": 84 }, "id": 16, "panels": [], @@ -1672,7 +1850,7 @@ "h": 9, "w": 12, "x": 0, - "y": 77 + "y": 85 }, "id": 12, "interval": "15s", @@ -1801,7 +1979,7 @@ "h": 9, "w": 12, "x": 12, - "y": 77 + "y": 85 }, "id": 9, "interval": "15s", @@ -1863,7 +2041,7 @@ "h": 9, "w": 12, "x": 0, - "y": 86 + "y": 94 }, "id": 21, "interval": "15s", @@ -2024,7 +2202,7 @@ "h": 9, "w": 12, "x": 12, - "y": 86 + "y": 94 }, "id": 25, "interval": "15s", @@ -2086,7 +2264,7 @@ "h": 9, "w": 12, "x": 0, - "y": 95 + "y": 103 }, "id": 27, "interval": "15s", @@ -2174,7 +2352,7 @@ "h": 9, "w": 12, "x": 12, - "y": 95 + "y": 103 }, "id": 17, "interval": "15s", @@ -2262,7 +2440,7 @@ "h": 9, "w": 12, "x": 0, - "y": 104 + "y": 112 }, "id": 22, "interval": "15s", @@ -2350,7 +2528,7 @@ "h": 9, "w": 12, "x": 12, - "y": 104 + "y": 112 }, "id": 19, "interval": "15s", @@ -2423,9 +2601,11 @@ "list": [ { "current": { - "text": "All", + "text": [ + "prod" + ], "value": [ - "$__all" + "prod" ] }, "datasource": { @@ -2450,11 +2630,9 @@ }, { "current": { - "text": [ - "us-east-1" - ], + "text": "All", "value": [ - "us-east-1" + "$__all" ] }, "datasource": { @@ -2480,10 +2658,10 @@ { "current": { "text": [ - "pegboard_runner_pool" + "All" ], "value": [ - "pegboard_runner_pool" + "$__all" ] }, "datasource": { @@ -2515,5 +2693,5 @@ "timezone": "", "title": "Gasoline", "uid": "636d22f9-d18f-4086-8b45-7c50886a105c", - "version": 5 + "version": 7 } \ No newline at end of file diff --git a/engine/docker/dev/grafana/dashboards/guard.json b/engine/docker/dev/grafana/dashboards/guard.json index 03241fc4f5..f6190ff52c 100644 --- a/engine/docker/dev/grafana/dashboards/guard.json +++ b/engine/docker/dev/grafana/dashboards/guard.json @@ -37,6 +37,7 @@ "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", + "axisSoftMin": 0, "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", @@ -306,13 +307,114 @@ "title": "In-Flight Requests", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 8 + }, + "id": 19, + "options": { + "legend": { + "calcs": [ + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (router) (rate(rivet_guard_route_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\",k8s_pod_name=~\"$k8s_pod_name\"} [$__rate_interval]))", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Requests Routed/s", + "type": "timeseries" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 8 + "y": 16 }, "id": 16, "panels": [], @@ -384,7 +486,7 @@ "h": 8, "w": 8, "x": 0, - "y": 9 + "y": 17 }, "id": 2, "options": { @@ -488,7 +590,7 @@ "h": 8, "w": 8, "x": 8, - "y": 9 + "y": 17 }, "id": 5, "options": { @@ -550,7 +652,7 @@ "h": 8, "w": 8, "x": 16, - "y": 9 + "y": 17 }, "id": 1, "options": { @@ -613,7 +715,7 @@ "h": 1, "w": 24, "x": 0, - "y": 17 + "y": 25 }, "id": 17, "panels": [], @@ -685,7 +787,7 @@ "h": 8, "w": 8, "x": 0, - "y": 18 + "y": 26 }, "id": 7, "options": { @@ -789,7 +891,7 @@ "h": 8, "w": 8, "x": 8, - "y": 18 + "y": 26 }, "id": 8, "options": { @@ -851,7 +953,7 @@ "h": 8, "w": 8, "x": 16, - "y": 18 + "y": 26 }, "id": 9, "options": { @@ -914,7 +1016,7 @@ "h": 1, "w": 24, "x": 0, - "y": 26 + "y": 34 }, "id": 15, "panels": [], @@ -986,7 +1088,7 @@ "h": 8, "w": 8, "x": 0, - "y": 27 + "y": 35 }, "id": 10, "options": { @@ -1089,7 +1191,7 @@ "h": 8, "w": 8, "x": 8, - "y": 27 + "y": 35 }, "id": 11, "options": { @@ -1192,7 +1294,7 @@ "h": 8, "w": 8, "x": 16, - "y": 27 + "y": 35 }, "id": 12, "options": { @@ -1239,9 +1341,11 @@ "list": [ { "current": { - "text": "All", + "text": [ + "prod" + ], "value": [ - "$__all" + "prod" ] }, "datasource": { @@ -1319,12 +1423,12 @@ ] }, "time": { - "from": "now-12h", + "from": "now-15m", "to": "now" }, "timepicker": {}, "timezone": "browser", "title": "Guard", "uid": "cen785ige8fswd", - "version": 3 + "version": 6 } \ No newline at end of file diff --git a/engine/docker/dev/grafana/dashboards/pegboard.json b/engine/docker/dev/grafana/dashboards/pegboard.json new file mode 100644 index 0000000000..52bd7422d4 --- /dev/null +++ b/engine/docker/dev/grafana/dashboards/pegboard.json @@ -0,0 +1,1274 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 13, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_pegboard_actor_allocate_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Actor Allocate Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_actor_pending_allocation{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Actor Pending Allocation", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 4, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_gateway_tunnel_ping_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Tunnel Ping", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 1, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_serverless_desired_slots{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Serverless Desired Slots", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 7, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_serverless_outbound_req_active{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Outbound Req Active", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_serverless_outbound_req_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Outbound Req Started/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_runner_connection_active{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Connection Active", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_runner_connection_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Connections/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 32 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_event_multiplexer_count{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Event Multiplexer Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rate(rivet_pegboard_ingested_events_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval]))", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Events Ingested/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 3, + "options": { + "calculate": false, + "cellGap": 0, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(increase(rivet_pegboard_runner_receive_init_packet_duration_bucket{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"} [$__rate_interval])) by (le)", + "format": "heatmap", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Runner Receive Init Packet Duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5, + "axisSoftMin": 0, + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by (rivet_datacenter) (rivet_pegboard_runner_version_upgrade_drain_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", + "instant": false, + "legendFormat": "{{workflow_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Runner Upgrade Drain", + "type": "timeseries" + } + ], + "preload": false, + "schemaVersion": 41, + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": [ + "prod" + ], + "value": [ + "prod" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up,rivet_project)", + "includeAll": true, + "label": "Project", + "multi": true, + "name": "project", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up,rivet_project)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + }, + { + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "includeAll": true, + "label": "Datacenter", + "multi": true, + "name": "datacenter", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up{rivet_project=\"$project\"},rivet_datacenter)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Pegboard", + "uid": "afa77odsjjk74d", + "version": 1 +} \ No newline at end of file diff --git a/engine/docker/template/grafana-dashboards/epoxy.json b/engine/docker/template/grafana-dashboards/epoxy.json index 7e794b195d..2f4f526fdc 100644 --- a/engine/docker/template/grafana-dashboards/epoxy.json +++ b/engine/docker/template/grafana-dashboards/epoxy.json @@ -116,7 +116,7 @@ "editorMode": "code", "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_proposals_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", "instant": false, - "legendFormat": "{{workflow_name}}", + "legendFormat": "{{rivet_datacenter}}", "range": true, "refId": "A" } @@ -301,7 +301,7 @@ "editorMode": "code", "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_pre_accept_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", "instant": false, - "legendFormat": "{{workflow_name}}", + "legendFormat": "{{rivet_datacenter}}", "range": true, "refId": "A" } @@ -405,7 +405,7 @@ "editorMode": "code", "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_accept_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", "instant": false, - "legendFormat": "{{workflow_name}}", + "legendFormat": "{{rivet_datacenter}}", "range": true, "refId": "A" } @@ -509,7 +509,7 @@ "editorMode": "code", "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_commit_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", "instant": false, - "legendFormat": "{{workflow_name}}", + "legendFormat": "{{rivet_datacenter}}", "range": true, "refId": "A" } @@ -694,7 +694,7 @@ "editorMode": "code", "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_requests_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", "instant": false, - "legendFormat": "{{workflow_name}}", + "legendFormat": "{{rivet_datacenter}}", "range": true, "refId": "A" } @@ -798,7 +798,7 @@ "editorMode": "code", "expr": "sum by (rivet_datacenter) (rivet_epoxy_quorum_size{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", "instant": false, - "legendFormat": "{{workflow_name}}", + "legendFormat": "{{rivet_datacenter}}", "range": true, "refId": "A" } @@ -902,7 +902,7 @@ "editorMode": "code", "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_quorum_attempts_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", "instant": false, - "legendFormat": "{{workflow_name}}", + "legendFormat": "{{rivet_datacenter}}", "range": true, "refId": "A" } @@ -1006,7 +1006,7 @@ "editorMode": "code", "expr": "sum by (rivet_datacenter) (rivet_epoxy_ballot_epoch{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", "instant": false, - "legendFormat": "{{workflow_name}}", + "legendFormat": "{{rivet_datacenter}}", "range": true, "refId": "A" } @@ -1110,7 +1110,7 @@ "editorMode": "code", "expr": "sum by (rivet_datacenter) (rivet_epoxy_ballot_number{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", "instant": false, - "legendFormat": "{{workflow_name}}", + "legendFormat": "{{rivet_datacenter}}", "range": true, "refId": "A" } @@ -1214,7 +1214,7 @@ "editorMode": "code", "expr": "sum by (rivet_datacenter) (rivet_epoxy_instance_number{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", "instant": false, - "legendFormat": "{{workflow_name}}", + "legendFormat": "{{rivet_datacenter}}", "range": true, "refId": "A" } @@ -1318,7 +1318,7 @@ "editorMode": "code", "expr": "sum by (rivet_datacenter) (rivet_epoxy_replicas_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"})", "instant": false, - "legendFormat": "{{workflow_name}}", + "legendFormat": "{{rivet_datacenter}}", "range": true, "refId": "A" } @@ -1422,7 +1422,7 @@ "editorMode": "code", "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_ballot_rejections_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", "instant": false, - "legendFormat": "{{workflow_name}}", + "legendFormat": "{{rivet_datacenter}}", "range": true, "refId": "A" } @@ -1526,7 +1526,7 @@ "editorMode": "code", "expr": "sum by (rivet_datacenter) (rate(rivet_epoxy_interference_detected_total{rivet_project=~\"$project\",rivet_datacenter=~\"$datacenter\"}[$__rate_interval]))", "instant": false, - "legendFormat": "{{workflow_name}}", + "legendFormat": "{{rivet_datacenter}}", "range": true, "refId": "A" } diff --git a/engine/packages/actor-kv/Cargo.toml b/engine/packages/actor-kv/Cargo.toml deleted file mode 100644 index 77b414d0f5..0000000000 --- a/engine/packages/actor-kv/Cargo.toml +++ /dev/null @@ -1,31 +0,0 @@ -[package] -name = "pegboard-actor-kv" -version.workspace = true -authors.workspace = true -license.workspace = true -edition.workspace = true - -[dependencies] -anyhow.workspace = true -futures-util.workspace = true -gas.workspace = true -rivet-runner-protocol.workspace = true -rivet-util-id.workspace = true -serde_bare.workspace = true -serde.workspace = true -tokio.workspace = true -tracing-logfmt.workspace = true -tracing-subscriber.workspace = true -tracing.workspace = true -universaldb.workspace = true - -pegboard.workspace = true - -[dev-dependencies] -portpicker.workspace = true -rivet-config.workspace = true -rivet-test-deps.workspace = true -tokio.workspace = true -tracing-subscriber.workspace = true -url.workspace = true -uuid.workspace = true diff --git a/engine/packages/actor-kv/src/key.rs b/engine/packages/actor-kv/src/key.rs deleted file mode 100644 index 455fb7a463..0000000000 --- a/engine/packages/actor-kv/src/key.rs +++ /dev/null @@ -1,81 +0,0 @@ -use rivet_runner_protocol::mk2 as rp; -use universaldb::tuple::{ - Bytes, PackResult, TupleDepth, TuplePack, TupleUnpack, VersionstampOffset, -}; - -/// Wraps a key with a trailing NIL byte for exact key matching. -/// -/// Encodes as: `[NESTED, ...bytes..., NIL]` -/// -/// Use this for: -/// - Storing keys -/// - Getting/deleting specific keys -/// - Range query end points (to create closed boundaries) -#[derive(Debug, Clone, PartialEq)] -pub struct KeyWrapper(pub rp::KvKey); - -impl KeyWrapper { - pub fn tuple_len(key: &rp::KvKey) -> usize { - key.len() + 2 - } -} - -impl TuplePack for KeyWrapper { - fn pack( - &self, - w: &mut W, - tuple_depth: TupleDepth, - ) -> std::io::Result { - let mut offset = VersionstampOffset::None { size: 0 }; - - w.write_all(&[universaldb::utils::codes::NESTED])?; - offset += 1; - - offset += self.0.pack(w, tuple_depth.increment())?; - - w.write_all(&[universaldb::utils::codes::NIL])?; - offset += 1; - - Ok(offset) - } -} - -impl<'de> TupleUnpack<'de> for KeyWrapper { - fn unpack(input: &[u8], tuple_depth: TupleDepth) -> PackResult<(&[u8], Self)> { - let input = universaldb::utils::parse_code(input, universaldb::utils::codes::NESTED)?; - - let (input, inner) = Bytes::unpack(input, tuple_depth.increment())?; - - let input = universaldb::utils::parse_code(input, universaldb::utils::codes::NIL)?; - - Ok((input, KeyWrapper(inner.into_owned()))) - } -} - -/// Wraps a key without a trailing NIL byte for prefix/range matching. -/// -/// Encodes as: `[NESTED, ...bytes...]` (no trailing NIL) -/// -/// Use this for: -/// - Range query start points (to create open boundaries) -/// - Prefix queries (to match all keys starting with these bytes) -pub struct ListKeyWrapper(pub rp::KvKey); - -impl TuplePack for ListKeyWrapper { - fn pack( - &self, - w: &mut W, - tuple_depth: TupleDepth, - ) -> std::io::Result { - let mut offset = VersionstampOffset::None { size: 0 }; - - w.write_all(&[universaldb::utils::codes::NESTED])?; - offset += 1; - - offset += self.0.pack(w, tuple_depth.increment())?; - - // No ending NIL byte compared to `KeyWrapper::pack` - - Ok(offset) - } -} diff --git a/engine/packages/api-peer/Cargo.toml b/engine/packages/api-peer/Cargo.toml index 16b3a92501..6a97c8cd4e 100644 --- a/engine/packages/api-peer/Cargo.toml +++ b/engine/packages/api-peer/Cargo.toml @@ -15,7 +15,6 @@ gas.workspace = true indexmap.workspace = true namespace.workspace = true pegboard.workspace = true -pegboard-actor-kv.workspace = true rivet-api-builder.workspace = true rivet-api-types.workspace = true rivet-api-util.workspace = true diff --git a/engine/packages/api-peer/src/actors/kv_get.rs b/engine/packages/api-peer/src/actors/kv_get.rs index a2c3a7dee5..f00bbd1a0b 100644 --- a/engine/packages/api-peer/src/actors/kv_get.rs +++ b/engine/packages/api-peer/src/actors/kv_get.rs @@ -2,7 +2,6 @@ use anyhow::*; use base64::Engine; use base64::prelude::BASE64_STANDARD; use gas::prelude::*; -use pegboard_actor_kv as actor_kv; use rivet_api_builder::ApiCtx; use rivet_util::Id; use serde::{Deserialize, Serialize}; @@ -77,7 +76,7 @@ pub async fn kv_get(ctx: ApiCtx, path: KvGetPath, query: KvGetQuery) -> Result Result { + #[tracing::instrument(skip_all, fields(latest_version))] + pub async fn check_version(&mut self, latest_version: usize) -> Result { self.check_stop()?; - if current_version == 0 { + if latest_version == 0 { return Err(WorkflowError::InvalidVersion( "version for `check_version` must be greater than 0".into(), ) .into()); } - let (is_version_check, version) = - if let Some((is_version_check, step_version)) = self.cursor.compare_version_check()? { - tracing::debug!("checking existing version"); + let history_res = self.cursor.compare_version_check()?; + let check_version_location = self.cursor.current_location_for(&history_res); - (is_version_check, step_version) - } else { - tracing::debug!("inserting version check"); - - self.db - .commit_workflow_version_check_event( - self.workflow_id, - &self.cursor.current_location(), - current_version + self.version - 1, - self.loop_location(), - ) - .await?; + let (version, insert) = match history_res { + CheckVersionHistoryResult::New => (latest_version, true), + CheckVersionHistoryResult::Event(version) => (version, false), + CheckVersionHistoryResult::Insertion(next_event_version) => (next_event_version, true), + }; - (true, current_version) - }; + if insert { + tracing::debug!("inserting version check"); - if is_version_check { - // Move to next event - self.cursor.inc(); + self.db + .commit_workflow_version_check_event( + self.workflow_id, + &check_version_location, + version + self.version - 1, + self.loop_location(), + ) + .await?; } + // Move to next event + self.cursor.update(&check_version_location); + Ok(version + 1 - self.version) } } diff --git a/engine/packages/gasoline/src/db/kv/debug.rs b/engine/packages/gasoline/src/db/kv/debug.rs index 885b6fa545..a68563fb22 100644 --- a/engine/packages/gasoline/src/db/kv/debug.rs +++ b/engine/packages/gasoline/src/db/kv/debug.rs @@ -620,14 +620,14 @@ impl DatabaseDebug for DatabaseKv { // Clear metric let metric = if has_output { - keys::metric::GaugeMetric::WorkflowComplete(workflow_name.clone()) + keys::metric::Metric::WorkflowComplete(workflow_name.clone()) } else if has_wake_condition { let error = error_key.deserialize(&error_entry.context("key should exist")?)?; - keys::metric::GaugeMetric::WorkflowDead(workflow_name.clone(), error) + keys::metric::Metric::WorkflowDead(workflow_name.clone(), error) } else { - keys::metric::GaugeMetric::WorkflowSleeping(workflow_name.clone()) + keys::metric::Metric::WorkflowSleeping(workflow_name.clone()) }; update_metric(&tx.with_subspace(self.subspace.clone()), Some(metric), None); @@ -716,11 +716,11 @@ impl DatabaseDebug for DatabaseKv { if !has_wake_condition { update_metric( &tx, - Some(keys::metric::GaugeMetric::WorkflowDead( + Some(keys::metric::Metric::WorkflowDead( workflow_name.clone(), error.context("key should exist")?, )), - Some(keys::metric::GaugeMetric::WorkflowSleeping(workflow_name)), + Some(keys::metric::Metric::WorkflowSleeping(workflow_name)), ); } } @@ -1193,7 +1193,7 @@ impl DatabaseDebug for DatabaseKv { if ack_ts_entry.is_none() { update_metric( &tx.with_subspace(self.subspace.clone()), - Some(keys::metric::GaugeMetric::SignalPending(signal_name)), + Some(keys::metric::Metric::SignalPending(signal_name)), None, ); } diff --git a/engine/packages/gasoline/src/db/kv/keys/history.rs b/engine/packages/gasoline/src/db/kv/keys/history.rs index 784797383e..cf418c7dc5 100644 --- a/engine/packages/gasoline/src/db/kv/keys/history.rs +++ b/engine/packages/gasoline/src/db/kv/keys/history.rs @@ -2131,6 +2131,8 @@ pub mod insert { create_ts, )?; + InnerVersionKey; + Ok(()) } } diff --git a/engine/packages/gasoline/src/db/kv/keys/metric.rs b/engine/packages/gasoline/src/db/kv/keys/metric.rs index 9f48097f4c..15868ac113 100644 --- a/engine/packages/gasoline/src/db/kv/keys/metric.rs +++ b/engine/packages/gasoline/src/db/kv/keys/metric.rs @@ -2,31 +2,36 @@ use anyhow::*; use universaldb::prelude::*; #[derive(Debug, PartialEq, Eq)] -pub enum GaugeMetric { +pub enum Metric { + // Count (workflow name) WorkflowActive(String), + /// Count (workflow name) WorkflowSleeping(String), + /// Count (workflow name, error) WorkflowDead(String, String), + /// Count (workflow name) WorkflowComplete(String), - // Deprecated + /// Deprecated SignalPending(String), + /// Count (signal name) SignalPending2(String), } -impl GaugeMetric { - fn variant(&self) -> GaugeMetricVariant { +impl Metric { + fn variant(&self) -> MetricVariant { match self { - GaugeMetric::WorkflowActive(_) => GaugeMetricVariant::WorkflowActive, - GaugeMetric::WorkflowSleeping(_) => GaugeMetricVariant::WorkflowSleeping, - GaugeMetric::WorkflowDead(_, _) => GaugeMetricVariant::WorkflowDead, - GaugeMetric::WorkflowComplete(_) => GaugeMetricVariant::WorkflowComplete, - GaugeMetric::SignalPending(_) => GaugeMetricVariant::SignalPending, - GaugeMetric::SignalPending2(_) => GaugeMetricVariant::SignalPending2, + Metric::WorkflowActive(_) => MetricVariant::WorkflowActive, + Metric::WorkflowSleeping(_) => MetricVariant::WorkflowSleeping, + Metric::WorkflowDead(_, _) => MetricVariant::WorkflowDead, + Metric::WorkflowComplete(_) => MetricVariant::WorkflowComplete, + Metric::SignalPending(_) => MetricVariant::SignalPending, + Metric::SignalPending2(_) => MetricVariant::SignalPending2, } } } #[derive(strum::FromRepr)] -enum GaugeMetricVariant { +enum MetricVariant { WorkflowActive = 0, WorkflowSleeping = 1, WorkflowDead = 2, @@ -38,27 +43,27 @@ enum GaugeMetricVariant { /// Stores gauge metrics for global database usage. #[derive(Debug)] -pub struct GaugeMetricKey { - pub metric: GaugeMetric, +pub struct MetricKey { + pub metric: Metric, } -impl GaugeMetricKey { - pub fn new(metric: GaugeMetric) -> Self { - GaugeMetricKey { metric } +impl MetricKey { + pub fn new(metric: Metric) -> Self { + MetricKey { metric } } - pub fn subspace() -> GaugeMetricSubspaceKey { - GaugeMetricSubspaceKey::new() + pub fn subspace() -> MetricSubspaceKey { + MetricSubspaceKey::new() } } -impl FormalKey for GaugeMetricKey { +impl FormalKey for MetricKey { // IMPORTANT: Uses LE bytes, not BE /// Count. - type Value = usize; + type Value = i64; fn deserialize(&self, raw: &[u8]) -> Result { - Ok(usize::from_le_bytes(raw.try_into()?)) + Ok(i64::from_le_bytes(raw.try_into()?)) } fn serialize(&self, value: Self::Value) -> Result> { @@ -66,7 +71,7 @@ impl FormalKey for GaugeMetricKey { } } -impl TuplePack for GaugeMetricKey { +impl TuplePack for MetricKey { fn pack( &self, w: &mut W, @@ -74,90 +79,90 @@ impl TuplePack for GaugeMetricKey { ) -> std::io::Result { let mut offset = VersionstampOffset::None { size: 0 }; - let t = (METRIC, self.metric.variant() as usize); + let t = (METRIC, self.metric.variant() as i64); offset += t.pack(w, tuple_depth)?; offset += match &self.metric { - GaugeMetric::WorkflowActive(workflow_name) => workflow_name.pack(w, tuple_depth)?, - GaugeMetric::WorkflowSleeping(workflow_name) => workflow_name.pack(w, tuple_depth)?, - GaugeMetric::WorkflowDead(workflow_name, error) => { + Metric::WorkflowActive(workflow_name) => workflow_name.pack(w, tuple_depth)?, + Metric::WorkflowSleeping(workflow_name) => workflow_name.pack(w, tuple_depth)?, + Metric::WorkflowDead(workflow_name, error) => { (workflow_name, error).pack(w, tuple_depth)? } - GaugeMetric::WorkflowComplete(workflow_name) => workflow_name.pack(w, tuple_depth)?, - GaugeMetric::SignalPending(signal_name) => signal_name.pack(w, tuple_depth)?, - GaugeMetric::SignalPending2(signal_name) => signal_name.pack(w, tuple_depth)?, + Metric::WorkflowComplete(workflow_name) => workflow_name.pack(w, tuple_depth)?, + Metric::SignalPending(signal_name) => signal_name.pack(w, tuple_depth)?, + Metric::SignalPending2(signal_name) => signal_name.pack(w, tuple_depth)?, }; std::result::Result::Ok(offset) } } -impl<'de> TupleUnpack<'de> for GaugeMetricKey { +impl<'de> TupleUnpack<'de> for MetricKey { fn unpack(input: &[u8], tuple_depth: TupleDepth) -> PackResult<(&[u8], Self)> { let (input, (_, variant)) = <(usize, usize)>::unpack(input, tuple_depth)?; - let variant = GaugeMetricVariant::from_repr(variant).ok_or_else(|| { + let variant = MetricVariant::from_repr(variant).ok_or_else(|| { PackError::Message(format!("invalid metric variant `{variant}` in key").into()) })?; let (input, v) = match variant { - GaugeMetricVariant::WorkflowActive => { + MetricVariant::WorkflowActive => { let (input, workflow_name) = String::unpack(input, tuple_depth)?; ( input, - GaugeMetricKey { - metric: GaugeMetric::WorkflowActive(workflow_name), + MetricKey { + metric: Metric::WorkflowActive(workflow_name), }, ) } - GaugeMetricVariant::WorkflowSleeping => { + MetricVariant::WorkflowSleeping => { let (input, workflow_name) = String::unpack(input, tuple_depth)?; ( input, - GaugeMetricKey { - metric: GaugeMetric::WorkflowSleeping(workflow_name), + MetricKey { + metric: Metric::WorkflowSleeping(workflow_name), }, ) } - GaugeMetricVariant::WorkflowDead => { + MetricVariant::WorkflowDead => { let (input, (workflow_name, error)) = <(String, String)>::unpack(input, tuple_depth)?; ( input, - GaugeMetricKey { - metric: GaugeMetric::WorkflowDead(workflow_name, error), + MetricKey { + metric: Metric::WorkflowDead(workflow_name, error), }, ) } - GaugeMetricVariant::WorkflowComplete => { + MetricVariant::WorkflowComplete => { let (input, workflow_name) = String::unpack(input, tuple_depth)?; ( input, - GaugeMetricKey { - metric: GaugeMetric::WorkflowComplete(workflow_name), + MetricKey { + metric: Metric::WorkflowComplete(workflow_name), }, ) } - GaugeMetricVariant::SignalPending => { + MetricVariant::SignalPending => { let (input, signal_name) = String::unpack(input, tuple_depth)?; ( input, - GaugeMetricKey { - metric: GaugeMetric::SignalPending(signal_name), + MetricKey { + metric: Metric::SignalPending(signal_name), }, ) } - GaugeMetricVariant::SignalPending2 => { + MetricVariant::SignalPending2 => { let (input, signal_name) = String::unpack(input, tuple_depth)?; ( input, - GaugeMetricKey { - metric: GaugeMetric::SignalPending2(signal_name), + MetricKey { + metric: Metric::SignalPending2(signal_name), }, ) } @@ -168,15 +173,15 @@ impl<'de> TupleUnpack<'de> for GaugeMetricKey { } /// Used to list all global gauge metrics. -pub struct GaugeMetricSubspaceKey {} +pub struct MetricSubspaceKey {} -impl GaugeMetricSubspaceKey { +impl MetricSubspaceKey { pub fn new() -> Self { - GaugeMetricSubspaceKey {} + MetricSubspaceKey {} } } -impl TuplePack for GaugeMetricSubspaceKey { +impl TuplePack for MetricSubspaceKey { fn pack( &self, w: &mut W, diff --git a/engine/packages/gasoline/src/db/kv/keys/workflow.rs b/engine/packages/gasoline/src/db/kv/keys/workflow.rs index 4f8c75fb52..8463355eb1 100644 --- a/engine/packages/gasoline/src/db/kv/keys/workflow.rs +++ b/engine/packages/gasoline/src/db/kv/keys/workflow.rs @@ -1191,50 +1191,51 @@ impl<'de> TupleUnpack<'de> for SilenceTsKey { } #[derive(Debug, PartialEq, Eq)] -pub enum GaugeMetric { +pub enum Metric { + /// Count (signal name) SignalPending(String), } -impl GaugeMetric { - fn variant(&self) -> GaugeMetricVariant { +impl Metric { + fn variant(&self) -> MetricVariant { match self { - GaugeMetric::SignalPending(_) => GaugeMetricVariant::SignalPending, + Metric::SignalPending(_) => MetricVariant::SignalPending, } } } #[derive(strum::FromRepr)] -enum GaugeMetricVariant { +enum MetricVariant { SignalPending = 0, } /// Stores gauge metrics for a single workflow. #[derive(Debug)] -pub struct GaugeMetricKey { +pub struct MetricKey { pub workflow_id: Id, - pub metric: GaugeMetric, + pub metric: Metric, } -impl GaugeMetricKey { - pub fn new(workflow_id: Id, metric: GaugeMetric) -> Self { - GaugeMetricKey { +impl MetricKey { + pub fn new(workflow_id: Id, metric: Metric) -> Self { + MetricKey { workflow_id, metric, } } - pub fn subspace(workflow_id: Id) -> GaugeMetricSubspaceKey { - GaugeMetricSubspaceKey::new(workflow_id) + pub fn subspace(workflow_id: Id) -> MetricSubspaceKey { + MetricSubspaceKey::new(workflow_id) } } -impl FormalKey for GaugeMetricKey { +impl FormalKey for MetricKey { // IMPORTANT: Uses LE bytes, not BE /// Count. - type Value = usize; + type Value = i64; fn deserialize(&self, raw: &[u8]) -> Result { - Ok(usize::from_le_bytes(raw.try_into()?)) + Ok(i64::from_le_bytes(raw.try_into()?)) } fn serialize(&self, value: Self::Value) -> Result> { @@ -1242,7 +1243,7 @@ impl FormalKey for GaugeMetricKey { } } -impl TuplePack for GaugeMetricKey { +impl TuplePack for MetricKey { fn pack( &self, w: &mut W, @@ -1259,30 +1260,30 @@ impl TuplePack for GaugeMetricKey { offset += t.pack(w, tuple_depth)?; offset += match &self.metric { - GaugeMetric::SignalPending(signal_name) => signal_name.pack(w, tuple_depth)?, + Metric::SignalPending(signal_name) => signal_name.pack(w, tuple_depth)?, }; Ok(offset) } } -impl<'de> TupleUnpack<'de> for GaugeMetricKey { +impl<'de> TupleUnpack<'de> for MetricKey { fn unpack(input: &[u8], tuple_depth: TupleDepth) -> PackResult<(&[u8], Self)> { let (input, (_, _, workflow_id, variant)) = <(usize, usize, Id, usize)>::unpack(input, tuple_depth)?; - let variant = GaugeMetricVariant::from_repr(variant).ok_or_else(|| { + let variant = MetricVariant::from_repr(variant).ok_or_else(|| { PackError::Message(format!("invalid metric variant `{variant}` in key").into()) })?; let (input, v) = match variant { - GaugeMetricVariant::SignalPending => { + MetricVariant::SignalPending => { let (input, signal_name) = String::unpack(input, tuple_depth)?; ( input, - GaugeMetricKey { + MetricKey { workflow_id, - metric: GaugeMetric::SignalPending(signal_name), + metric: Metric::SignalPending(signal_name), }, ) } @@ -1293,17 +1294,17 @@ impl<'de> TupleUnpack<'de> for GaugeMetricKey { } /// Used to list all gauge metrics for a workflow. -pub struct GaugeMetricSubspaceKey { +pub struct MetricSubspaceKey { workflow_id: Id, } -impl GaugeMetricSubspaceKey { +impl MetricSubspaceKey { pub fn new(workflow_id: Id) -> Self { - GaugeMetricSubspaceKey { workflow_id } + MetricSubspaceKey { workflow_id } } } -impl TuplePack for GaugeMetricSubspaceKey { +impl TuplePack for MetricSubspaceKey { fn pack( &self, w: &mut W, diff --git a/engine/packages/gasoline/src/db/kv/mod.rs b/engine/packages/gasoline/src/db/kv/mod.rs index b39b128bc5..00d2916081 100644 --- a/engine/packages/gasoline/src/db/kv/mod.rs +++ b/engine/packages/gasoline/src/db/kv/mod.rs @@ -223,7 +223,7 @@ impl DatabaseKv { update_metric( &tx.with_subspace(self.subspace.clone()), None, - Some(keys::metric::GaugeMetric::SignalPending2( + Some(keys::metric::Metric::SignalPending2( signal_name.to_string(), )), ); @@ -231,7 +231,7 @@ impl DatabaseKv { &tx.with_subspace(self.subspace.clone()), workflow_id, None, - Some(keys::workflow::GaugeMetric::SignalPending( + Some(keys::workflow::Metric::SignalPending( signal_name.to_string(), )), ); @@ -343,7 +343,7 @@ impl DatabaseKv { update_metric( &tx, None, - Some(keys::metric::GaugeMetric::WorkflowSleeping( + Some(keys::metric::Metric::WorkflowSleeping( workflow_name.to_string(), )), ); @@ -583,10 +583,10 @@ impl Database for DatabaseKv { update_metric( &tx.with_subspace(self.subspace.clone()), - Some(keys::metric::GaugeMetric::WorkflowActive( + Some(keys::metric::Metric::WorkflowActive( workflow_name.to_string(), )), - Some(keys::metric::GaugeMetric::WorkflowSleeping( + Some(keys::metric::Metric::WorkflowSleeping( workflow_name.to_string(), )), ); @@ -669,9 +669,8 @@ impl Database for DatabaseKv { .run(|tx| async move { let tx = tx.with_subspace(self.subspace.clone()); - let metrics_subspace = self - .subspace - .subspace(&keys::metric::GaugeMetricKey::subspace()); + let metrics_subspace = + self.subspace.subspace(&keys::metric::MetricKey::subspace()); tx.get_ranges_keyvalues( universaldb::RangeOption { mode: StreamingMode::WantAll, @@ -680,7 +679,7 @@ impl Database for DatabaseKv { Serializable, ) .map(|res| match res { - Ok(entry) => tx.read_entry::(&entry), + Ok(entry) => tx.read_entry::(&entry), Err(err) => Err(err.into()), }) .try_collect::>() @@ -691,14 +690,14 @@ impl Database for DatabaseKv { .context("failed to read metrics") .map_err(WorkflowError::Udb)?; - let mut total_workflow_counts: Vec<(String, usize)> = Vec::new(); + let mut total_workflow_counts: Vec<(String, i64)> = Vec::new(); for (key, count) in entries { match key.metric { - keys::metric::GaugeMetric::WorkflowActive(workflow_name) => { + keys::metric::Metric::WorkflowActive(workflow_name) => { metrics::WORKFLOW_ACTIVE .with_label_values(&[workflow_name.as_str()]) - .set(count as i64); + .set(count); if let Some(entry) = total_workflow_counts .iter_mut() @@ -709,10 +708,10 @@ impl Database for DatabaseKv { total_workflow_counts.push((workflow_name, count)); } } - keys::metric::GaugeMetric::WorkflowSleeping(workflow_name) => { + keys::metric::Metric::WorkflowSleeping(workflow_name) => { metrics::WORKFLOW_SLEEPING .with_label_values(&[workflow_name.as_str()]) - .set(count as i64); + .set(count); if let Some(entry) = total_workflow_counts .iter_mut() @@ -723,10 +722,10 @@ impl Database for DatabaseKv { total_workflow_counts.push((workflow_name, count)); } } - keys::metric::GaugeMetric::WorkflowDead(workflow_name, error) => { + keys::metric::Metric::WorkflowDead(workflow_name, error) => { metrics::WORKFLOW_DEAD .with_label_values(&[workflow_name.as_str(), error.as_str()]) - .set(count as i64); + .set(count); if let Some(entry) = total_workflow_counts .iter_mut() @@ -737,7 +736,7 @@ impl Database for DatabaseKv { total_workflow_counts.push((workflow_name, count)); } } - keys::metric::GaugeMetric::WorkflowComplete(workflow_name) => { + keys::metric::Metric::WorkflowComplete(workflow_name) => { if let Some(entry) = total_workflow_counts .iter_mut() .find(|(name, _)| name == &workflow_name) @@ -747,11 +746,11 @@ impl Database for DatabaseKv { total_workflow_counts.push((workflow_name, count)); } } - keys::metric::GaugeMetric::SignalPending(_) => {} - keys::metric::GaugeMetric::SignalPending2(signal_name) => { + keys::metric::Metric::SignalPending(_) => {} + keys::metric::Metric::SignalPending2(signal_name) => { metrics::SIGNAL_PENDING .with_label_values(&[signal_name.as_str()]) - .set(count as i64); + .set(count); } } } @@ -759,7 +758,7 @@ impl Database for DatabaseKv { for (workflow_name, count) in total_workflow_counts { metrics::WORKFLOW_TOTAL .with_label_values(&[workflow_name.as_str()]) - .set(count as i64); + .set(count); } // Clear lock @@ -1289,10 +1288,10 @@ impl Database for DatabaseKv { update_metric( &tx, - Some(keys::metric::GaugeMetric::WorkflowSleeping( + Some(keys::metric::Metric::WorkflowSleeping( wf.workflow_name.clone(), )), - Some(keys::metric::GaugeMetric::WorkflowActive( + Some(keys::metric::Metric::WorkflowActive( wf.workflow_name.clone(), )), ); @@ -1864,7 +1863,7 @@ impl Database for DatabaseKv { // Clear pending signals metric for observability let metrics_subspace = self .subspace - .subspace(&keys::workflow::GaugeMetricKey::subspace(workflow_id)); + .subspace(&keys::workflow::MetricKey::subspace(workflow_id)); let mut stream = tx.get_ranges_keyvalues( universaldb::RangeOption { mode: StreamingMode::WantAll, @@ -1880,7 +1879,7 @@ impl Database for DatabaseKv { }; let (key, metric_count) = - tx.read_entry::(&entry)?; + tx.read_entry::(&entry)?; // Ignore negatives and zero if metric_count as isize <= 0 { @@ -1888,10 +1887,10 @@ impl Database for DatabaseKv { } match key.metric { - keys::workflow::GaugeMetric::SignalPending(signal_name) => { + keys::workflow::Metric::SignalPending(signal_name) => { update_metric_by( &tx, - Some(keys::metric::GaugeMetric::SignalPending2(signal_name)), + Some(keys::metric::Metric::SignalPending2(signal_name)), None, metric_count, ); @@ -1902,10 +1901,10 @@ impl Database for DatabaseKv { update_metric( &tx, - Some(keys::metric::GaugeMetric::WorkflowActive( + Some(keys::metric::Metric::WorkflowActive( workflow_name.to_string(), )), - Some(keys::metric::GaugeMetric::WorkflowComplete( + Some(keys::metric::Metric::WorkflowComplete( workflow_name.to_string(), )), ); @@ -2055,13 +2054,13 @@ impl Database for DatabaseKv { update_metric( &tx.with_subspace(self.subspace.clone()), - Some(keys::metric::GaugeMetric::WorkflowActive( + Some(keys::metric::Metric::WorkflowActive( workflow_name.to_string(), )), Some(if has_wake_condition { - keys::metric::GaugeMetric::WorkflowSleeping(workflow_name.to_string()) + keys::metric::Metric::WorkflowSleeping(workflow_name.to_string()) } else { - keys::metric::GaugeMetric::WorkflowDead( + keys::metric::Metric::WorkflowDead( workflow_name.to_string(), error.to_string(), ) @@ -2205,7 +2204,7 @@ impl Database for DatabaseKv { update_metric( &tx.with_subspace(self.subspace.clone()), - Some(keys::metric::GaugeMetric::SignalPending2( + Some(keys::metric::Metric::SignalPending2( key.signal_name.clone(), )), None, @@ -2213,7 +2212,7 @@ impl Database for DatabaseKv { update_wf_metric( &tx.with_subspace(self.subspace.clone()), workflow_id, - Some(keys::workflow::GaugeMetric::SignalPending( + Some(keys::workflow::Metric::SignalPending( key.signal_name.clone(), )), None, @@ -3047,17 +3046,17 @@ struct MinimalPulledWorkflow { fn update_metric( tx: &universaldb::Transaction, - previous: Option, - current: Option, + previous: Option, + current: Option, ) { update_metric_by(tx, previous, current, 1) } fn update_metric_by( tx: &universaldb::Transaction, - previous: Option, - current: Option, - by: usize, + previous: Option, + current: Option, + by: i64, ) { if &previous == ¤t { return; @@ -3065,15 +3064,15 @@ fn update_metric_by( if let Some(previous) = previous { tx.atomic_op( - &keys::metric::GaugeMetricKey::new(previous), - &(by as isize * -1).to_le_bytes(), + &keys::metric::MetricKey::new(previous), + &(by * -1).to_le_bytes(), MutationType::Add, ); } if let Some(current) = current { tx.atomic_op( - &keys::metric::GaugeMetricKey::new(current), + &keys::metric::MetricKey::new(current), &by.to_le_bytes(), MutationType::Add, ); @@ -3083,8 +3082,8 @@ fn update_metric_by( fn update_wf_metric( tx: &universaldb::Transaction, workflow_id: Id, - previous: Option, - current: Option, + previous: Option, + current: Option, ) { if &previous == ¤t { return; @@ -3092,16 +3091,16 @@ fn update_wf_metric( if let Some(previous) = previous { tx.atomic_op( - &keys::workflow::GaugeMetricKey::new(workflow_id, previous), - &(-1isize).to_le_bytes(), + &keys::workflow::MetricKey::new(workflow_id, previous), + &(-1i64).to_le_bytes(), MutationType::Add, ); } if let Some(current) = current { tx.atomic_op( - &keys::workflow::GaugeMetricKey::new(workflow_id, current), - &1usize.to_le_bytes(), + &keys::workflow::MetricKey::new(workflow_id, current), + &1i64.to_le_bytes(), MutationType::Add, ); } diff --git a/engine/packages/gasoline/src/history/cursor.rs b/engine/packages/gasoline/src/history/cursor.rs index 79fc6579eb..492ea05f6a 100644 --- a/engine/packages/gasoline/src/history/cursor.rs +++ b/engine/packages/gasoline/src/history/cursor.rs @@ -556,15 +556,18 @@ impl Cursor { Ok(true) } - pub fn compare_version_check(&self) -> WorkflowResult> { + pub fn compare_version_check(&self) -> WorkflowResult { let Some(event) = self.current_event() else { - return Ok(None); + return Ok(CheckVersionHistoryResult::New); }; - Ok(Some(( - matches!(event.data, EventData::VersionCheck), - event.version, - ))) + // If the current event is a version check, return its version + if let EventData::VersionCheck = &event.data { + Ok(CheckVersionHistoryResult::Event(event.version)) + } else { + // Current event is not a version check, one must be inserted with the same version + Ok(CheckVersionHistoryResult::Insertion(event.version)) + } } pub fn compare_signals(&self, version: usize) -> WorkflowResult> { @@ -621,6 +624,16 @@ impl HistoryResult { } } +pub enum CheckVersionHistoryResult { + /// A check version event for this location in history exists. + Event(usize), + /// An event for this location in history exists, but it is not a check version event. Therefore, an + /// insertion is required. + Insertion(usize), + /// No event for this location in history exists. + New, +} + #[cfg(test)] mod tests { use std::{collections::HashMap, sync::Arc}; diff --git a/engine/packages/pegboard-runner/Cargo.toml b/engine/packages/pegboard-runner/Cargo.toml index de7697543f..3c39df265d 100644 --- a/engine/packages/pegboard-runner/Cargo.toml +++ b/engine/packages/pegboard-runner/Cargo.toml @@ -37,5 +37,4 @@ url.workspace = true vbare.workspace = true pegboard.workspace = true -pegboard-actor-kv.workspace = true namespace.workspace = true diff --git a/engine/packages/pegboard-runner/src/ws_to_tunnel_task.rs b/engine/packages/pegboard-runner/src/ws_to_tunnel_task.rs index 23c36788fa..f161be4506 100644 --- a/engine/packages/pegboard-runner/src/ws_to_tunnel_task.rs +++ b/engine/packages/pegboard-runner/src/ws_to_tunnel_task.rs @@ -4,8 +4,8 @@ use futures_util::TryStreamExt; use gas::prelude::Id; use gas::prelude::*; use hyper_tungstenite::tungstenite::Message; +use pegboard::actor_kv; use pegboard::pubsub_subjects::GatewayReceiverSubject; -use pegboard_actor_kv as kv; use rivet_guard_core::websocket_handle::WebSocketReceiver; use rivet_runner_protocol::{self as protocol, PROTOCOL_MK2_VERSION, versioned}; use std::sync::{Arc, atomic::Ordering}; @@ -198,49 +198,33 @@ async fn handle_message_mk2( } }; - let actors_res = ctx - .op(pegboard::ops::actor::get_runner::Input { - actor_ids: vec![actor_id], - }) + let actor_res = ctx + .op(pegboard::ops::actor::get_for_runner::Input { actor_id }) .await .with_context(|| format!("failed to get runner for actor: {}", actor_id))?; - let actor_belongs = actors_res - .actors - .first() - .map(|x| x.runner_id == conn.runner_id) - .unwrap_or_default(); - - // Verify actor belongs to this runner - if !actor_belongs { - let res_msg = versioned::ToClientMk2::wrap_latest( - protocol::mk2::ToClient::ToClientKvResponse( - protocol::mk2::ToClientKvResponse { - request_id: req.request_id, - data: protocol::mk2::KvResponseData::KvErrorResponse( - protocol::mk2::KvErrorResponse { - message: "given actor does not belong to runner".to_string(), - }, - ), - }, - ), - ); - let res_msg_serialized = res_msg - .serialize(conn.protocol_version) - .context("failed to serialize KV actor validation error")?; - conn.ws_handle - .send(Message::Binary(res_msg_serialized.into())) - .await - .context("failed to send KV actor validation error to client")?; + let Some(actor) = actor_res else { + send_actor_kv_error("actor does not exist").await?; + return Ok(()); + }; + // Verify actor belongs to this runner + if actor.runner_id != conn.runner_id { + send_actor_kv_error("actor does not belong to runner").await?; return Ok(()); } + let recipient = actor_kv::Recipient { + actor_id, + namespace_id: conn.namespace_id, + name: actor.name, + }; + // TODO: Add queue and bg thread for processing kv ops // Run kv operation match req.data { protocol::mk2::KvRequestData::KvGetRequest(body) => { - let res = kv::get(&*ctx.udb()?, actor_id, body.keys).await; + let res = actor_kv::get(&*ctx.udb()?, &recipient, body.keys).await; let res_msg = versioned::ToClientMk2::wrap_latest( protocol::mk2::ToClient::ToClientKvResponse( @@ -276,9 +260,9 @@ async fn handle_message_mk2( .context("failed to send KV get response to client")?; } protocol::mk2::KvRequestData::KvListRequest(body) => { - let res = kv::list( + let res = actor_kv::list( &*ctx.udb()?, - actor_id, + &recipient, body.query, body.reverse.unwrap_or_default(), body.limit @@ -322,7 +306,7 @@ async fn handle_message_mk2( .context("failed to send KV list response to client")?; } protocol::mk2::KvRequestData::KvPutRequest(body) => { - let res = kv::put(&*ctx.udb()?, actor_id, body.keys, body.values).await; + let res = actor_kv::put(&*ctx.udb()?, &recipient, body.keys, body.values).await; let res_msg = versioned::ToClientMk2::wrap_latest( protocol::mk2::ToClient::ToClientKvResponse( @@ -352,7 +336,7 @@ async fn handle_message_mk2( .context("failed to send KV put response to client")?; } protocol::mk2::KvRequestData::KvDeleteRequest(body) => { - let res = kv::delete(&*ctx.udb()?, actor_id, body.keys).await; + let res = actor_kv::delete(&*ctx.udb()?, &recipient, body.keys).await; let res_msg = versioned::ToClientMk2::wrap_latest( protocol::mk2::ToClient::ToClientKvResponse( @@ -380,7 +364,7 @@ async fn handle_message_mk2( .context("failed to send KV delete response to client")?; } protocol::mk2::KvRequestData::KvDropRequest => { - let res = kv::delete_all(&*ctx.udb()?, actor_id).await; + let res = actor_kv::delete_all(&*ctx.udb()?, &recipient).await; let res_msg = versioned::ToClientMk2::wrap_latest( protocol::mk2::ToClient::ToClientKvResponse( @@ -515,15 +499,11 @@ async fn handle_message_mk1(ctx: &StandaloneCtx, conn: &Conn, msg: Bytes) -> Res } }; - let actors_res = ctx - .op(pegboard::ops::actor::get_runner::Input { - actor_ids: vec![actor_id], - }) + let actor_res = ctx + .op(pegboard::ops::actor::get_for_runner::Input { actor_id }) .await .with_context(|| format!("failed to get runner for actor: {}", actor_id))?; - let actor_belongs = actors_res - .actors - .first() + let actor_belongs = actor_res .map(|x| x.runner_id == conn.runner_id) .unwrap_or_default(); @@ -555,7 +535,7 @@ async fn handle_message_mk1(ctx: &StandaloneCtx, conn: &Conn, msg: Bytes) -> Res // Run kv operation match req.data { protocol::KvRequestData::KvGetRequest(body) => { - let res = kv::get(&*ctx.udb()?, actor_id, body.keys).await; + let res = actor_kv::get(&*ctx.udb()?, actor_id, body.keys).await; let res_msg = versioned::ToClient::wrap_latest( protocol::ToClient::ToClientKvResponse(protocol::ToClientKvResponse { @@ -595,7 +575,7 @@ async fn handle_message_mk1(ctx: &StandaloneCtx, conn: &Conn, msg: Bytes) -> Res .context("failed to send KV get response to client")?; } protocol::KvRequestData::KvListRequest(body) => { - let res = kv::list( + let res = actor_kv::list( &*ctx.udb()?, actor_id, match body.query { @@ -663,7 +643,7 @@ async fn handle_message_mk1(ctx: &StandaloneCtx, conn: &Conn, msg: Bytes) -> Res .context("failed to send KV list response to client")?; } protocol::KvRequestData::KvPutRequest(body) => { - let res = kv::put(&*ctx.udb()?, actor_id, body.keys, body.values).await; + let res = actor_kv::put(&*ctx.udb()?, actor_id, body.keys, body.values).await; let res_msg = versioned::ToClient::wrap_latest( protocol::ToClient::ToClientKvResponse(protocol::ToClientKvResponse { @@ -691,7 +671,7 @@ async fn handle_message_mk1(ctx: &StandaloneCtx, conn: &Conn, msg: Bytes) -> Res .context("failed to send KV put response to client")?; } protocol::KvRequestData::KvDeleteRequest(body) => { - let res = kv::delete(&*ctx.udb()?, actor_id, body.keys).await; + let res = actor_kv::delete(&*ctx.udb()?, actor_id, body.keys).await; let res_msg = versioned::ToClient::wrap_latest( protocol::ToClient::ToClientKvResponse(protocol::ToClientKvResponse { @@ -717,7 +697,7 @@ async fn handle_message_mk1(ctx: &StandaloneCtx, conn: &Conn, msg: Bytes) -> Res .context("failed to send KV delete response to client")?; } protocol::KvRequestData::KvDropRequest => { - let res = kv::delete_all(&*ctx.udb()?, actor_id).await; + let res = actor_kv::delete_all(&*ctx.udb()?, actor_id).await; let res_msg = versioned::ToClient::wrap_latest( protocol::ToClient::ToClientKvResponse(protocol::ToClientKvResponse { @@ -926,3 +906,24 @@ async fn compat_ack_tunnel_message(conn: &Conn, payload: &[u8]) -> Result<()> { Ok(()) } + +async fn send_actor_kv_error(message: &str) -> Result<()> { + let res_msg = versioned::ToClientMk2::wrap_latest(protocol::mk2::ToClient::ToClientKvResponse( + protocol::mk2::ToClientKvResponse { + request_id: req.request_id, + data: protocol::mk2::KvResponseData::KvErrorResponse(protocol::mk2::KvErrorResponse { + message: message.to_string(), + }), + }, + )); + + let res_msg_serialized = res_msg + .serialize(conn.protocol_version) + .context("failed to serialize KV actor validation error")?; + conn.ws_handle + .send(Message::Binary(res_msg_serialized.into())) + .await + .context("failed to send KV actor validation error to client")?; + + Ok(()) +} diff --git a/engine/packages/pegboard/Cargo.toml b/engine/packages/pegboard/Cargo.toml index c0e7a8d943..10cec2f504 100644 --- a/engine/packages/pegboard/Cargo.toml +++ b/engine/packages/pegboard/Cargo.toml @@ -8,6 +8,7 @@ edition.workspace = true [dependencies] anyhow.workspace = true base64.workspace = true +bytes.workspace = true epoxy.workspace = true futures-util.workspace = true gas.workspace = true @@ -31,6 +32,7 @@ serde_bare.workspace = true serde_json.workspace = true serde.workspace = true strum.workspace = true +tokio.workspace = true tracing.workspace = true universaldb.workspace = true universalpubsub.workspace = true @@ -38,3 +40,12 @@ url.workspace = true utoipa.workspace = true uuid.workspace = true vbare.workspace = true + +[dev-dependencies] +portpicker.workspace = true +rivet-config.workspace = true +rivet-test-deps.workspace = true +tokio.workspace = true +tracing-subscriber.workspace = true +url.workspace = true +uuid.workspace = true diff --git a/engine/packages/pegboard/src/actor_kv/entry.rs b/engine/packages/pegboard/src/actor_kv/entry.rs new file mode 100644 index 0000000000..213a93bd85 --- /dev/null +++ b/engine/packages/pegboard/src/actor_kv/entry.rs @@ -0,0 +1,49 @@ +use anyhow::{Result, context, ensure}; +use universaldb::prelude::*; + +use rivet_runner_protocol::mk2 as rp; + +use crate::keys::actor_kv::KeyWrapper; + +pub struct EntryBuilder { + pub key: KeyWrapper, + metadata: Option, + value: Vec, + next_idx: usize, +} + +impl EntryBuilder { + pub fn new(key: KeyWrapper) -> Self { + EntryBuilder { + key, + metadata: None, + value: Vec::new(), + next_idx: 0, + } + } + + pub fn append_metadata(&mut self, metadata: rp::KvMetadata) { + // We ignore setting the metadata again because it means the same key was given twice in the + // input keys for `get`. We don't perform automatic deduplication. + if self.metadata.is_none() { + self.metadata = Some(metadata); + } + } + + pub fn append_chunk(&mut self, idx: usize, chunk: &[u8]) { + if idx >= self.next_idx { + self.value.extend(chunk); + self.next_idx = idx + 1; + } + } + + pub fn build(self) -> Result<(rp::KvKey, rp::KvValue, rp::KvMetadata)> { + ensure!(!self.value.is_empty(), "empty value at key"); + + Ok(( + self.key.0, + self.value, + self.metadata.context("no metadata for key")?, + )) + } +} diff --git a/engine/packages/actor-kv/src/lib.rs b/engine/packages/pegboard/src/actor_kv/mod.rs similarity index 59% rename from engine/packages/actor-kv/src/lib.rs rename to engine/packages/pegboard/src/actor_kv/mod.rs index 003daf6e01..e40e495c70 100644 --- a/engine/packages/actor-kv/src/lib.rs +++ b/engine/packages/pegboard/src/actor_kv/mod.rs @@ -1,17 +1,16 @@ -use std::result::Result::Ok; - -use anyhow::*; -use entry::{EntryBaseKey, EntryBuilder, EntryMetadataKey, EntryValueChunkKey}; +use anyhow::Result; +use entry::EntryBuilder; use futures_util::{StreamExt, TryStreamExt}; use gas::prelude::*; -use key::{KeyWrapper, ListKeyWrapper}; use rivet_runner_protocol::mk2 as rp; +use std::sync::Arc; use universaldb::prelude::*; use universaldb::tuple::Subspace; use utils::{validate_entries, validate_keys}; +use crate::keys; + mod entry; -mod key; mod utils; const VERSION: &str = env!("CARGO_PKG_VERSION"); @@ -22,8 +21,11 @@ const MAX_PUT_PAYLOAD_SIZE: usize = 976 * 1024; const MAX_STORAGE_SIZE: usize = 1024 * 1024 * 1024; // 1 GiB const VALUE_CHUNK_SIZE: usize = 10_000; // 10 KB, not KiB, see https://apple.github.io/foundationdb/blob.html -fn subspace(actor_id: Id) -> universaldb::utils::Subspace { - pegboard::keys::actor_kv_subspace().subspace(&actor_id) +// Namespace and name are used for metrics +pub struct Recipient { + pub actor_id: Id, + pub namespace_id: Id, + pub name: String, } /// Returns estimated size of the given subspace. @@ -42,7 +44,7 @@ pub async fn get_subspace_size(db: &universaldb::Database, subspace: &Subspace) #[tracing::instrument(skip_all)] pub async fn get( db: &universaldb::Database, - actor_id: Id, + recipient: &Recipient, keys: Vec, ) -> Result<(Vec, Vec, Vec)> { validate_keys(&keys)?; @@ -50,13 +52,12 @@ pub async fn get( db.run(|tx| { let keys = keys.clone(); async move { - let tx = tx.with_subspace(subspace(actor_id)); - - let size_estimate = keys.len().min(1024); + let tx = tx.with_subspace(keys::actor_kv::subspace(recipient.actor_id)); let mut stream = futures_util::stream::iter(keys) .map(|key| { - let key_subspace = subspace(actor_id).subspace(&KeyWrapper(key)); + let key_subspace = keys::actor_kv::subspace(recipient.actor_id) + .subspace(&keys::actor_kv::KeyWrapper(key)); // Get all sub keys in the key subspace tx.get_ranges_keyvalues( @@ -67,13 +68,12 @@ pub async fn get( Serializable, ) }) - // Should remain in order - // .buffered(32) .flatten(); - let mut keys = Vec::with_capacity(size_estimate); - let mut values = Vec::with_capacity(size_estimate); - let mut metadata = Vec::with_capacity(size_estimate); + let mut keys = Vec::new(); + let mut values = Vec::new(); + let mut metadata = Vec::new(); + let mut total_size = 0; let mut current_entry: Option = None; loop { @@ -81,7 +81,9 @@ pub async fn get( break; }; - let key = tx.unpack::(&entry.key())?.key; + total_size += entry.key().len() + entry.value().len(); + + let key = tx.unpack::(&entry.key())?.key; let current_entry = if let Some(inner) = &mut current_entry { if inner.key != key { @@ -100,9 +102,12 @@ pub async fn get( current_entry.as_mut().expect("must be set") }; - if let Ok(chunk_key) = tx.unpack::(&entry.key()) { + if let Ok(chunk_key) = tx.unpack::(&entry.key()) + { current_entry.append_chunk(chunk_key.chunk, entry.value()); - } else if let Ok(metadata_key) = tx.unpack::(&entry.key()) { + } else if let Ok(metadata_key) = + tx.unpack::(&entry.key()) + { let value = metadata_key.deserialize(entry.value())?; current_entry.append_metadata(value); @@ -119,6 +124,16 @@ pub async fn get( metadata.push(meta); } + // Total read bytes (rounded up to nearest chunk) + let total_size_chunked = total_size.div_ceil(util::metric::KV_BILLABLE_CHUNK) + * util::metric::KV_BILLABLE_CHUNK; + keys::ns::metric::inc( + tx.with_subspace(keys::subspace()), + recipient.namespace_id, + keys::ns::metric::Metric::KvRead(recipient.name.clone()), + total_size_chunked.try_into().unwrap_or_default(), + ); + Ok((keys, values, metadata)) } }) @@ -131,7 +146,7 @@ pub async fn get( #[tracing::instrument(skip_all)] pub async fn list( db: &universaldb::Database, - actor_id: Id, + recipient: &Recipient, query: rp::KvListQuery, reverse: bool, limit: Option, @@ -139,7 +154,7 @@ pub async fn list( utils::validate_list_query(&query)?; let limit = limit.unwrap_or(16384); - let subspace = subspace(actor_id); + let subspace = keys::actor_kv::subspace(recipient.actor_id); let list_range = list_query_range(query, &subspace); db.run(|tx| { @@ -161,6 +176,7 @@ pub async fn list( let mut keys = Vec::new(); let mut values = Vec::new(); let mut metadata = Vec::new(); + let mut total_size = 0; let mut current_entry: Option = None; loop { @@ -168,7 +184,9 @@ pub async fn list( break; }; - let key = tx.unpack::(&entry.key())?.key; + total_size += entry.key().len() + entry.value().len(); + + let key = tx.unpack::(&entry.key())?.key; let curr = if let Some(inner) = &mut current_entry { if inner.key != key { @@ -193,9 +211,12 @@ pub async fn list( current_entry.as_mut().expect("must be set") }; - if let Ok(chunk_key) = tx.unpack::(&entry.key()) { + if let Ok(chunk_key) = tx.unpack::(&entry.key()) + { curr.append_chunk(chunk_key.chunk, entry.value()); - } else if let Ok(metadata_key) = tx.unpack::(&entry.key()) { + } else if let Ok(metadata_key) = + tx.unpack::(&entry.key()) + { let value = metadata_key.deserialize(entry.value())?; curr.append_metadata(value); @@ -215,6 +236,16 @@ pub async fn list( } } + // Total read bytes (rounded up to nearest chunk) + let total_size_chunked = total_size.div_ceil(util::metric::KV_BILLABLE_CHUNK) + * util::metric::KV_BILLABLE_CHUNK; + keys::ns::metric::inc( + tx.with_subspace(keys::subspace()), + recipient.namespace_id, + keys::ns::metric::Metric::KvRead(recipient.name.clone()), + total_size_chunked.try_into().unwrap_or_default(), + ); + Ok((keys, values, metadata)) } }) @@ -227,40 +258,53 @@ pub async fn list( #[tracing::instrument(skip_all)] pub async fn put( db: &universaldb::Database, - actor_id: Id, + recipient: &Recipient, keys: Vec, values: Vec, ) -> Result<()> { - let subspace = subspace(actor_id); - let total_size = get_subspace_size(&db, &subspace).await? as usize; + let subspace = &keys::actor_kv::subspace(recipient.actor_id); + let total_size = get_subspace_size(&db, subspace).await? as usize; validate_entries(&keys, &values, total_size)?; + let keys = &keys; + let values = &values; db.run(|tx| { - // TODO: Costly clone - let keys = keys.clone(); - let values = values.clone(); - let subspace = subspace.clone(); - async move { let tx = tx.with_subspace(subspace.clone()); + let now = util::timestamp::now(); + + // TODO: Include metadata size? + // Total written bytes (rounded up to nearest chunk) + let total_size = keys.iter().fold(0, |s, key| s + key.len()) + + values.iter().fold(0, |s, value| s + value.len()); + let total_size_chunked = total_size.div_ceil(util::metric::KV_BILLABLE_CHUNK) + * util::metric::KV_BILLABLE_CHUNK; + keys::ns::metric::inc( + tx.with_subspace(keys::subspace()), + recipient.namespace_id, + keys::ns::metric::Metric::KvWrite(recipient.name.clone()), + total_size_chunked.try_into().unwrap_or_default(), + ); - futures_util::stream::iter(keys.into_iter().zip(values.into_iter())) - .map(|(key, value)| { + futures_util::stream::iter(0..keys.len()) + .map(|i| { let tx = tx.clone(); - let key = KeyWrapper(key.clone()); - let subspace = subspace.clone(); - async move { + // TODO: Costly clone + let key = keys::actor_kv::KeyWrapper( + keys.get(i).context("index should exist")?.clone(), + ); + let value = values.get(i).context("index should exist")?; // Clear previous key data before setting tx.clear_subspace_range(&subspace.subspace(&key)); // Set metadata tx.write( - &EntryMetadataKey::new(key.clone()), + &keys::actor_kv::EntryMetadataKey::new(key.clone()), rp::KvMetadata { version: VERSION.as_bytes().to_vec(), - update_ts: utils::now(), + update_ts: now, }, )?; @@ -270,7 +314,10 @@ pub async fn put( let end = (start + VALUE_CHUNK_SIZE).min(value.len()); tx.set( - &subspace.pack(&EntryValueChunkKey::new(key.clone(), idx)), + &subspace.pack(&keys::actor_kv::EntryValueChunkKey::new( + key.clone(), + idx, + )), &value.get(start..end).context("bad slice")?, ); } @@ -290,14 +337,31 @@ pub async fn put( /// Deletes keys from the KV store. Cannot be undone. #[tracing::instrument(skip_all)] -pub async fn delete(db: &universaldb::Database, actor_id: Id, keys: Vec) -> Result<()> { +pub async fn delete( + db: &universaldb::Database, + recipient: &Recipient, + keys: Vec, +) -> Result<()> { validate_keys(&keys)?; + let keys = &keys; db.run(|tx| { - let keys = keys.clone(); async move { + // Total written bytes (rounded up to nearest chunk) + let total_size = keys.iter().fold(0, |s, key| s + key.len()); + let total_size_chunked = total_size.div_ceil(util::metric::KV_BILLABLE_CHUNK) + * util::metric::KV_BILLABLE_CHUNK; + keys::ns::metric::inc( + tx.with_subspace(keys::subspace()), + recipient.namespace_id, + keys::ns::metric::Metric::KvWrite(recipient.name.clone()), + total_size_chunked.try_into().unwrap_or_default(), + ); + for key in keys { - let key_subspace = subspace(actor_id).subspace(&KeyWrapper(key)); + // TODO: Costly clone + let key_subspace = keys::actor_kv::subspace(recipient.actor_id) + .subspace(&keys::actor_kv::KeyWrapper(key.clone())); tx.clear_subspace_range(&key_subspace); } @@ -312,9 +376,20 @@ pub async fn delete(db: &universaldb::Database, actor_id: Id, keys: Vec Result<()> { +pub async fn delete_all(db: &universaldb::Database, recipient: &Recipient) -> Result<()> { db.run(|tx| async move { - tx.clear_subspace_range(&subspace(actor_id)); + tx.clear_subspace_range(&keys::actor_kv::subspace(recipient.actor_id)); + + // Total written bytes (rounded up to nearest chunk) + keys::ns::metric::inc( + tx.with_subspace(keys::subspace()), + recipient.namespace_id, + keys::ns::metric::Metric::KvWrite(recipient.name.clone()), + util::metric::KV_BILLABLE_CHUNK + .try_into() + .unwrap_or_default(), + ); + Ok(()) }) .custom_instrument(tracing::info_span!("kv_delete_all_tx")) @@ -326,11 +401,20 @@ fn list_query_range(query: rp::KvListQuery, subspace: &Subspace) -> (Vec, Ve match query { rp::KvListQuery::KvListAllQuery => subspace.range(), rp::KvListQuery::KvListRangeQuery(range) => ( - subspace.subspace(&ListKeyWrapper(range.start)).range().0, + subspace + .subspace(&keys::actor_kv::ListKeyWrapper(range.start)) + .range() + .0, if range.exclusive { - subspace.subspace(&KeyWrapper(range.end)).range().0 + subspace + .subspace(&keys::actor_kv::KeyWrapper(range.end)) + .range() + .0 } else { - subspace.subspace(&KeyWrapper(range.end)).range().1 + subspace + .subspace(&keys::actor_kv::KeyWrapper(range.end)) + .range() + .1 }, ), rp::KvListQuery::KvListPrefixQuery(prefix) => { @@ -342,7 +426,7 @@ fn list_query_range(query: rp::KvListQuery, subspace: &Subspace) -> (Vec, Ve // - Start: the prefix bytes within the subspace // - End: the prefix bytes + 0xFF (next possible byte) - let mut start = subspace.pack(&ListKeyWrapper(prefix.key.clone())); + let mut start = subspace.pack(&keys::actor_kv::ListKeyWrapper(prefix.key.clone())); // Remove the trailing 0 byte that tuple encoding adds to strings if let Some(&0) = start.last() { start.pop(); diff --git a/engine/packages/actor-kv/src/utils.rs b/engine/packages/pegboard/src/actor_kv/utils.rs similarity index 86% rename from engine/packages/actor-kv/src/utils.rs rename to engine/packages/pegboard/src/actor_kv/utils.rs index c412771478..c88b396e90 100644 --- a/engine/packages/actor-kv/src/utils.rs +++ b/engine/packages/pegboard/src/actor_kv/utils.rs @@ -1,21 +1,11 @@ -use std::result::Result::Ok; - -use anyhow::*; +use anyhow::{Result, ensure}; use rivet_runner_protocol::mk2 as rp; -use crate::{ - MAX_KEY_SIZE, MAX_KEYS, MAX_PUT_PAYLOAD_SIZE, MAX_STORAGE_SIZE, MAX_VALUE_SIZE, key::KeyWrapper, +use super::{ + MAX_KEY_SIZE, MAX_KEYS, MAX_PUT_PAYLOAD_SIZE, MAX_STORAGE_SIZE, MAX_VALUE_SIZE, + keys::actor_kv::KeyWrapper, }; -pub fn now() -> i64 { - std::time::SystemTime::now() - .duration_since(std::time::UNIX_EPOCH) - .unwrap_or_else(|err| unreachable!("time is broken: {}", err)) - .as_millis() - .try_into() - .expect("now doesn't fit in i64") -} - pub fn validate_list_query(query: &rp::KvListQuery) -> Result<()> { match query { rp::KvListQuery::KvListAllQuery => {} diff --git a/engine/packages/actor-kv/src/entry.rs b/engine/packages/pegboard/src/keys/actor_kv.rs similarity index 51% rename from engine/packages/actor-kv/src/entry.rs rename to engine/packages/pegboard/src/keys/actor_kv.rs index adc43433ba..bb441f4a38 100644 --- a/engine/packages/actor-kv/src/entry.rs +++ b/engine/packages/pegboard/src/keys/actor_kv.rs @@ -1,52 +1,87 @@ -use std::result::Result::Ok; - -use anyhow::*; -use universaldb::prelude::*; - +use anyhow::Result; +use bytes::Bytes; +use gas::prelude::*; use rivet_runner_protocol::mk2 as rp; +use universaldb::prelude::*; -use crate::key::KeyWrapper; - -pub struct EntryBuilder { - pub key: KeyWrapper, - metadata: Option, - value: Vec, - next_idx: usize, +pub fn subspace(actor_id: Id) -> universaldb::utils::Subspace { + universaldb::utils::Subspace::new(&(RIVET, PEGBOARD, ACTOR_KV, actor_id)) } -impl EntryBuilder { - pub fn new(key: KeyWrapper) -> Self { - EntryBuilder { - key, - metadata: None, - value: Vec::new(), - next_idx: 0, - } +/// Wraps a key with a trailing NIL byte for exact key matching. +/// +/// Encodes as: `[NESTED, ...bytes..., NIL]` +/// +/// Use this for: +/// - Storing keys +/// - Getting/deleting specific keys +/// - Range query end points (to create closed boundaries) +#[derive(Debug, Clone, PartialEq)] +pub struct KeyWrapper(pub rp::KvKey); + +impl KeyWrapper { + pub fn tuple_len(key: &rp::KvKey) -> usize { + key.len() + 2 } +} - pub fn append_metadata(&mut self, metadata: rp::KvMetadata) { - // We ignore setting the metadata again because it means the same key was given twice in the - // input keys for `get`. We don't perform automatic deduplication. - if self.metadata.is_none() { - self.metadata = Some(metadata); - } +impl TuplePack for KeyWrapper { + fn pack( + &self, + w: &mut W, + tuple_depth: TupleDepth, + ) -> std::io::Result { + let mut offset = VersionstampOffset::None { size: 0 }; + + w.write_all(&[universaldb::utils::codes::NESTED])?; + offset += 1; + + offset += self.0.pack(w, tuple_depth.increment())?; + + w.write_all(&[universaldb::utils::codes::NIL])?; + offset += 1; + + Ok(offset) } +} - pub fn append_chunk(&mut self, idx: usize, chunk: &[u8]) { - if idx >= self.next_idx { - self.value.extend(chunk); - self.next_idx = idx + 1; - } +impl<'de> TupleUnpack<'de> for KeyWrapper { + fn unpack(input: &[u8], tuple_depth: TupleDepth) -> PackResult<(&[u8], Self)> { + let input = universaldb::utils::parse_code(input, universaldb::utils::codes::NESTED)?; + + let (input, inner) = Bytes::unpack(input, tuple_depth.increment())?; + + let input = universaldb::utils::parse_code(input, universaldb::utils::codes::NIL)?; + + Ok((input, KeyWrapper(inner.into_owned()))) } +} + +/// Wraps a key without a trailing NIL byte for prefix/range matching. +/// +/// Encodes as: `[NESTED, ...bytes...]` (no trailing NIL) +/// +/// Use this for: +/// - Range query start points (to create open boundaries) +/// - Prefix queries (to match all keys starting with these bytes) +pub struct ListKeyWrapper(pub rp::KvKey); + +impl TuplePack for ListKeyWrapper { + fn pack( + &self, + w: &mut W, + tuple_depth: TupleDepth, + ) -> std::io::Result { + let mut offset = VersionstampOffset::None { size: 0 }; + + w.write_all(&[universaldb::utils::codes::NESTED])?; + offset += 1; + + offset += self.0.pack(w, tuple_depth.increment())?; - pub fn build(self) -> Result<(rp::KvKey, rp::KvValue, rp::KvMetadata)> { - ensure!(!self.value.is_empty(), "empty value at key"); + // No ending NIL byte compared to `KeyWrapper::pack` - Ok(( - self.key.0, - self.value, - self.metadata.context("no metadata for key")?, - )) + Ok(offset) } } diff --git a/engine/packages/pegboard/src/keys/mod.rs b/engine/packages/pegboard/src/keys/mod.rs index e57e10462a..7bdec9feaf 100644 --- a/engine/packages/pegboard/src/keys/mod.rs +++ b/engine/packages/pegboard/src/keys/mod.rs @@ -1,6 +1,7 @@ use universaldb::prelude::*; pub mod actor; +pub mod actor_kv; pub mod backfill; pub mod epoxy; pub mod hibernating_request; @@ -11,7 +12,3 @@ pub mod runner_config; pub fn subspace() -> universaldb::utils::Subspace { rivet_types::keys::pegboard::subspace() } - -pub fn actor_kv_subspace() -> universaldb::utils::Subspace { - universaldb::utils::Subspace::new(&(RIVET, PEGBOARD, ACTOR_KV)) -} diff --git a/engine/packages/pegboard/src/keys/ns/metric.rs b/engine/packages/pegboard/src/keys/ns/metric.rs new file mode 100644 index 0000000000..d2a3ea805d --- /dev/null +++ b/engine/packages/pegboard/src/keys/ns/metric.rs @@ -0,0 +1,284 @@ +use anyhow::Result; +use gas::prelude::*; +use universaldb::prelude::*; + +#[derive(Debug, PartialEq, Eq)] +pub enum Metric { + /// Seconds (actor name) + ActorAwake(String), + /// Count (actor name) + TotalActors(String), + /// Bytes (actor name) + KvStorageUsed(String), + /// Bytes (actor name) + KvRead(String), + /// Bytes (actor name) + KvWrite(String), + /// Count (actor name) + AlarmsSet(String), + /// Bytes (actor name) + GatewayIngress(String), + /// Bytes (actor name) + GatewayEgress(String), + /// Count (actor name, type) + Requests(String, String), + /// Count (actor name, type) + ActiveRequests(String, String), +} + +impl Metric { + fn variant(&self) -> MetricVariant { + match self { + Metric::ActorAwake(_) => MetricVariant::ActorAwakeHours, + Metric::TotalActors(_) => MetricVariant::TotalActors, + Metric::KvStorageUsed(_) => MetricVariant::KvStorageUsed, + Metric::KvRead(_) => MetricVariant::KvRead, + Metric::KvWrite(_) => MetricVariant::KvWrite, + Metric::AlarmsSet(_) => MetricVariant::AlarmsSet, + Metric::GatewayIngress(_) => MetricVariant::GatewayIngress, + Metric::GatewayEgress(_) => MetricVariant::GatewayEgress, + Metric::Requests(_, _) => MetricVariant::Requests, + Metric::ActiveRequests(_, _) => MetricVariant::ActiveRequests, + } + } +} + +#[derive(strum::FromRepr)] +enum MetricVariant { + ActorAwakeHours = 0, + TotalActors = 1, + KvStorageUsed = 2, + KvRead = 3, + KvWrite = 4, + AlarmsSet = 5, + GatewayIngress = 6, + GatewayEgress = 7, + Requests = 8, + ActiveRequests = 9, +} + +#[derive(Debug)] +pub struct MetricKey { + pub namespace_id: Id, + pub metric: Metric, +} + +impl MetricKey { + pub fn new(namespace_id: Id, metric: Metric) -> Self { + MetricKey { + namespace_id, + metric, + } + } + + pub fn subspace(namespace_id: Id) -> MetricSubspaceKey { + MetricSubspaceKey::new(namespace_id) + } +} + +impl FormalKey for MetricKey { + // IMPORTANT: Uses LE bytes, not BE + /// Count. + type Value = i64; + + fn deserialize(&self, raw: &[u8]) -> Result { + Ok(usize::from_le_bytes(raw.try_into()?)) + } + + fn serialize(&self, value: Self::Value) -> Result> { + Ok(value.to_le_bytes().to_vec()) + } +} + +impl TuplePack for MetricKey { + fn pack( + &self, + w: &mut W, + tuple_depth: TupleDepth, + ) -> std::io::Result { + let mut offset = VersionstampOffset::None { size: 0 }; + + let t = ( + NAMESPACE, + METRIC, + self.namespace_id, + self.metric.variant() as usize, + ); + offset += t.pack(w, tuple_depth)?; + + offset += match &self.metric { + Metric::ActorAwake(actor_name) => actor_name.pack(w, tuple_depth)?, + Metric::TotalActors(actor_name) => actor_name.pack(w, tuple_depth)?, + Metric::KvStorageUsed(actor_name) => actor_name.pack(w, tuple_depth)?, + Metric::KvRead(actor_name) => actor_name.pack(w, tuple_depth)?, + Metric::KvWrite(actor_name) => actor_name.pack(w, tuple_depth)?, + Metric::AlarmsSet(actor_name) => actor_name.pack(w, tuple_depth)?, + Metric::GatewayIngress(actor_name) => actor_name.pack(w, tuple_depth)?, + Metric::GatewayEgress(actor_name) => actor_name.pack(w, tuple_depth)?, + Metric::Requests(actor_name, req_type) => { + (actor_name, req_type).pack(w, tuple_depth)? + } + Metric::ActiveRequests(actor_name, req_type) => { + (actor_name, req_type).pack(w, tuple_depth)? + } + }; + + std::result::Result::Ok(offset) + } +} + +impl<'de> TupleUnpack<'de> for MetricKey { + fn unpack(input: &[u8], tuple_depth: TupleDepth) -> PackResult<(&[u8], Self)> { + let (input, (_, _, namespace_id, variant)) = + <(usize, usize, Id, usize)>::unpack(input, tuple_depth)?; + let variant = MetricVariant::from_repr(variant).ok_or_else(|| { + PackError::Message(format!("invalid metric variant `{variant}` in key").into()) + })?; + + let (input, v) = match variant { + MetricVariant::ActorAwakeHours => { + let (input, actor_name) = String::unpack(input, tuple_depth)?; + + ( + input, + MetricKey { + namespace_id, + metric: Metric::ActorAwake(actor_name), + }, + ) + } + MetricVariant::TotalActors => { + let (input, actor_name) = String::unpack(input, tuple_depth)?; + + ( + input, + MetricKey { + namespace_id, + metric: Metric::TotalActors(actor_name), + }, + ) + } + MetricVariant::KvStorageUsed => { + let (input, actor_name) = String::unpack(input, tuple_depth)?; + + ( + input, + MetricKey { + namespace_id, + metric: Metric::KvStorageUsed(actor_name), + }, + ) + } + MetricVariant::KvRead => { + let (input, actor_name) = String::unpack(input, tuple_depth)?; + + ( + input, + MetricKey { + namespace_id, + metric: Metric::KvRead(actor_name), + }, + ) + } + MetricVariant::KvWrite => { + let (input, actor_name) = String::unpack(input, tuple_depth)?; + + ( + input, + MetricKey { + namespace_id, + metric: Metric::KvWrite(actor_name), + }, + ) + } + MetricVariant::AlarmsSet => { + let (input, actor_name) = String::unpack(input, tuple_depth)?; + + ( + input, + MetricKey { + namespace_id, + metric: Metric::AlarmsSet(actor_name), + }, + ) + } + MetricVariant::GatewayIngress => { + let (input, actor_name) = String::unpack(input, tuple_depth)?; + + ( + input, + MetricKey { + namespace_id, + metric: Metric::GatewayIngress(actor_name), + }, + ) + } + MetricVariant::GatewayEgress => { + let (input, actor_name) = String::unpack(input, tuple_depth)?; + + ( + input, + MetricKey { + namespace_id, + metric: Metric::GatewayEgress(actor_name), + }, + ) + } + MetricVariant::Requests => { + let (input, (actor_name, req_type)) = + <(String, String)>::unpack(input, tuple_depth)?; + + ( + input, + MetricKey { + namespace_id, + metric: Metric::Requests(actor_name, req_type), + }, + ) + } + MetricVariant::ActiveRequests => { + let (input, (actor_name, req_type)) = + <(String, String)>::unpack(input, tuple_depth)?; + + ( + input, + MetricKey { + namespace_id, + metric: Metric::ActiveRequests(actor_name, req_type), + }, + ) + } + }; + + Ok((input, v)) + } +} + +pub struct MetricSubspaceKey { + namespace_id: Id, +} + +impl MetricSubspaceKey { + pub fn new(namespace_id: Id) -> Self { + MetricSubspaceKey { namespace_id } + } +} + +impl TuplePack for MetricSubspaceKey { + fn pack( + &self, + w: &mut W, + tuple_depth: TupleDepth, + ) -> std::io::Result { + let t = (NAMESPACE, METRIC, self.namespace_id); + t.pack(w, tuple_depth) + } +} + +pub fn inc(tx: universaldb::Transaction, namespace_id: Id, metric: Metric, by: i64) { + tx.atomic_op( + &MetricKey::new(namespace_id, metric), + &by.to_le_bytes(), + MutationType::Add, + ); +} diff --git a/engine/packages/pegboard/src/keys/ns.rs b/engine/packages/pegboard/src/keys/ns/mod.rs similarity index 99% rename from engine/packages/pegboard/src/keys/ns.rs rename to engine/packages/pegboard/src/keys/ns/mod.rs index bc6a1df0bc..c0cc418523 100644 --- a/engine/packages/pegboard/src/keys/ns.rs +++ b/engine/packages/pegboard/src/keys/ns/mod.rs @@ -1,10 +1,10 @@ -use std::result::Result::Ok; - -use anyhow::*; +use anyhow::Result; use gas::prelude::*; use universaldb::prelude::*; use vbare::OwnedVersionedData; +pub mod metric; + #[derive(Debug)] pub struct RunnerAllocIdxKey { pub namespace_id: Id, diff --git a/engine/packages/pegboard/src/lib.rs b/engine/packages/pegboard/src/lib.rs index d977f83918..731c91011e 100644 --- a/engine/packages/pegboard/src/lib.rs +++ b/engine/packages/pegboard/src/lib.rs @@ -1,5 +1,6 @@ use gas::prelude::*; +pub mod actor_kv; pub mod errors; pub mod keys; pub mod metrics; diff --git a/engine/packages/pegboard/src/ops/actor/get_for_runner.rs b/engine/packages/pegboard/src/ops/actor/get_for_runner.rs new file mode 100644 index 0000000000..696eb93d58 --- /dev/null +++ b/engine/packages/pegboard/src/ops/actor/get_for_runner.rs @@ -0,0 +1,91 @@ +use futures_util::{StreamExt, TryStreamExt}; +use gas::prelude::*; +use universaldb::utils::{FormalKey, IsolationLevel::*}; + +use crate::keys; + +#[derive(Debug)] +pub struct Input { + pub actor_id: Id, +} + +#[derive(Debug)] +pub struct Output { + pub name: String, + pub runner_id: Id, + pub is_connectable: bool, +} + +// TODO: Add cache (remember to purge cache when runner changes) +#[operation] +pub async fn pegboard_actor_get_for_runner( + ctx: &OperationCtx, + input: &Input, +) -> Result> { + let (name, runner_id, is_connectable) = ctx + .udb()? + .run(|tx| async move { + let tx = tx.with_subspace(keys::subspace()); + + let name_key = keys::actor::NameKey::new(actor_id); + let runner_id_key = keys::actor::RunnerIdKey::new(actor_id); + let connectable_key = keys::actor::ConnectableKey::new(actor_id); + + let (name_entry, runner_id_entry, is_connectable) = tokio::try_join!( + tx.read_opt(&name_key, Serializable), + tx.read_opt(&runner_id_key, Serializable), + tx.exists(&connectable_key, Serializable), + )?; + + let (Some(name), Some(runner_id)) = (name_entry, runner_id_entry) else { + return Ok(None); + }; + + Ok(Some(Actor { + name, + runner_id, + is_connectable, + })) + }) + .custom_instrument(tracing::info_span!("actor_get_for_runner_tx")) + .await?; + + // NOTE: The name key was added via backfill. If the actor has not backfilled the key yet (key is none), + // we need to fetch it from the actor state + let name = if let Some(name) = name { + name + } else { + let wfs = ctx + .get_workflows( + actors_with_wf_ids + .iter() + .map(|(_, workflow_id)| *workflow_id) + .collect(), + ) + .await?; + + let Some(wf) = wfs.first() else { + return Ok(None); + }; + + let actor_state = match wf.parse_state::>() { + Ok(Some(s)) => s, + Ok(None) => { + // Actor did not initialize state yet + return Ok(None); + } + Err(err) => { + tracing::error!(?actor_id, ?workflow_id, ?err, "failed to parse wf state"); + return Ok(None); + } + }; + + actor_state.name + }; + + Ok(Some(Actor { + name, + runner_id, + is_connectable, + })) +} diff --git a/engine/packages/pegboard/src/ops/actor/get_runner.rs b/engine/packages/pegboard/src/ops/actor/get_runner.rs deleted file mode 100644 index 3503b88ec3..0000000000 --- a/engine/packages/pegboard/src/ops/actor/get_runner.rs +++ /dev/null @@ -1,64 +0,0 @@ -use futures_util::{StreamExt, TryStreamExt}; -use gas::prelude::*; -use universaldb::utils::{FormalKey, IsolationLevel::*}; - -use crate::keys; - -#[derive(Debug)] -pub struct Input { - pub actor_ids: Vec, -} - -#[derive(Debug)] -pub struct Output { - pub actors: Vec, -} - -#[derive(Debug)] -pub struct Actor { - pub actor_id: Id, - pub runner_id: Id, - pub is_connectable: bool, -} - -// TODO: Add cache (remember to purge cache when runner changes) -#[operation] -pub async fn pegboard_actor_get_runner(ctx: &OperationCtx, input: &Input) -> Result { - let actors = ctx - .udb()? - .run(|tx| async move { - futures_util::stream::iter(input.actor_ids.clone()) - .map(|actor_id| { - let tx = tx.clone(); - async move { - let runner_id_key = keys::actor::RunnerIdKey::new(actor_id); - let connectable_key = keys::actor::ConnectableKey::new(actor_id); - - let (runner_id_entry, connectable_entry) = tokio::try_join!( - tx.get(&keys::subspace().pack(&runner_id_key), Serializable), - tx.get(&keys::subspace().pack(&connectable_key), Serializable), - )?; - - let Some(runner_id_entry) = runner_id_entry else { - return Ok(None); - }; - - let runner_id = runner_id_key.deserialize(&runner_id_entry)?; - - Ok(Some(Actor { - actor_id, - runner_id, - is_connectable: connectable_entry.is_some(), - })) - } - }) - .buffer_unordered(1024) - .try_filter_map(|x| std::future::ready(Ok(x))) - .try_collect::>() - .await - }) - .custom_instrument(tracing::info_span!("actor_get_runner_tx")) - .await?; - - Ok(Output { actors }) -} diff --git a/engine/packages/pegboard/src/ops/actor/mod.rs b/engine/packages/pegboard/src/ops/actor/mod.rs index 726ba16757..8cb4f28d9c 100644 --- a/engine/packages/pegboard/src/ops/actor/mod.rs +++ b/engine/packages/pegboard/src/ops/actor/mod.rs @@ -2,8 +2,8 @@ pub mod create; pub mod get; pub mod get_for_gateway; pub mod get_for_key; +pub mod get_for_runner; pub mod get_reservation_for_key; -pub mod get_runner; pub mod hibernating_request; pub mod list_for_ns; pub mod list_names; diff --git a/engine/packages/pegboard/src/workflows/actor/destroy.rs b/engine/packages/pegboard/src/workflows/actor/destroy.rs index 8c78ca62a3..7b2954f176 100644 --- a/engine/packages/pegboard/src/workflows/actor/destroy.rs +++ b/engine/packages/pegboard/src/workflows/actor/destroy.rs @@ -93,16 +93,15 @@ async fn update_state_and_db( let mut state = ctx.state::()?; let destroy_ts = util::timestamp::now(); + let runner_id = state.runner_id; + let namespace_id = state.namespace_id; + let runner_name_selector = &state.runner_name_selector; + let allocated_serverless_slot = state.allocated_serverless_slot; + let name = &state.name; + let create_ts = state.create_ts; + let key = &state.key; ctx.udb()? .run(|tx| { - let runner_id = state.runner_id.clone(); - let namespace_id = state.namespace_id.clone(); - let runner_name_selector = state.runner_name_selector.clone(); - let allocated_serverless_slot = state.allocated_serverless_slot.clone(); - let name = state.name.clone(); - let create_ts = state.create_ts.clone(); - let key = state.key.clone(); - async move { let tx = tx.with_subspace(keys::subspace()); @@ -111,7 +110,7 @@ async fn update_state_and_db( clear_slot( input.actor_id, namespace_id, - &runner_name_selector, + runner_name_selector, runner_id, allocated_serverless_slot, &tx, @@ -126,12 +125,12 @@ async fn update_state_and_db( input.actor_id, )); - if let Some(k) = &key { + if let Some(key) = &key { tx.write( &keys::ns::ActorByKeyKey::new( namespace_id, name.clone(), - k.clone(), + key.clone(), create_ts, input.actor_id, ), @@ -142,6 +141,14 @@ async fn update_state_and_db( )?; } + // Update metrics + keys::ns::metric::inc( + tx, + namespace_id, + keys::ns::metric::Metric::TotalActors(name.clone()), + -1, + ); + Ok(()) } }) @@ -172,7 +179,6 @@ struct ClearKvOutput { #[activity(ClearKv)] async fn clear_kv(ctx: &ActivityCtx, input: &ClearKvInput) -> Result { - // Matches `delete_all` from actor_kv (can't import because of cyclical dep) let final_size = ctx .udb()? .run(|tx| async move { @@ -181,6 +187,7 @@ async fn clear_kv(ctx: &ActivityCtx, input: &ClearKvInput) -> Result Result<()> .send() .await?; - // TODO(RVT-3928): return Ok(Err); return Ok(()); } @@ -208,6 +207,20 @@ pub async fn pegboard_actor(ctx: &mut WorkflowCtx, input: &Input) -> Result<()> }) .await?; + match ctx.check_version(2).await? { + 1 => { + ctx.v(2) + .activity(setup::BackfillUdbKeysAndMetricsInput { + actor_id: input.actor_id, + }) + .await?; + } + _latest => { + // Do nothing, already using the new version of init_state_and_udb which has the new udb keys and + // metrics + } + } + if let Some(key) = &input.key { match keys::reserve_key( ctx, diff --git a/engine/packages/pegboard/src/workflows/actor/runtime.rs b/engine/packages/pegboard/src/workflows/actor/runtime.rs index e3337219d2..0f02611e2e 100644 --- a/engine/packages/pegboard/src/workflows/actor/runtime.rs +++ b/engine/packages/pegboard/src/workflows/actor/runtime.rs @@ -1159,11 +1159,17 @@ pub struct SetSleepingInput { #[activity(SetSleeping)] pub async fn set_sleeping(ctx: &ActivityCtx, input: &SetSleepingInput) -> Result<()> { let mut state = ctx.state::()?; - let sleep_ts = util::timestamp::now(); + let now = util::timestamp::now(); - state.sleep_ts = Some(sleep_ts); + // Seconds (rounded up) + let awake_duration = state + .connectable_ts + .map(|ts| util::math::div_ceil_i64((now - ts).max(0), util::duration::seconds(1))); + state.sleep_ts = Some(now); state.connectable_ts = None; + let name = &state.name; + let namespace_id = state.namespace_id; ctx.udb()? .run(|tx| async move { let tx = tx.with_subspace(keys::subspace()); @@ -1171,7 +1177,17 @@ pub async fn set_sleeping(ctx: &ActivityCtx, input: &SetSleepingInput) -> Result // Make not connectable tx.delete(&keys::actor::ConnectableKey::new(input.actor_id)); - tx.write(&keys::actor::SleepTsKey::new(input.actor_id), sleep_ts)?; + tx.write(&keys::actor::SleepTsKey::new(input.actor_id), now)?; + + // Update metrics + if let Some(awake_duration) = awake_duration { + keys::ns::metric::inc( + tx, + namespace_id, + keys::ns::metric::Metric::ActorAwake(name.clone()), + awake_duration, + ); + } Ok(()) }) diff --git a/engine/packages/pegboard/src/workflows/actor/setup.rs b/engine/packages/pegboard/src/workflows/actor/setup.rs index 84c7d2486e..5e4f5fe7e4 100644 --- a/engine/packages/pegboard/src/workflows/actor/setup.rs +++ b/engine/packages/pegboard/src/workflows/actor/setup.rs @@ -102,6 +102,31 @@ pub async fn insert_state_and_db(ctx: &ActivityCtx, input: &InitStateAndUdbInput &keys::actor::RunnerNameSelectorKey::new(input.actor_id), input.runner_name_selector.clone(), )?; + tx.write( + &keys::actor::NameKey::new(input.actor_id), + input.name.clone(), + )?; + tx.write(&keys::actor::KeyKey::new(input.actor_id), input.key.clone())?; + tx.write( + &keys::actor::CrashPolicyKey::new(input.actor_id), + input.crash_policy, + )?; + + // Update metrics + keys::ns::metric::inc( + tx, + input.namespace_id, + keys::ns::metric::Metric::TotalActors(name.clone()), + 1, + ); + + // Update metrics + keys::ns::metric::inc( + tx, + input.namespace_id, + keys::ns::metric::Metric::TotalActors(name.clone()), + 1, + ); Ok(()) }) @@ -177,3 +202,45 @@ pub async fn add_indexes_and_set_create_complete( Ok(()) } + +#[derive(Debug, Clone, Serialize, Deserialize, Hash)] +pub struct BackfillUdbKeysAndMetricsInput { + pub actor_id: Id, +} + +#[activity(BackfillUdbKeysAndMetrics)] +pub async fn backfill_udb_keys_and_metrics( + ctx: &ActivityCtx, + input: &BackfillUdbKeysAndMetricsInput, +) -> Result<()> { + let state = &ctx.state::()?; + + ctx.udb()? + .run(|tx| async move { + let tx = tx.with_subspace(keys::subspace()); + + tx.write( + &keys::actor::NameKey::new(input.actor_id), + state.name.clone(), + )?; + tx.write(&keys::actor::KeyKey::new(input.actor_id), state.key.clone())?; + tx.write( + &keys::actor::CrashPolicyKey::new(input.actor_id), + state.crash_policy, + )?; + + // Update metrics + keys::ns::metric::inc( + tx, + input.namespace_id, + keys::ns::metric::Metric::TotalActors(name.clone()), + 1, + ); + + Ok(()) + }) + .custom_instrument(tracing::info_span!("actor_insert_tx")) + .await?; + + Ok(()) +} diff --git a/engine/packages/actor-kv/tests/list_edge_cases.rs b/engine/packages/pegboard/tests/kv_list_edge_cases.rs similarity index 100% rename from engine/packages/actor-kv/tests/list_edge_cases.rs rename to engine/packages/pegboard/tests/kv_list_edge_cases.rs diff --git a/engine/packages/actor-kv/tests/kv_operations.rs b/engine/packages/pegboard/tests/kv_operations.rs similarity index 100% rename from engine/packages/actor-kv/tests/kv_operations.rs rename to engine/packages/pegboard/tests/kv_operations.rs diff --git a/engine/packages/universaldb/src/prelude.rs b/engine/packages/universaldb/src/prelude.rs index a5c1c897fa..a94f14a9ef 100644 --- a/engine/packages/universaldb/src/prelude.rs +++ b/engine/packages/universaldb/src/prelude.rs @@ -1,6 +1,6 @@ pub use crate::{ key_selector::KeySelector, - options::StreamingMode, + options::{ConflictRangeType, MutationType, StreamingMode}, range_option::RangeOption, tuple::{PackError, PackResult, TupleDepth, TuplePack, TupleUnpack, VersionstampOffset}, utils::{FormalChunkedKey, FormalKey, IsolationLevel::*, OptSliceExt, SliceExt, keys::*}, diff --git a/engine/packages/util/src/lib.rs b/engine/packages/util/src/lib.rs index e60ba14eaf..5d872ec917 100644 --- a/engine/packages/util/src/lib.rs +++ b/engine/packages/util/src/lib.rs @@ -11,6 +11,7 @@ pub mod format; pub mod future; pub mod geo; pub mod math; +pub mod metric; pub mod req; pub mod serde; pub mod size; diff --git a/engine/packages/util/src/metric.rs b/engine/packages/util/src/metric.rs new file mode 100644 index 0000000000..aea0873ad7 --- /dev/null +++ b/engine/packages/util/src/metric.rs @@ -0,0 +1 @@ +pub const KV_BILLABLE_CHUNK: u64 = crate::size::kibibytes(4);