feat(telemetry): switch to SendForModule, drop hand-bumped Version

Replaces the hand-bumped client.Version="0.7.11" with
telemetry.SendForModule which reads the actual module version from
runtime/debug.BuildInfo.Deps at the consumer's build time. This
means future releases (v0.7.12, v0.8.0, …) will be reported by the
running bot WITHOUT requiring a manual edit of client/version.go on
every tag — consumers just `go get -u` and rebuild.

client.Version is preserved as a fallback for replace directives /
detached `go run`, and remains overridable via -ldflags.

Bumps oss-telemetry to v0.2.1.
This commit is contained in:
2026-05-22 23:35:22 +01:00
parent 8d85e61da5
commit 404411b20c
4 changed files with 11 additions and 12 deletions
+1 -1
View File
@@ -28,6 +28,6 @@ var telemetryOnce sync.Once
// See README §Telemetry for the full disclosure.
func fireTelemetryOnce() {
telemetryOnce.Do(func() {
telemetry.Send("go-telegram", Version)
telemetry.SendForModule("go-telegram", "github.com/lukaszraczylo/go-telegram", Version)
})
}