@@ -25,32 +25,32 @@ var defaultTrendStats = []string{"p(99)"}
25
25
26
26
type Config struct {
27
27
// 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"`
29
29
30
30
// 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"`
32
32
33
33
// 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"`
35
35
36
36
// Username is the User for Basic Auth.
37
- Username null.String `json:"username" envconfig:"K6_PROMETHEUS_RW_USERNAME" `
37
+ Username null.String `json:"username"`
38
38
39
39
// 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"`
41
41
42
42
// PushInterval defines the time between flushes. The Output will wait the set time
43
43
// 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"`
45
45
46
46
// TrendAsNativeHistogram defines if the mapping for metrics defined as Trend type
47
47
// 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"`
49
49
50
50
// TrendStats defines the stats to flush for Trend metrics.
51
51
//
52
52
// TODO: should we support K6_SUMMARY_TREND_STATS?
53
- TrendStats []string `json:"trendStats" envconfig:"K6_PROMETHEUS_RW_TREND_STATS" `
53
+ TrendStats []string `json:"trendStats"`
54
54
}
55
55
56
56
// NewConfig creates an Output's configuration.
@@ -193,7 +193,6 @@ func parseEnvs(env map[string]string) (Config, error) {
193
193
return result
194
194
}
195
195
196
- // envconfig is not processing some undefined vars (at least duration) so apply them manually
197
196
if pushInterval , pushIntervalDefined := env ["K6_PROMETHEUS_RW_PUSH_INTERVAL" ]; pushIntervalDefined {
198
197
if err := c .PushInterval .UnmarshalText ([]byte (pushInterval )); err != nil {
199
198
return c , err
0 commit comments