fix(telemetry): service.version reports the release, not the crate version #883

Merged
sharang merged 1 commits from fix/telemetry-service-version into main 2026-11-05 17:32:30 +00:00
Owner

Problem

Telemetry set service.version from compliance-core's CARGO_PKG_VERSION. The crate version is not bumped per release, so SigNoz shows 0.4.6 for the v0.4.10 agent (pruefwerk-agent-prod) and dashboard. The agent's /api/v1/platform/version already reports the release: it reads the tag CI passes as PRUEFWERK_VERSION.

Change

  • BUILD_VERSION, BUILD_COMMIT and the empty-build-arg fallback move from compliance-agent/src/api/handlers/platform.rs to a new compliance_core::build_info, with their test. The handler re-exports them, so the VEX, evidence and change-detection code keep their imports.
  • telemetry::build_resource uses BUILD_VERSION for service.version.
  • deploy-dashboard reads the latest release tag the same way deploy-agent does and passes it as --build-arg PRUEFWERK_VERSION. Dockerfile.dashboard declares the arg, empty by default. Without it, the dashboard would still report the crate version.

The MCP server has no OTLP telemetry and is unchanged.

Check after deploy

In SigNoz, service.version on pruefwerk-agent-stage and the dashboard reads the latest tag (0.4.10), the same as /api/v1/platform/version.

🤖 Generated with Claude Code

## Problem Telemetry set `service.version` from compliance-core's `CARGO_PKG_VERSION`. The crate version is not bumped per release, so SigNoz shows `0.4.6` for the v0.4.10 agent (`pruefwerk-agent-prod`) and dashboard. The agent's `/api/v1/platform/version` already reports the release: it reads the tag CI passes as `PRUEFWERK_VERSION`. ## Change - `BUILD_VERSION`, `BUILD_COMMIT` and the empty-build-arg fallback move from `compliance-agent/src/api/handlers/platform.rs` to a new `compliance_core::build_info`, with their test. The handler re-exports them, so the VEX, evidence and change-detection code keep their imports. - `telemetry::build_resource` uses `BUILD_VERSION` for `service.version`. - `deploy-dashboard` reads the latest release tag the same way `deploy-agent` does and passes it as `--build-arg PRUEFWERK_VERSION`. `Dockerfile.dashboard` declares the arg, empty by default. Without it, the dashboard would still report the crate version. The MCP server has no OTLP telemetry and is unchanged. ## Check after deploy In SigNoz, `service.version` on `pruefwerk-agent-stage` and the dashboard reads the latest tag (`0.4.10`), the same as `/api/v1/platform/version`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sharang added 1 commit 2026-11-05 16:05:26 +00:00
fix(telemetry): service.version reports the release, not the crate version
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m7s
CI / Check (pull_request) Successful in 16m53s
6a4a498261
Telemetry set service.version from compliance-core's CARGO_PKG_VERSION,
which is not bumped per release, so SigNoz showed 0.4.6 for the v0.4.10
agent and dashboard. The agent already reads the release tag CI passes as
PRUEFWERK_VERSION for its /version handshake.

- BUILD_VERSION, BUILD_COMMIT and their fallback move from the agent's
  platform handler to compliance_core::build_info. The handler re-exports
  them, so the VEX, evidence and change-detection imports stay.
- build_resource uses BUILD_VERSION.
- The dashboard image build gets PRUEFWERK_VERSION from the latest
  release tag, as the agent's does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang merged commit 2157ae2d42 into main 2026-11-05 17:32:30 +00:00
Sign in to join this conversation.