Skip to content

Commit

Permalink
Fix error reporting - use the enum graphql type (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
omris94 authored Aug 6, 2024
1 parent 7969e19 commit 2d8d658
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/kafka-watcher/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion src/mapper/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
3 changes: 2 additions & 1 deletion src/sniffer/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 2d8d658

Please sign in to comment.