Skip to content

feat: metrics architecture refactoring for per-cluster telemetry#79

Merged
fupelaqu merged 2 commits intomainfrom
feature/licensingInfrastructure
Apr 28, 2026
Merged

feat: metrics architecture refactoring for per-cluster telemetry#79
fupelaqu merged 2 commits intomainfrom
feature/licensingInfrastructure

Conversation

@fupelaqu
Copy link
Copy Markdown
Contributor

No description provided.

fupelaqu and others added 2 commits April 9, 2026 16:58
- Move MetricsApi, OperationMetrics, AggregatedMetrics to licensing module
  (app.softnetwork.elastic.licensing.metrics) with core re-exports via
  package object for backward compatibility
- Add MetricsApi.Noop, OperationMetrics.empty, AggregatedMetrics.empty
- Add ElasticClientApi.metrics: MetricsApi (default Noop)
- MetricsElasticClient overrides metrics to expose itself
- Create LicenseRefreshStrategyFactory (extracted from LicenseManagerFactory)
  with full strategy lifecycle: SPI discovery, init, cache, CAS replacement
- Simplify LicenseManagerFactory to delegate to LicenseRefreshStrategyFactory
- LicenseRefreshStrategy: add def metrics: MetricsApi
- LicenseManagerSpi: add metrics param to buildStrategy/create/createStrategy
- ExtensionSpi.initialize takes LicenseRefreshStrategy instead of LicenseManager
  (provides licenseManager + telemetryCollector + metrics)
- ExtensionApi: resolves LicenseRefreshStrategyFactory.create(config, metrics),
  sets cluster info (clusterName + version) during lazy init
- GatewayApi: remove redundant licenseRefreshStrategy (now in ExtensionApi),
  increment telemetryCollector.incrementQueries() on DQL success
- TelemetryCollector: remove joinsTotal (dead code), add setClusterInfo,
  collect(metrics) includes AggregatedMetrics from MetricsApi

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fupelaqu fupelaqu marked this pull request as ready for review April 28, 2026 12:33
@fupelaqu fupelaqu merged commit b6d19ca into main Apr 28, 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