From f4a78358f710fc9cf124d0ce4c6f16109a72c639 Mon Sep 17 00:00:00 2001 From: Piotr <17101802+thampiotr@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:24:12 +0000 Subject: [PATCH] remove error simulation to fix uneven samples/s --- .../prometheus/scrape_task/internal/promstub/sender.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/internal/component/prometheus/scrape_task/internal/promstub/sender.go b/internal/component/prometheus/scrape_task/internal/promstub/sender.go index b25eb523c..f46d9b7f1 100644 --- a/internal/component/prometheus/scrape_task/internal/promstub/sender.go +++ b/internal/component/prometheus/scrape_task/internal/promstub/sender.go @@ -1,8 +1,6 @@ package promstub import ( - "fmt" - "math/rand" "time" "github.com/grafana/alloy/internal/component/prometheus/scrape_task/internal/promadapter" @@ -33,10 +31,5 @@ func (s *sender) Send(metrics []promadapter.Metrics) error { } } - // 1% failures - if rand.Intn(100) == 0 { - return fmt.Errorf("send failed: test downstream unavailable") - } - return nil }