Skip to content

Commit

Permalink
fix Grafana panels
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier Basty committed Feb 7, 2024
1 parent ab057bb commit aaab706
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 66 deletions.
60 changes: 9 additions & 51 deletions Cargo.lock

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

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cerberus = { git = "https://github.com/WalletConnect/cerberus.git", tag = "v0.9.
# O11y
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["json"] }
metrics = "0.20"
metrics = "0.21"
axum-prometheus = "0.3"

# Serialisation
Expand All @@ -53,3 +53,8 @@ tap = "1.0"

[build-dependencies]
build-info-build = ">=0.0.30"

[package.metadata.cargo-udeps.ignore]
normal = ["unicode-normalization", "ahash"]
#development = []
#build = []
1 change: 1 addition & 0 deletions src/http_server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ fn build_content_security_header(domains: Vec<Domain>) -> String {

// `*.domain` doesn't match `domain` by the Content-Security-Policy spec, so
// we are specifying both.
//
// See the test for this function if you have any doubts.
[" ", proto, "*.", domain, " ", proto, domain]
});
Expand Down
15 changes: 2 additions & 13 deletions terraform/monitoring/panels/http/request_response.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,11 @@ local defaults = import '../../grafonnet-lib/defaults.libsonnet';
local panels = grafana.panels;
local targets = grafana.targets;

local thresholds = {
warning: 80,
};

local _configuration = defaults.configuration.timeseries
.withUnit(grafana.fieldConfig.units.Milliseconds)
.withThresholdStyle(grafana.fieldConfig.thresholdStyle.Area)
.withThresholds(
baseColor = defaults.values.colors.ok,
steps = [
{ value: thresholds.warning, color: defaults.values.colors.critical },
]
)
.withSoftLimit(
axisSoftMin = 0,
axisSoftMax = thresholds.warning,
baseColor = 'transparent',
steps = []
)
.addOverrides([
grafana.override.newColorOverride(
Expand Down
2 changes: 1 addition & 1 deletion terraform/monitoring/panels/registry/cache_read.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ local _configuration = defaults.configuration.timeseries
{
new(ds, vars)::
panels.timeseries(
title = 'Cache Weads / s',
title = 'Cache Reads / s',
datasource = ds.prometheus,
)
.configure(_configuration)
Expand Down

0 comments on commit aaab706

Please sign in to comment.