feat(signoz): report Signoz server version in telemetry#517
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds functionality to fetch and report the Signoz server version from its /api/v1/version endpoint, including unit tests for various response scenarios. The review feedback suggests skipping the version fetch if the initial health check fails to avoid unnecessary network latency, and properly draining the HTTP response body to ensure connection reuse and prevent resource leaks.
Contributor
|
📦 Image Tags Updated |
mayankpande88
approved these changes
Jul 14, 2026
The telemetry poster already reports the logs provider name, URL and connection status, but not the datasource's version. Fetch Signoz's server version from the unauthenticated GET /api/v1/version and include it in log_provider_config so the backend/UI can surface it and gate version-specific behaviour. Best-effort: probed each telemetry tick alongside the health probe; any error (unreachable, non-200, bad body) simply omits the version and leaves log_provider_config unchanged, so telemetry never fails on it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
88acba7 to
7000f4a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the Signoz server version to the telemetry payload the agent posts to
/v1/k8s/telemetry.Today the telemetry poster reports the logs provider (
signoz), its URL, and connection status, butlog_provider_configfor Signoz is an empty{}. This wires the version into that map:How
fetchSignozVersion— GETs the unauthenticated/api/v1/versionand parses{"version": "..."}.probeLogsProvider's Signoz branch now populateslog_provider_config["version"]when available.log_provider_configunchanged — telemetry never fails on it.Testing
TestFetchSignozVersion(httptest): ok / empty-version / non-200 / bad-json / unreachable.log_provider_config: {"version": "v0.51.0"}.Notes
cmd/agent.🤖 Generated with Claude Code