Split telemetry collection between cozystack-operator and cozystack-controller: cozystack-operator now collects cluster-level metrics: - cozy_cluster_info (cozystack_version, kubernetes_version) - cozy_nodes_count (os, kernel) - cozy_cluster_capacity (cpu, memory, nvidia.com/* resources) - cozy_loadbalancers_count - cozy_pvs_count (driver, size) - cozy_package_info (name, variant) cozystack-controller now collects application-level metrics: - cozy_application_count (kind) - counts HelmReleases per ApplicationDefinition Other changes: - Add pkg/version for build-time version injection via ldflags - Remove --cozystack-version flag (version now embedded at build time) - Remove bundle/oidc configuration from telemetry (replaced by package_info) - Remove cozy_workloads_count metric (replaced by cozy_application_count) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
24 lines
498 B
Go
24 lines
498 B
Go
package telemetry
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Config holds telemetry configuration
|
|
type Config struct {
|
|
// Disable telemetry collection if set to true
|
|
Disabled bool
|
|
// Endpoint to send telemetry data to
|
|
Endpoint string
|
|
// Interval between telemetry data collection
|
|
Interval time.Duration
|
|
}
|
|
|
|
// DefaultConfig returns default telemetry configuration
|
|
func DefaultConfig() *Config {
|
|
return &Config{
|
|
Disabled: false,
|
|
Endpoint: "https://telemetry.cozystack.io",
|
|
Interval: 15 * time.Minute,
|
|
}
|
|
}
|