Skip to content

Commit 0afae1a

Browse files
authored
Update readme: usage and development sections (grafana#151)
undefined
1 parent ff6a28f commit 0afae1a

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

README.md

+15-18
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
# xk6-output-prometheus-remote
22

3-
[k6](https://github.com/grafana/k6) extension for publishing test-run metrics to Prometheus via Remote Write endpoint.
3+
The `xk6-output-prometheus-remote` extension allows you to publish test-run metrics to Prometheus via Remote Write endpoint.
44

5-
> :bookmark: As of k6 v0.42.0, this extension is available within k6 as an _experimental module_.
6-
> This means that the extension has entered the process of being fully merged into the core of k6 and does not require a special build with xk6 to utilize this feature.
7-
>
8-
> See the [Prometheus remote write guide](https://k6.io/docs/results-output/real-time/prometheus-remote-write/) to utilize this feature.
9-
>
5+
> :warning: Be careful not to confuse this with the [Prometheus Remote Write **client** extension](https://github.com/grafana/xk6-client-prometheus-remote) which is used for load and performance testing of _Prometheus_ itself.
106
11-
There are many options for remote-write compatible agents, the official list can be found [here](https://prometheus.io/docs/operating/integrations/). The exact details of how metrics will be processed or stored depends on the underlying agent used.
7+
As of k6 v0.42.0, this extension is available within [k6](https://github.com/grafana/k6) as an _experimental module_. This means that the extension is in the process of being fully merged into the core of k6 and doesn't require a special build with [xk6](https://github.com/grafana/xk6) to use this feature. For further details, read the [extension graduation guide](https://k6.io/docs/extensions/explanations/extension-graduation/).
128

13-
> :warning: Not to be confused with [Prometheus Remote Write **client** extension](https://github.com/grafana/xk6-client-prometheus-remote) which is for load testing _Prometheus_ itself.
149

15-
### Usage
10+
## Usage
1611

17-
To build k6 binary with the Prometheus remote write output extension use:
18-
```
19-
xk6 build --with github.com/grafana/xk6-output-prometheus-remote@latest
20-
```
12+
Consult the [Prometheus remote write guide in the k6 docs](https://k6.io/docs/results-output/real-time/prometheus-remote-write/) to explore the various methods and options for sending k6 metrics to a Prometheus remote-write endpoint.
2113

22-
Then run new k6 binary with the following command for using the default configuration (e.g. remote write server url set to `http://localhost:9090/api/v1/write`):
23-
```
24-
./k6 run -o xk6-prometheus-rw script.js
14+
## Development
15+
16+
For developing or testing this extension, you can build a k6 binary with the local extension using [xk6](https://github.com/grafana/xk6) with the following steps:
17+
18+
```bash
19+
xk6 build --with github.com/grafana/xk6-output-prometheus-remote=.
2520
```
2621

27-
Check [the documentation](https://k6.io/docs/results-output/real-time/prometheus-remote-write) for advanced configurations, Docker Compose ready to use example or for using the builtin experimental output.
22+
For more details, refer to the k6 docs:
23+
- [Build a k6 binary using Go](https://k6.io/docs/extensions/guides/build-a-k6-binary-using-go/)
24+
- [k6 output extensions](https://k6.io/docs/extensions/get-started/create/output-extensions/)
2825

2926
## Dashboards
3027

@@ -34,6 +31,6 @@ Check [the documentation](https://k6.io/docs/results-output/real-time/prometheus
3431

3532
This repo contains the [source code](./grafana/dashboards) of two Grafana dashboards designed to visualize test results: [`k6 Prometheus`](https://grafana.com/grafana/dashboards/19665-k6-prometheus/) and [k6 Prometheus (Native Histograms)](https://grafana.com/grafana/dashboards/18030-k6-prometheus-native-histograms/).
3633

37-
Refer to the [documentation](https://k6.io/docs/results-output/real-time/prometheus-remote-write/#time-series-visualization) to learn more about these dashboards. You can import them to your Grafana instance or with the docker-compose example on this repo.
34+
Visit the [documentation](https://k6.io/docs/results-output/real-time/prometheus-remote-write/#time-series-visualization) to learn more about these dashboards. You can import them to your Grafana instance or with the docker-compose example on this repo.
3835

3936
🌟 Special thanks to [jwcastillo](https://github.com/jwcastillo) for his contributions and dedication to improving the dashboards.

0 commit comments

Comments
 (0)