From 549d147870b16252cdb864fd6a693d3922c04d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Pa=C3=9F?= <22845248+mpass99@users.noreply.github.com> Date: Tue, 30 Aug 2022 23:57:26 +0200 Subject: [PATCH] Fix missing environment id for monitoring data. --- internal/runner/runner.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/runner/runner.go b/internal/runner/runner.go index 1703eb3..b7a3d53 100644 --- a/internal/runner/runner.go +++ b/internal/runner/runner.go @@ -65,10 +65,8 @@ func FromContext(ctx context.Context) (Runner, bool) { // monitorExecutionsRunnerID passes the id of the runner executing the execution into the monitoring Point p. func monitorExecutionsRunnerID(env dto.EnvironmentID, runnerID string) storage.WriteCallback[*dto.ExecutionRequest] { - return func(p *write.Point, e *dto.ExecutionRequest, eventType storage.EventType) { - if eventType == storage.Creation && e != nil { - p.AddTag(monitoring.InfluxKeyRunnerID, runnerID) - p.AddTag(monitoring.InfluxKeyEnvironmentID, env.ToString()) - } + return func(p *write.Point, _ *dto.ExecutionRequest, _ storage.EventType) { + p.AddTag(monitoring.InfluxKeyEnvironmentID, env.ToString()) + p.AddTag(monitoring.InfluxKeyRunnerID, runnerID) } }