Skip to content

Conversation

@ChrisJBurns
Copy link
Collaborator

Summary

  • Moves serviceVersion resolution from config creation time to runtime in NewProvider(), so it always reflects the running binary version
  • Stops persisting the version in DefaultConfig(), MaybeMakeConfig(), createTelemetryConfig(), and operator's NormalizeTelemetryConfig()
  • Existing configs with an explicit serviceVersion (e.g., from the K8s operator CRD) are still honored
  • Previously, restarting a workload after upgrading ToolHive would report the old version in traces/metrics; thv export would also capture the stale version

Closes #2296

Test plan

  • go test ./pkg/telemetry/... passes
  • go test ./cmd/thv-operator/pkg/spectoconfig/... passes
  • go test ./cmd/thv-operator/pkg/vmcpconfig/... passes
  • Lint passes
  • Manual: start server with otel, check version in traces, upgrade binary, restart, verify version updates

🤖 Generated with Claude Code

@github-actions github-actions bot added the size/XS Extra small PR: < 100 lines changed label Feb 11, 2026
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.77%. Comparing base (c8f2254) to head (db12600).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
pkg/telemetry/config.go 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3789      +/-   ##
==========================================
- Coverage   66.78%   66.77%   -0.01%     
==========================================
  Files         437      437              
  Lines       43002    43005       +3     
==========================================
  Hits        28718    28718              
- Misses      12078    12081       +3     
  Partials     2206     2206              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChrisJBurns ChrisJBurns force-pushed the fix/otel-service-version-runtime branch from 1fb38fc to 5f20862 Compare February 11, 2026 21:16
@github-actions github-actions bot added size/XS Extra small PR: < 100 lines changed and removed size/XS Extra small PR: < 100 lines changed labels Feb 11, 2026
The serviceVersion field was set at config creation time and persisted in
the runconfig and export output. This caused stale versions to be
reported after upgrading ToolHive and restarting workloads.

Now serviceVersion is resolved in NewProvider() at runtime using the
current binary version. The field is no longer populated in
DefaultConfig(), MaybeMakeConfig(), createTelemetryConfig(), or
NormalizeTelemetryConfig(). Existing configs with an explicit
serviceVersion (e.g., from the K8s operator CRD) are still honored.

Closes #2296

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@ChrisJBurns ChrisJBurns force-pushed the fix/otel-service-version-runtime branch from 5f20862 to db12600 Compare February 11, 2026 21:23
@github-actions github-actions bot added size/XS Extra small PR: < 100 lines changed and removed size/XS Extra small PR: < 100 lines changed labels Feb 11, 2026
@JAORMX JAORMX merged commit 8537bc7 into main Feb 12, 2026
36 checks passed
@JAORMX JAORMX deleted the fix/otel-service-version-runtime branch February 12, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OTel: serviceVersion is persisted in runconfig and thv export output

3 participants