Repository navigation
fix: preserve semantic version in node metric - #403
Cryptoloveer wants to merge 2 commits into
Conversation
|
Thanks for the PR! Atto node releases use a two-component version format (e.g. This change would also make the There is, however, a known issue when the node version ends in |
|
Thanks for explaining the node’s two-component versioning and the intended gauge semantics. This PR addresses the wrong version case and changes the metric behavior in a way that is not appropriate, so I’m closing it. I won’t submit a replacement for the trailing-zero limitation without first agreeing on the desired representation. |
Problem
NodeMetricProviderconverts the application version to aDoublebefore registering the metric. That works for two-part values such as2.1, but semantic versions such as7.0.2cannot be represented as aDouble;toDoubleOrNull()therefore falls back to0.0. The exportedversiontag consequently loses the actual release version.Fix
Treat
node.versionas an information-style gauge:1;versiontag;-SNAPSHOT, matching the existing behavior.Validation
Added focused tests covering:
-SNAPSHOTsuffix;The change is limited to node-version metric registration and its tests.