diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dbc48f9c1..7c17a2b9fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ We use the following categories for changes: ### Added - Add support to instrument Promscale's Otel GRPC server with Prometheus metrics [#1061] +### Fixed +- Fix broken `promscale_packager` telemetry field for docker envs [#1077] + ## [0.8.0] - 2022-01-18 ### Added diff --git a/build/Dockerfile b/build/Dockerfile index 1494b07185..5b76948a52 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -17,6 +17,7 @@ RUN GIT_COMMIT=$(git rev-list -1 HEAD) \ # Final image FROM busybox +ENV PROMSCALE_PKG=docker LABEL maintainer="Timescale https://www.timescale.com" COPY --from=builder /bin/promscale / ENTRYPOINT ["/promscale"] diff --git a/pkg/telemetry/metadata.go b/pkg/telemetry/metadata.go index 4fd32fd351..21bf606339 100644 --- a/pkg/telemetry/metadata.go +++ b/pkg/telemetry/metadata.go @@ -61,12 +61,10 @@ func turnOffPackageLogging() { func getPkgEnv() string { pkg := os.Getenv("PROMSCALE_PKG") - switch pkg { - case "deb", "rpm", "apk": - return pkg - default: - return "unknown" + if pkg == "" { + pkg = "unknown" } + return pkg } func toString(prop []byte) string {