xk6-output-prometheus-remote

k6 extension to output real-time test metrics using Prometheus Remote Write.

AGPL-3.0 License

Stars
155
Committers
20

Bot releases are hidden (Show)

xk6-output-prometheus-remote - v0.4.0 Latest Release

Published by olegbespalov 4 months ago

What's Changed

Full Changelog: https://github.com/grafana/xk6-output-prometheus-remote/compare/v0.3.1...v0.4.0

xk6-output-prometheus-remote - v0.3.1

Published by codebien about 1 year ago

xk6-output-prometheus-remote - v0.3.0

Published by codebien about 1 year ago

What's Changed

Full Changelog: https://github.com/grafana/xk6-output-prometheus-remote/compare/v0.2.3...v0.3.0

xk6-output-prometheus-remote - v0.2.3

Published by codebien about 1 year ago

What's Changed

xk6-output-prometheus-remote - v0.2.2

Published by codebien about 1 year ago

xk6-output-prometheus-remote - v0.2.1

Published by codebien over 1 year ago

What's Changed

Full Changelog: https://github.com/grafana/xk6-output-prometheus-remote/compare/v0.2.0...v0.2.1

xk6-output-prometheus-remote - v0.2.0

Published by javaducky over 1 year ago

What's Changed

Full Changelog: https://github.com/grafana/xk6-output-prometheus-remote/compare/v0.1.0...v0.2.0

xk6-output-prometheus-remote - v0.1.0

Published by codebien almost 2 years ago

What's Changed

Full Changelog: https://github.com/grafana/xk6-output-prometheus-remote/compare/v0.0.9...v0.1.0

xk6-output-prometheus-remote - v0.0.9

Published by codebien almost 2 years ago

What's Changed

Stale marker option in https://github.com/grafana/xk6-output-prometheus-remote/pull/86

[Breaking change] The stale marker process now has an option staleMarkers and it is set to false by default. In the case of Prometheus, the time series added will be seen as active for the next 5 minutes after the last sample, when they will be automatically marked as stale. If the option is true, the time series will be marked as stale as soon as the test is completed.

K6_PROMETHEUS_RW_STALE_MARKERS is the environment variable to set the option.

Do not skip the TLS validation in https://github.com/grafana/xk6-output-prometheus-remote/pull/87

[Bugfix] By default, the TLS client validation is not skipped anymore.

Full Changelog: https://github.com/grafana/xk6-output-prometheus-remote/compare/v0.0.8...v0.0.9

xk6-output-prometheus-remote - v0.0.8

Published by codebien almost 2 years ago

What's Changed

Renamed to xk6-prometheus-rw https://github.com/grafana/xk6-output-prometheus-remote/pull/79

The Output's registered name has been changed to prometheus-rw, it is consistent with the name that will be used for the experimental version builtin in k6.

./k6 run -o xk6-prometheus-rw script.js

Environment variables prefix

The environment variable prefix has been changed to K6_PROMETHEUS_RW_ to be consistent with the name of the Output.

Remote Write endpoint URL

The environment variable for setting the Remote Write URL has been renamed to K6_PROMETHEUS_RW_SERVER_URL for better clarity.

K6_PROMETHEUS_RW_SERVER_URL=http://localhost:9090/api/v1/write ./k6 run -o output-prometheus-remote script.js

Time series stale marker https://github.com/grafana/xk6-output-prometheus-remote/pull/73

The Output marks all the seen time series as stale before exiting, the time series will not be visible anymore as active for a longer time unexpectedly.

Full Changelog: https://github.com/grafana/xk6-output-prometheus-remote/compare/v0.0.7...v0.0.8

xk6-output-prometheus-remote - v0.0.7

Published by codebien almost 2 years ago

What's Changed

Experimental Native Histogram - https://github.com/grafana/xk6-output-prometheus-remote/pull/57

Prometheus from v2.40.0 adds as an experimental feature a new histogram metric type called Native Histogram supporting dynamic buckets. It can be enabled by the feature flag --enable-feature=native-histograms.

Setting the K6_PROMETHEUS_TREND_AS_NATIVE_HISTOGRAM=true environment variable enables the support for flushing k6 Trend metrics as Native Histograms.

The Grafana dashboard in grafana folder has been updated for supporting the Native Histogram time series. Thanks @jwcastillo.

Trend stats changes

The Trend classic mapping with Counters / Gauges has been updated. The specific stats to generate from each Trend metric are now configurable via the K6_PROMETHEUS_TREND_STATS environment variable. It follows the same syntax already used by the k6's Summary Trend Stats option. The default set includes only the 99th percentile.

Naming convention

When possible the mapping applies the best practices as suggested by Prometheus:

  • Counter-type metrics are mapped including the _total suffix in the name.
  • Trend-type metrics when the value type is defined then the mapping includes the specific base unit for Time (seconds) or Data (bytes) values. e.g. k6_http_req_duration_seconds (native histogram) / k6_http_req_duration_seconds_p99 (stats).
  • Rate-type metrics are mapped with the _rate suffix for better clarity.

Removed setting options directly from the CLI

Setting the Output's options directly from the CLI defining the text string is not available anymore. We may re-introduce this functionality in the future based on a batter and shared protocol between all the k6's Outputs.

New Contributors

Full Changelog: https://github.com/grafana/xk6-output-prometheus-remote/compare/v0.0.6...v0.0.7

xk6-output-prometheus-remote - v0.0.6

Published by codebien almost 2 years ago

xk6-output-prometheus-remote - v0.0.5

Published by codebien almost 2 years ago

What's Changed

Full Changelog: https://github.com/grafana/xk6-output-prometheus-remote/compare/v0.0.4...v0.0.5

Configuration

In #48 we did several changes to the configuration's options.

  • K6_PROMETHEUS_FLUSH_PERIOD has been renamed to K6_PROMETHEUS_PUSH_INTERVAL to align with the same name used by timescaledb, influxdb and statsd outputs.
  • K6_PROMETHEUS_USER has been renamed to K6_PROMETHEUS_USERNAME to align with the same name used by influxdb output.
  • CACert option has been removed, use the common SSL_CERT_FILE and SSL_CERT_DIR environment variables if overriding the system's default locations is needed.
  • KeepTags, KeepNameTag, KeepUrlTag options have been removed in favour of the k6's way of filtering tags by overriding the default systemTags. An advanced version will be implemented in the future and plans are tracked at https://github.com/grafana/xk6-output-prometheus-remote/issues/5, feel free to let know your requirements there.
  • Mapping option has been removed, at the moment, the Output doesn't support different mappings.

The timeout's default value for HTTP requests to the Prometheus remote write endpoint has been reduced from 1 minute to 5 seconds. If a different value is needed share more ideas at https://github.com/grafana/xk6-output-prometheus-remote/issues/52.

Usage

v0.0.5 requires k6 v0.41.0 for being sure to use the correct version it can be explicitly set in the xk6 build command:

xk6 build v0.41.0 --with github.com/grafana/[email protected]
xk6-output-prometheus-remote - v0.0.4

Published by codebien about 2 years ago

xk6-output-prometheus-remote - v0.0.3

Published by codebien about 2 years ago

xk6-output-prometheus-remote - v0.0.2

Published by codebien over 2 years ago

What's Changed

Full Changelog: https://github.com/grafana/xk6-output-prometheus-remote/compare/v0.0.1...v0.0.2

xk6-output-prometheus-remote - v0.0.1

Published by javaducky over 2 years ago

Simply starting to version going forward.