Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update prometheus metric names in Grafana expressions. #159

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ pub async fn bootstrap(

let mut state = AppState::new(config, keys_persistent_storage)?;

if state.config.telemetry_prometheus_port.is_some() {
if let Some(prometheus_port) = state.config.telemetry_prometheus_port {
info!("Telemetry is enabled on port {}", prometheus_port);
state.set_metrics(metrics::Metrics::new(Resource::new(vec![
KeyValue::new("service_name", state.build_info.crate_info.name.clone()),
KeyValue::new(
Expand Down
64 changes: 32 additions & 32 deletions terraform/.terraform.lock.hcl

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

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local app_metric = import '../app_metric.libsonnet';

{
new(ds, vars):: app_metric.new(ds, vars, 'Identity - Invalid CACAO during Registration', 'invalid_identity_register_cacao', 'Invalid CACAOs')
new(ds, vars):: app_metric.new(ds, vars, 'Identity - Invalid CACAO during Registration', 'invalid_identity_register_cacao_total', 'Invalid CACAOs')
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local app_metric = import '../app_metric.libsonnet';

{
new(ds, vars):: app_metric.new(ds, vars, 'Identity - Invalid JWT during Unregistration', 'invalid_identity_unregister_jwt', 'Invalid JWTs')
new(ds, vars):: app_metric.new(ds, vars, 'Identity - Invalid JWT during Unregistration', 'invalid_identity_unregister_jwt_total', 'Invalid JWTs')
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local app_metric = import '../app_metric.libsonnet';

{
new(ds, vars):: app_metric.new(ds, vars, 'Identity - Registrations', 'identity_register', 'Registrations')
new(ds, vars):: app_metric.new(ds, vars, 'Identity - Registrations', 'identity_register_total', 'Registrations')
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local app_metric = import '../app_metric.libsonnet';

{
new(ds, vars):: app_metric.new(ds, vars, 'Identity - Resolutions', 'identity_resolved', 'Resolutions')
new(ds, vars):: app_metric.new(ds, vars, 'Identity - Resolutions', 'identity_resolved_total', 'Resolutions')
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local app_metric = import '../app_metric.libsonnet';

{
new(ds, vars):: app_metric.new(ds, vars, 'Identity - Unregistrations', 'identity_unregister', 'Unregistrations')
new(ds, vars):: app_metric.new(ds, vars, 'Identity - Unregistrations', 'identity_unregister_total', 'Unregistrations')
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local app_metric = import '../app_metric.libsonnet';

{
new(ds, vars):: app_metric.new(ds, vars, 'Invite - Invalid JWT during Registration', 'invalid_invite_register_jwt', 'Invalid JWTs')
new(ds, vars):: app_metric.new(ds, vars, 'Invite - Invalid JWT during Registration', 'invalid_invite_register_jwt_total', 'Invalid JWTs')
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local app_metric = import '../app_metric.libsonnet';

{
new(ds, vars):: app_metric.new(ds, vars, 'Invite - Invalid JWT during Unregistration', 'invalid_invite_unregister_jwt', 'Invalid JWTs')
new(ds, vars):: app_metric.new(ds, vars, 'Invite - Invalid JWT during Unregistration', 'invalid_invite_unregister_jwt_total', 'Invalid JWTs')
}
2 changes: 1 addition & 1 deletion terraform/monitoring/panels/app/invite/register.libsonnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local app_metric = import '../app_metric.libsonnet';

{
new(ds, vars):: app_metric.new(ds, vars, 'Invite - Registrations', 'invite_register', 'Registrations')
new(ds, vars):: app_metric.new(ds, vars, 'Invite - Registrations', 'invite_register_total', 'Registrations')
}
2 changes: 1 addition & 1 deletion terraform/monitoring/panels/app/invite/resolved.libsonnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local app_metric = import '../app_metric.libsonnet';

{
new(ds, vars):: app_metric.new(ds, vars, 'Invite - Resolutions', 'invite_resolved', 'Resolutions')
new(ds, vars):: app_metric.new(ds, vars, 'Invite - Resolutions', 'invite_resolved_total', 'Resolutions')
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local app_metric = import '../app_metric.libsonnet';

{
new(ds, vars):: app_metric.new(ds, vars, 'Invite - Unregistrations', 'invite_unregister', 'Unregistrations')
new(ds, vars):: app_metric.new(ds, vars, 'Invite - Unregistrations', 'invite_unregister_total', 'Unregistrations')
}