-
Notifications
You must be signed in to change notification settings - Fork 144
Closed
Description
Describe the bug
- the
--no-telemetry
flag doesn't stop telemetry - the only place the
NoTelemetry
flag is checked isdot/node.go
if cfg.Global.NoTelemetry {
return node, nil
}
this prevents telemetry.GetInstance()
from being called in dot/node.go
. however in packages that use telemetry, NoTelemetry
is not persisted and they end up calling telemetry.GetInstance()
thus creating the telemetry instance, for example dot/network/service.go
publishNetworkTelemetry
.
Possible Solution
- I would recommend adding the
NoTelemetry
option to thetelemetry
package and creating aInstance
interface that includes the functions the current*telemetry.Handler
has. IfNoTelemetry == true
, then a*NoopHandler
, which does nothing, can be created whenGetInstance()
is called. otherwise, the usual*Handler
can be used.
To Reproduce
Metadata
Metadata
Assignees
Labels
No labels