Skip to content

Commit 2d8d658

Browse files
authored
Fix error reporting - use the enum graphql type (#232)
1 parent 7969e19 commit 2d8d658

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Diff for: src/kafka-watcher/cmd/main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/otterize/intents-operator/src/shared/errors"
1212
"github.com/otterize/intents-operator/src/shared/telemetries/componentinfo"
1313
"github.com/otterize/intents-operator/src/shared/telemetries/errorreporter"
14+
"github.com/otterize/intents-operator/src/shared/telemetries/telemetriesgql"
1415
"github.com/otterize/intents-operator/src/shared/telemetries/telemetrysender"
1516
"github.com/otterize/network-mapper/src/kafka-watcher/pkg/config"
1617
logwatcher2 "github.com/otterize/network-mapper/src/kafka-watcher/pkg/logwatcher"
@@ -39,7 +40,7 @@ func main() {
3940
errgrp, errGroupCtx := errgroup.WithContext(signals.SetupSignalHandler())
4041
clusterUID := clusterutils.GetOrCreateClusterUID(errGroupCtx)
4142
componentinfo.SetGlobalContextId(telemetrysender.Anonymize(clusterUID))
42-
errorreporter.Init("kafka-watcher", version.Version())
43+
errorreporter.Init(telemetriesgql.TelemetryComponentTypeNetworkMapper, version.Version())
4344
defer errorreporter.AutoNotify()
4445
shared.RegisterPanicHandlers()
4546

Diff for: src/mapper/cmd/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func main() {
9898

9999
componentinfo.SetGlobalContextId(telemetrysender.Anonymize(clusterUID))
100100

101-
errorreporter.Init("network-mapper", version.Version())
101+
errorreporter.Init(telemetriesgql.TelemetryComponentTypeNetworkMapper, version.Version())
102102
defer errorreporter.AutoNotify()
103103
shared.RegisterPanicHandlers()
104104

Diff for: src/sniffer/cmd/main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/otterize/intents-operator/src/shared/errors"
1111
"github.com/otterize/intents-operator/src/shared/telemetries/componentinfo"
1212
"github.com/otterize/intents-operator/src/shared/telemetries/errorreporter"
13+
"github.com/otterize/intents-operator/src/shared/telemetries/telemetriesgql"
1314
"github.com/otterize/intents-operator/src/shared/telemetries/telemetrysender"
1415
"github.com/otterize/network-mapper/src/shared/version"
1516
"golang.org/x/sync/errgroup"
@@ -37,7 +38,7 @@ func main() {
3738
errgrp, errGroupCtx := errgroup.WithContext(signals.SetupSignalHandler())
3839
clusterUID := clusterutils.GetOrCreateClusterUID(errGroupCtx)
3940
componentinfo.SetGlobalContextId(telemetrysender.Anonymize(clusterUID))
40-
errorreporter.Init("sniffer", version.Version())
41+
errorreporter.Init(telemetriesgql.TelemetryComponentTypeNetworkMapper, version.Version())
4142
defer errorreporter.AutoNotify()
4243
shared.RegisterPanicHandlers()
4344

0 commit comments

Comments
 (0)