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

Commit

Permalink
Fix broken promscale_packager telemetry field for docker envs.
Browse files Browse the repository at this point in the history
Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>

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.
  • Loading branch information
Harkishen-Singh committed Jan 25, 2022
1 parent b57a759 commit c6d6feb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions build/Dockerfile
Expand Up @@ -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"]
8 changes: 3 additions & 5 deletions pkg/telemetry/metadata.go
Expand Up @@ -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 {
Expand Down

0 comments on commit c6d6feb

Please sign in to comment.