Skip to content

fix: address adversarial review findings on metrics/telemetry archite…#80

Merged
fupelaqu merged 1 commit intomainfrom
feature/licensingInfrastructure
Apr 29, 2026
Merged

fix: address adversarial review findings on metrics/telemetry archite…#80
fupelaqu merged 1 commit intomainfrom
feature/licensingInfrastructure

Conversation

@fupelaqu
Copy link
Copy Markdown
Contributor

…cture (#17)

  • Add ClusterApi.clusterUuid across all ES versions (6/7/8/9) so telemetry uses the real ES cluster UUID instead of the cluster name as identifier
  • Make TelemetryCollector thread-safe with synchronized lock for gauge fields and add collectAndReset for atomic snapshot+reset
  • Make MetricsCollector.resetMetrics atomic via AtomicReference map swap, add collectAndResetAggregatedMetrics to MetricsApi trait
  • Replace synchronized+set() with pure CAS and @tailrec in LicenseRefreshStrategyFactory, remove try/catch fallback (let SPI failures propagate)
  • Add ClusterApiSpec integration tests for clusterName and clusterUuid
  • Add TelemetryCollectorSpec test for collectAndReset

…cture (#17)

- Add ClusterApi.clusterUuid across all ES versions (6/7/8/9) so telemetry
  uses the real ES cluster UUID instead of the cluster name as identifier
- Make TelemetryCollector thread-safe with synchronized lock for gauge fields
  and add collectAndReset for atomic snapshot+reset
- Make MetricsCollector.resetMetrics atomic via AtomicReference map swap,
  add collectAndResetAggregatedMetrics to MetricsApi trait
- Replace synchronized+set() with pure CAS and @tailrec in
  LicenseRefreshStrategyFactory, remove try/catch fallback (let SPI failures
  propagate)
- Add ClusterApiSpec integration tests for clusterName and clusterUuid
- Add TelemetryCollectorSpec test for collectAndReset

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fupelaqu fupelaqu marked this pull request as ready for review April 29, 2026 14:32
@fupelaqu fupelaqu merged commit 2cfd173 into main Apr 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant