mirror of
https://github.com/lukaszraczylo/kubemirror.git
synced 2026-06-10 23:09:14 +00:00
feat: anonymous usage telemetry via oss-telemetry
Send a single fire-and-forget ping at startup to help track adoption
and version spread. No persistent identifiers are collected.
Adds main.Version var (defaulting to "dev") so the existing goreleaser
ldflags injection (-X main.Version={{.Version}}) now binds to a real
symbol.
Opt out via any of:
DO_NOT_TRACK=1
OSS_TELEMETRY_DISABLED=1
KUBEMIRROR_DISABLE_TELEMETRY=1
This commit is contained in:
@@ -27,8 +27,14 @@ import (
|
||||
"github.com/lukaszraczylo/kubemirror/pkg/controller"
|
||||
"github.com/lukaszraczylo/kubemirror/pkg/discovery"
|
||||
"github.com/lukaszraczylo/kubemirror/pkg/filter"
|
||||
telemetry "github.com/lukaszraczylo/oss-telemetry"
|
||||
)
|
||||
|
||||
// Version is the build version. Set via ldflags during build:
|
||||
//
|
||||
// -X main.Version=v1.2.3
|
||||
var Version = "dev"
|
||||
|
||||
var (
|
||||
scheme = runtime.NewScheme()
|
||||
setupLog = ctrl.Log.WithName("setup")
|
||||
@@ -57,6 +63,8 @@ func makeCacheSyncChecker(c cache.Cache, ctx context.Context, logger logr.Logger
|
||||
}
|
||||
|
||||
func main() {
|
||||
telemetry.Send("kubemirror", Version)
|
||||
|
||||
var (
|
||||
metricsAddr string
|
||||
probeAddr string
|
||||
|
||||
Reference in New Issue
Block a user