From 70098ed35623284408cd1765656a745267a68cfe Mon Sep 17 00:00:00 2001 From: Oleg Bespalov Date: Wed, 29 Nov 2023 07:54:03 +0100 Subject: [PATCH] Document a new metrics restriction (#1426) * Document a new metrics restriction --------- Co-authored-by: Heitor Tashiro Sergent --- docs/sources/next/using-k6/metrics/_index.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/sources/next/using-k6/metrics/_index.md b/docs/sources/next/using-k6/metrics/_index.md index 6265fd5ed6..b6c606ac83 100644 --- a/docs/sources/next/using-k6/metrics/_index.md +++ b/docs/sources/next/using-k6/metrics/_index.md @@ -21,10 +21,10 @@ To make a test fail a certain criteria, you can write a [Threshold](https://graf To filter metrics, you can use [Tags and groups](https://grafana.com/docs/k6//using-k6/tags-and-groups). You can also export metrics in various summary and granular formats, as documented in [Results output](https://grafana.com/docs/k6//results-output). -| On this page... | Read about... | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| On this page... | Read about... | +| -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | | [Built-in metrics](https://grafana.com/docs/k6//using-k6/metrics/reference) | Each built-in metric for each supported [protocol](https://grafana.com/docs/k6//using-k6/protocols) | -| [Create custom metrics](https://grafana.com/docs/k6//using-k6/metrics/create-custom-metrics) | How to build your own metric for each metric type | +| [Create custom metrics](https://grafana.com/docs/k6//using-k6/metrics/create-custom-metrics) | How to build your own metric for each metric type | ## What metrics to look at? @@ -42,7 +42,7 @@ However, if you're unsure about the metrics to focus on, you can start with the In other terminology, these metrics measure traffic (in requests), availability (in error rate), and latency (in request duration). SREs might recognize these metrics as three of the [four Golden Signals](https://sre.google/sre-book/monitoring-distributed-systems/#xref_monitoring_golden-signals). - {{% /admonition %}} +{{% /admonition %}} ## Example output @@ -111,8 +111,7 @@ For details of all metrics, refer to the [Metrics reference](https://grafana.com Metric names must comply with OpenTelemetry and [Prometheus limitations](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). The character limit is the same limit k6 had before restricting the character set down. -That means they must not start with a number and a metric name can be 1 to 128 symbols of: +That means metrics names must: -1. any Unicode Letters -2. any Unicode Number -3. `_` (an underscore) +- Include up to 128 symbols (ASCII letters, numbers, or underscores). +- Start with a letter or an underscore.