File tree Expand file tree Collapse file tree 3 files changed +8
-16
lines changed
Expand file tree Collapse file tree 3 files changed +8
-16
lines changed 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/prometheus/client_golang v1.23.2
1010 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0
1111 go.opentelemetry.io/otel v1.38.0
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 @@ -114,22 +114,14 @@ func loadFromEnv() (*Config, error) {
114114 baseConfig .Metrics .Collection .DefaultInterval = promexporter_config.Duration {Duration : time .Second * 30 }
115115 }
116116
117- // Tracing configuration
118- if enabledStr := os .Getenv ("TRACING_ENABLED" ); enabledStr != "" {
119- enabled := enabledStr == "true"
120- baseConfig .Tracing .Enabled = & enabled
121- }
122-
123- if serviceName := os .Getenv ("TRACING_SERVICE_NAME" ); serviceName != "" {
124- baseConfig .Tracing .ServiceName = serviceName
125- }
117+ config .BaseConfig = * baseConfig
126118
127- if endpoint := os .Getenv ("TRACING_ENDPOINT" ); endpoint != "" {
128- baseConfig .Tracing .Endpoint = endpoint
119+ // Apply generic environment variables (TRACING_ENABLED, PROFILING_ENABLED, etc.)
120+ // These are handled by promexporter and are shared across all exporters
121+ if err := promexporter_config .ApplyGenericEnvVars (& config .BaseConfig ); err != nil {
122+ return nil , fmt .Errorf ("failed to apply generic environment variables: %w" , err )
129123 }
130124
131- config .BaseConfig = * baseConfig
132-
133125 // GitHub configuration
134126 if token := os .Getenv ("GHCR_EXPORTER_GITHUB_TOKEN" ); token != "" {
135127 config .GitHub .Token = promexporter_config .NewSensitiveString (token )
You can’t perform that action at this time.
0 commit comments