@@ -25,32 +25,32 @@ var defaultTrendStats = []string{"p(99)"}
2525
2626type Config struct {
2727 // ServerURL contains the absolute ServerURL for the Write endpoint where to flush the time series.
28- ServerURL null.String `json:"url" envconfig:"K6_PROMETHEUS_RW_SERVER_URL" `
28+ ServerURL null.String `json:"url"`
2929
3030 // Headers contains additional headers that should be included in the HTTP requests.
31- Headers map [string ]string `json:"headers" envconfig:"K6_PROMETHEUS_RW_HEADERS" `
31+ Headers map [string ]string `json:"headers"`
3232
3333 // InsecureSkipTLSVerify skips TLS client side checks.
34- InsecureSkipTLSVerify null.Bool `json:"insecureSkipTLSVerify" envconfig:"K6_PROMETHEUS_RW_INSECURE_SKIP_TLS_VERIFY" `
34+ InsecureSkipTLSVerify null.Bool `json:"insecureSkipTLSVerify"`
3535
3636 // Username is the User for Basic Auth.
37- Username null.String `json:"username" envconfig:"K6_PROMETHEUS_RW_USERNAME" `
37+ Username null.String `json:"username"`
3838
3939 // Password is the Password for the Basic Auth.
40- Password null.String `json:"password" envconfig:"K6_PROMETHEUS_RW_PASSWORD" `
40+ Password null.String `json:"password"`
4141
4242 // PushInterval defines the time between flushes. The Output will wait the set time
4343 // before push a new set of time series to the endpoint.
44- PushInterval types.NullDuration `json:"pushInterval" envconfig:"K6_PROMETHEUS_RW_PUSH_INTERVAL" `
44+ PushInterval types.NullDuration `json:"pushInterval"`
4545
4646 // TrendAsNativeHistogram defines if the mapping for metrics defined as Trend type
4747 // should map to a Prometheus' Native Histogram.
48- TrendAsNativeHistogram null.Bool `json:"trendAsNativeHistogram" envconfig:"K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM" `
48+ TrendAsNativeHistogram null.Bool `json:"trendAsNativeHistogram"`
4949
5050 // TrendStats defines the stats to flush for Trend metrics.
5151 //
5252 // TODO: should we support K6_SUMMARY_TREND_STATS?
53- TrendStats []string `json:"trendStats" envconfig:"K6_PROMETHEUS_RW_TREND_STATS" `
53+ TrendStats []string `json:"trendStats"`
5454}
5555
5656// NewConfig creates an Output's configuration.
@@ -193,7 +193,6 @@ func parseEnvs(env map[string]string) (Config, error) {
193193 return result
194194 }
195195
196- // envconfig is not processing some undefined vars (at least duration) so apply them manually
197196 if pushInterval , pushIntervalDefined := env ["K6_PROMETHEUS_RW_PUSH_INTERVAL" ]; pushIntervalDefined {
198197 if err := c .PushInterval .UnmarshalText ([]byte (pushInterval )); err != nil {
199198 return c , err
0 commit comments