Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit 48e7487

Browse files
committed
Fix broken promscale_packager telemetry field for docker envs.
Signed-off-by: Harkishen-Singh <[email protected]> This commits fixes the `promscale_packager` telemetry field that was earlier showing `unknown` for all docker deployments. Now, it will show `promscale_packager: docker` in the `_timescaledb_catalog.metadata` table.
1 parent 38ee350 commit 48e7487

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ We use the following categories for changes:
1717
### Added
1818
- Add support to instrument Promscale's Otel GRPC server with Prometheus metrics [#1061]
1919

20+
### Fixed
21+
- Fix broken `promscale_packager` telemetry field for docker envs [#1077]
22+
2023
## [0.8.0] - 2022-01-18
2124

2225
### Added

build/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ RUN GIT_COMMIT=$(git rev-list -1 HEAD) \
1717

1818
# Final image
1919
FROM busybox
20+
ENV PROMSCALE_PKG=docker
2021
LABEL maintainer="Timescale https://www.timescale.com"
2122
COPY --from=builder /bin/promscale /
2223
ENTRYPOINT ["/promscale"]

pkg/telemetry/metadata.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,10 @@ func turnOffPackageLogging() {
6161

6262
func getPkgEnv() string {
6363
pkg := os.Getenv("PROMSCALE_PKG")
64-
switch pkg {
65-
case "deb", "rpm", "apk":
66-
return pkg
67-
default:
68-
return "unknown"
64+
if pkg == "" {
65+
pkg = "unknown"
6966
}
67+
return pkg
7068
}
7169

7270
func toString(prop []byte) string {

0 commit comments

Comments
 (0)