mirror of
https://github.com/hanzoai/otel-collector.git
synced 2026-10-30 18:26:25 +00:00
- Fix 'Hanzo O11y' (space) → 'HanzoO11y' in Go struct/func names - Package o11yclickhousemetrics → o11ydatastoremetrics (matches dir) - Package o11yclickhousemeter → o11ydatastoremeter (matches dir) - Import paths aligned with actual directory structure - Component type names kept as signozclickhousemetrics for config compat
23 lines
677 B
Go
23 lines
677 B
Go
package constants
|
|
|
|
import "os"
|
|
|
|
// Version is the current version of the collector.
|
|
// This is set at build time.
|
|
var Version = "dev"
|
|
var Desc = "HanzoO11y OpenTelemetry Collector"
|
|
|
|
// AllowLbExporterConfig enables lb exporter capability in the collector instance
|
|
var SupportLbExporterConfig = GetOrDefaultEnv("SUPPORT_LB_EXPORTER_CONFIG", "1")
|
|
|
|
// EnableLogsMigrationsV2 enables logs migrations v2 (JSON migrations) if the environment variable is set to "1"
|
|
var EnableLogsMigrationsV2 = GetOrDefaultEnv("ENABLE_LOGS_MIGRATIONS_V2", "0") == "1"
|
|
|
|
func GetOrDefaultEnv(key string, fallback string) string {
|
|
v := os.Getenv(key)
|
|
if len(v) == 0 {
|
|
return fallback
|
|
}
|
|
return v
|
|
}
|