File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55toolchain go1.25.3
66
77require (
8- github.com/d0ugal/promexporter v1.9 .0
8+ github.com/d0ugal/promexporter v1.10 .0
99 github.com/gosnmp/gosnmp v1.42.1
1010 github.com/prometheus/client_golang v1.23.2
1111 github.com/stretchr/testify v1.11.1
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF
1212github.com/cespare/xxhash/v2 v2.3.0 /go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs =
1313github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M =
1414github.com/cloudwego/base64x v0.1.6 /go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU =
15- github.com/d0ugal/promexporter v1.9 .0 h1:QJMdv4yvxiFtWB6poGx2OCXfIscerXvtv4YiW3K18CY =
16- github.com/d0ugal/promexporter v1.9 .0 /go.mod h1:432NOomztqyLDSFegVGKZshT521EI2L0POj0lrwYjig =
15+ github.com/d0ugal/promexporter v1.10 .0 h1:WFZkEH3vNa7QHM/vUAvXSOIPBi/mBdUH8fwzkA8a83c =
16+ github.com/d0ugal/promexporter v1.10 .0 /go.mod h1:rs9hxA+4myUhhygHnu70IerD8p0Ym6UHPdAnk8n4+00 =
1717github.com/davecgh/go-spew v1.1.0 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
1818github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c =
1919github.com/davecgh/go-spew v1.1.1 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
Original file line number Diff line number Diff line change @@ -106,22 +106,14 @@ func loadFromEnv() (*Config, error) {
106106 baseConfig .Metrics .Collection .DefaultInterval = promexporter_config.Duration {Duration : time .Second * 30 }
107107 }
108108
109- // Tracing configuration
110- if enabledStr := os .Getenv ("TRACING_ENABLED" ); enabledStr != "" {
111- enabled := enabledStr == "true"
112- baseConfig .Tracing .Enabled = & enabled
113- }
114-
115- if serviceName := os .Getenv ("TRACING_SERVICE_NAME" ); serviceName != "" {
116- baseConfig .Tracing .ServiceName = serviceName
117- }
109+ config .BaseConfig = * baseConfig
118110
119- if endpoint := os .Getenv ("TRACING_ENDPOINT" ); endpoint != "" {
120- baseConfig .Tracing .Endpoint = endpoint
111+ // Apply generic environment variables (TRACING_ENABLED, PROFILING_ENABLED, etc.)
112+ // These are handled by promexporter and are shared across all exporters
113+ if err := promexporter_config .ApplyGenericEnvVars (& config .BaseConfig ); err != nil {
114+ return nil , fmt .Errorf ("failed to apply generic environment variables: %w" , err )
121115 }
122116
123- config .BaseConfig = * baseConfig
124-
125117 // Printer configuration
126118 if host := os .Getenv ("BROTHER_EXPORTER_PRINTER_HOST" ); host != "" {
127119 config .Printer .Host = host
You can’t perform that action at this time.
0 commit comments