diff --git a/vendor/github.com/grafana/xk6-output-prometheus-remote/pkg/remotewrite/config.go b/vendor/github.com/grafana/xk6-output-prometheus-remote/pkg/remotewrite/config.go index e6c332b313d..03837f98b85 100644 --- a/vendor/github.com/grafana/xk6-output-prometheus-remote/pkg/remotewrite/config.go +++ b/vendor/github.com/grafana/xk6-output-prometheus-remote/pkg/remotewrite/config.go @@ -145,6 +145,10 @@ func (conf Config) Apply(applied Config) Config { conf.Password = applied.Password } + if applied.BearerToken.Valid { + conf.BearerToken = applied.BearerToken + } + if applied.PushInterval.Valid { conf.PushInterval = applied.PushInterval } @@ -276,6 +280,10 @@ func parseEnvs(env map[string]string) (Config, error) { c.ClientCertificateKey = null.StringFrom(clientCertificateKey) } + if token, tokenDefined := env["K6_PROMETHEUS_RW_BEARER_TOKEN"]; tokenDefined { + c.BearerToken = null.StringFrom(token) + } + envHeaders := envMap(env, "K6_PROMETHEUS_RW_HEADERS_") for k, v := range envHeaders { c.Headers[k] = v diff --git a/vendor/modules.txt b/vendor/modules.txt index d7f408b8e59..baffdece694 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -165,7 +165,7 @@ github.com/grafana/xk6-browser/storage ## explicit; go 1.19 github.com/grafana/xk6-grpc/grpc github.com/grafana/xk6-grpc/lib/netext/grpcext -# github.com/grafana/xk6-output-prometheus-remote v0.3.0 +# github.com/grafana/xk6-output-prometheus-remote v0.3.1 ## explicit; go 1.18 github.com/grafana/xk6-output-prometheus-remote/pkg/remote github.com/grafana/xk6-output-prometheus-remote/pkg/remotewrite