From 2d8d6583b96600d28bc78b1a6d0f52e0c55c3b5c Mon Sep 17 00:00:00 2001 From: omris94 <46892443+omris94@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:03:13 +0300 Subject: [PATCH] Fix error reporting - use the enum graphql type (#232) --- src/kafka-watcher/cmd/main.go | 3 ++- src/mapper/cmd/main.go | 2 +- src/sniffer/cmd/main.go | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/kafka-watcher/cmd/main.go b/src/kafka-watcher/cmd/main.go index e47f4b49..e6485bb8 100644 --- a/src/kafka-watcher/cmd/main.go +++ b/src/kafka-watcher/cmd/main.go @@ -11,6 +11,7 @@ import ( "github.com/otterize/intents-operator/src/shared/errors" "github.com/otterize/intents-operator/src/shared/telemetries/componentinfo" "github.com/otterize/intents-operator/src/shared/telemetries/errorreporter" + "github.com/otterize/intents-operator/src/shared/telemetries/telemetriesgql" "github.com/otterize/intents-operator/src/shared/telemetries/telemetrysender" "github.com/otterize/network-mapper/src/kafka-watcher/pkg/config" logwatcher2 "github.com/otterize/network-mapper/src/kafka-watcher/pkg/logwatcher" @@ -39,7 +40,7 @@ func main() { errgrp, errGroupCtx := errgroup.WithContext(signals.SetupSignalHandler()) clusterUID := clusterutils.GetOrCreateClusterUID(errGroupCtx) componentinfo.SetGlobalContextId(telemetrysender.Anonymize(clusterUID)) - errorreporter.Init("kafka-watcher", version.Version()) + errorreporter.Init(telemetriesgql.TelemetryComponentTypeNetworkMapper, version.Version()) defer errorreporter.AutoNotify() shared.RegisterPanicHandlers() diff --git a/src/mapper/cmd/main.go b/src/mapper/cmd/main.go index cca1d4cd..2e448451 100644 --- a/src/mapper/cmd/main.go +++ b/src/mapper/cmd/main.go @@ -98,7 +98,7 @@ func main() { componentinfo.SetGlobalContextId(telemetrysender.Anonymize(clusterUID)) - errorreporter.Init("network-mapper", version.Version()) + errorreporter.Init(telemetriesgql.TelemetryComponentTypeNetworkMapper, version.Version()) defer errorreporter.AutoNotify() shared.RegisterPanicHandlers() diff --git a/src/sniffer/cmd/main.go b/src/sniffer/cmd/main.go index b6bbda01..ff8e1929 100644 --- a/src/sniffer/cmd/main.go +++ b/src/sniffer/cmd/main.go @@ -10,6 +10,7 @@ import ( "github.com/otterize/intents-operator/src/shared/errors" "github.com/otterize/intents-operator/src/shared/telemetries/componentinfo" "github.com/otterize/intents-operator/src/shared/telemetries/errorreporter" + "github.com/otterize/intents-operator/src/shared/telemetries/telemetriesgql" "github.com/otterize/intents-operator/src/shared/telemetries/telemetrysender" "github.com/otterize/network-mapper/src/shared/version" "golang.org/x/sync/errgroup" @@ -37,7 +38,7 @@ func main() { errgrp, errGroupCtx := errgroup.WithContext(signals.SetupSignalHandler()) clusterUID := clusterutils.GetOrCreateClusterUID(errGroupCtx) componentinfo.SetGlobalContextId(telemetrysender.Anonymize(clusterUID)) - errorreporter.Init("sniffer", version.Version()) + errorreporter.Init(telemetriesgql.TelemetryComponentTypeNetworkMapper, version.Version()) defer errorreporter.AutoNotify() shared.RegisterPanicHandlers()