From 34c4d5162d83f5a67cbab28d9b81ca4399406d99 Mon Sep 17 00:00:00 2001 From: Manuel Kieweg <manuel.kieweg@h-da.de> Date: Fri, 20 Aug 2021 14:03:34 +0000 Subject: [PATCH] Cardinality fix --- build.go | 2 +- docker-compose.yml | 2 +- metrics.go | 14 +++++++------- prometheus/prometheus.yml | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build.go b/build.go index 69f09865..5cf8a565 100644 --- a/build.go +++ b/build.go @@ -36,7 +36,7 @@ func buildImage(d Deployment, dockerClient *client.Client) error { labels := prometheus.Labels{"type": spb.Type_CONTAINERISED.String()} start := promStartHook(labels, buildsTotal) - ctx, cancel := context.WithTimeout(context.Background(), time.Second*120) + ctx, cancel := context.WithTimeout(context.Background(), time.Second*300) defer cancel() p := filepath.Join(d.ID.String(), "/") diff --git a/docker-compose.yml b/docker-compose.yml index 9b5b1095..c8698002 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -46,4 +46,4 @@ volumes: grafana-data: networks: - csbi-dev-net: \ No newline at end of file + csbi-dev-net: diff --git a/metrics.go b/metrics.go index fb0c9083..2c1c20bb 100644 --- a/metrics.go +++ b/metrics.go @@ -98,7 +98,7 @@ var ( Name: "orchestrator_creations_total", Help: "Total number of created deployments", }, - []string{"type", "name"}, + []string{"type"}, ) orchestratorDestructionsTotal = promauto.NewCounterVec( @@ -106,7 +106,7 @@ var ( Name: "orchestrator_destructions_total", Help: "Total number of destroyed deployments", }, - []string{"type", "name"}, + []string{"type"}, ) orchestratorErrorsTotal = promauto.NewCounterVec( @@ -114,7 +114,7 @@ var ( Name: "orchestrator_errors_total", Help: "Total number of orchestrator errors", }, - []string{"type", "name", "error"}, + []string{"type", "error"}, ) orchestratorCreateDurationSeconds = promauto.NewHistogramVec( @@ -122,7 +122,7 @@ var ( Name: "orchestrator_create_duration_seconds", Help: "Histogram of create operation duration", }, - []string{"type", "name"}, + []string{"type"}, ) orchestratorCreateDurationSecondsTotal = promauto.NewCounterVec( @@ -130,7 +130,7 @@ var ( Name: "orchestrator_create_duration_seconds_total", Help: "Total time required for create operations", }, - []string{"type", "name"}, + []string{"type"}, ) orchestratorDestroyDurationSeconds = promauto.NewHistogramVec( @@ -138,7 +138,7 @@ var ( Name: "orchestrator_destroy_duration_seconds", Help: "Histogram of destroy operation duration", }, - []string{"type", "name"}, + []string{"type"}, ) orchestratorDestroyDurationSecondsTotal = promauto.NewCounterVec( @@ -146,7 +146,7 @@ var ( Name: "orchestrator_destroy_duration_seconds_total", Help: "Total time required for destroy operations", }, - []string{"type", "name"}, + []string{"type"}, ) codeGenerationErrorsTotal = promauto.NewCounterVec( diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml index 042b8531..cb61f192 100644 --- a/prometheus/prometheus.yml +++ b/prometheus/prometheus.yml @@ -1,6 +1,6 @@ global: scrape_interval: 5s - scrape_timeout: 10s + scrape_timeout: 3s rule_files: - alert.yml -- GitLab