Compare commits

...

4 Commits

Author SHA1 Message Date
lukaszraczylo 1bff79e4f4 ci: also bump benchmark job Go to 1.25 2026-05-22 23:37:46 +01:00
lukaszraczylo b6e83f2837 ci: bump release Go to 1.25 to match go.mod directive
The repo's go.mod has required go 1.25.0 since the perf+coverage pass,
but the release workflow still pinned setup-go to 1.24 — the latest
1.24.X tool refuses to compile a 1.25 module with GOTOOLCHAIN=local,
breaking auto-release on every push.
2026-05-22 23:36:44 +01:00
lukaszraczylo 287289cd80 fix(telemetry): inject appVersion at build + auto-resolve at runtime
The released v0.45.1 binary shipped with the source default
appVersion="dev" because .goreleaser.yaml had ldflags="-s -w" only,
so every startup ping was rejected by the receiver with HTTP 400
(invalid version: regex requires leading digit).

Two-layer fix:

1. .goreleaser.yaml now passes -X main.appVersion={{.Version}} so
   goreleaser-built binaries report the actual release version.
2. Switch to telemetry.SendForModule which prefers
   debug.ReadBuildInfo Main/Deps when available, falling back to
   appVersion. This means `go install github.com/lukaszraczylo/
   graphql-monitoring-proxy@vX.Y.Z` users also get correct versions
   without relying on the ldflag.

Bumps oss-telemetry to v0.2.1 for SendForModule.
2026-05-22 23:34:09 +01:00
lukaszraczylo 21b429c98a docs: add Telemetry section linking to oss-telemetry opt-out docs
Discloses the single anonymous adoption ping sent on startup and points
users to the upstream README section for full opt-out instructions
instead of duplicating the table here.
2026-05-21 04:07:12 +01:00
6 changed files with 20 additions and 6 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ jobs:
release:
uses: lukaszraczylo/shared-actions/.github/workflows/go-release.yaml@main
with:
go-version: "1.24"
go-version: "1.25"
docker-enabled: true
secrets: inherit
@@ -39,7 +39,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
go-version: "1.25"
- name: Run benchmarks
run: go test -bench=. -benchmem ./... -run=^# | tee output.txt
+1
View File
@@ -19,6 +19,7 @@ builds:
- arm64
ldflags:
- -s -w
- -X main.appVersion={{.Version}}
archives:
- id: graphql-proxy
+13
View File
@@ -1119,3 +1119,16 @@ graphql_proxy_cache_hit{microservice="graphql_proxy",pod="hasura-w-proxy-interna
graphql_proxy_cache_hit{pod="hasura-w-proxy-internal-6b5f4b4bbb-9xwfc",microservice="graphql_proxy"} 1
graphql_proxy_cache_miss{microservice="graphql_proxy",pod="hasura-w-proxy-internal-6b5f4b4bbb-9xwfc"} 23
```
## Telemetry
On startup this binary sends a single anonymous adoption ping — project name,
version, timestamp; no identifiers, no GraphQL operations, no query/response
content. Fire-and-forget with a 2-second timeout; cannot block startup or
panic.
See **[oss-telemetry — Disabling telemetry](https://github.com/lukaszraczylo/oss-telemetry#disabling-telemetry)**
for the exact wire format, source, and full opt-out documentation.
Quick opt-out: set any of `DO_NOT_TRACK=1`, `OSS_TELEMETRY_DISABLED=1`,
or `GRAPHQL_MONITORING_PROXY_DISABLE_TELEMETRY=1`.
+1 -1
View File
@@ -18,7 +18,7 @@ require (
github.com/lukaszraczylo/ask v0.0.0-20240916204100-6e9ef53a62d9
github.com/lukaszraczylo/go-ratecounter v0.1.12
github.com/lukaszraczylo/go-simple-graphql v1.2.89
github.com/lukaszraczylo/oss-telemetry v0.0.0-20260521005811-e02d51419c52
github.com/lukaszraczylo/oss-telemetry v0.2.1
github.com/redis/go-redis/v9 v9.18.0
github.com/sony/gobreaker v1.0.0
github.com/stretchr/testify v1.11.1
+2 -2
View File
@@ -76,8 +76,8 @@ github.com/lukaszraczylo/go-ratecounter v0.1.12 h1:VO6hHYGw/Jy9JUizXf/bS0AI2QX1u
github.com/lukaszraczylo/go-ratecounter v0.1.12/go.mod h1:TqXEOCtFJStk1i0tkipprv1kiDHGon1MVUisjSTBSKM=
github.com/lukaszraczylo/go-simple-graphql v1.2.89 h1:Xbu1Ny+a0lT2Sr2SaSC8mcHmGQDwGD4TJKk4DDd+PwA=
github.com/lukaszraczylo/go-simple-graphql v1.2.89/go.mod h1:PxQYblQDZISmYYj8sNfazAWxAOh1rhAtU208y+uPV8s=
github.com/lukaszraczylo/oss-telemetry v0.0.0-20260521005811-e02d51419c52 h1:HAm1OV/1uYN3VA/HdDNFjwh8KerTLwl1SoxF+IiNf/M=
github.com/lukaszraczylo/oss-telemetry v0.0.0-20260521005811-e02d51419c52/go.mod h1:+Cn78qZo8rc3T9eZt0v3oICYRdd75wORtSidc8lNjDQ=
github.com/lukaszraczylo/oss-telemetry v0.2.1 h1:6ULyfzXplpdmIY/i01OPM1jeod9+L1RAhI0jtbVnJI0=
github.com/lukaszraczylo/oss-telemetry v0.2.1/go.mod h1:+Cn78qZo8rc3T9eZt0v3oICYRdd75wORtSidc8lNjDQ=
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
+1 -1
View File
@@ -518,7 +518,7 @@ func parseConfig() {
}
func main() {
telemetry.Send("graphql-monitoring-proxy", appVersion)
telemetry.SendForModule("graphql-monitoring-proxy", "github.com/lukaszraczylo/graphql-monitoring-proxy", appVersion)
// Parse configuration
parseConfig()