Skip to content

Releases: grafana/xk6-output-prometheus-remote

v0.0.9

19 Dec 10:57
Compare
Choose a tag to compare

What's Changed

Stale marker option in #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 #87

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

Full Changelog: v0.0.8...v0.0.9

v0.0.8

06 Dec 13:50
Compare
Choose a tag to compare

What's Changed

Renamed to xk6-prometheus-rw #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 #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: v0.0.7...v0.0.8

v0.0.7

01 Dec 16:43
Compare
Choose a tag to compare

What's Changed

Experimental Native Histogram - #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: v0.0.6...v0.0.7

v0.0.6

24 Nov 15:49
Compare
Choose a tag to compare

What's Changed

  • Fixed sorting labels #58
  • Fixed the expected response's status code #60
  • Fixed Username option when passed as an environment variable or argument #61

Full Changelog: v0.0.5...v0.0.6

v0.0.5

10 Nov 11:27
Compare
Choose a tag to compare

What's Changed

  • Moved to AGPLv3 license in #50
  • Config changes in #48
  • Removed the prometheus/prometheus library dependency in #49
  • Migrate to k6 v0.41 in #55

Full Changelog: 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 #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]

v0.0.4

29 Sep 08:45
Compare
Choose a tag to compare

What's Changed

  • Aggregating and flushing by time series instead of global metrics in #38
  • Upgraded k6 dependency to v0.40.0 in #42
  • Upgraded Go to 1.19 in #43 #45

Full Changelog: v0.0.3...v0.0.4

v0.0.3

01 Sep 14:40
6d82624
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.0.2...v0.0.3

v0.0.2

06 Jun 15:17
5ac1293
Compare
Choose a tag to compare

What's Changed

  • docker-compose: Fixed the Prometheus data source in #22
  • Fixed a data race generated from the k6 metric mapping in #23

Full Changelog: v0.0.1...v0.0.2

v0.0.1

16 May 21:10
a79a353
Compare
Choose a tag to compare

Simply starting to version going forward.