From 52b8c8e4a3e6d56819db936184748f20e96539bd Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Fri, 11 Feb 2022 11:22:48 +0100 Subject: [PATCH] update azuretracing and documentation Signed-off-by: Markus Blaschke --- README.md | 20 ++++++++++++++++++++ go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0020061..8706831 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ TOC: * [Features](#Features) * [Configuration](#configuration) * [Metrics](#metrics) + + [Azuretracing metrics](#azuretracing-metrics) + [Metric name and help template system](#metric-name-and-help-template-system) - [default template](#default-template) - [template `{name}_{metric}_{unit}`](#template-name_metric_unit) @@ -108,6 +109,25 @@ webui is available under url `/query` | `azurerm_api_ratelimit` | Azure ratelimit metrics (only on /metrics, resets after query) | | `azurerm_api_request_*` | Azure request count and latency as histogram | +### Azuretracing metrics + +(with 22.2.0 and later) + +Azuretracing metrics collects latency and latency from azure-sdk-for-go and creates metrics and is controllable using +environment variables (eg. setting buckets, disabling metrics or disable autoreset). + +| Metric | Description | +|------------------------------------------|----------------------------------------------------------------------------------------| +| `azurerm_api_ratelimit` | Azure ratelimit metrics (only on /metrics, resets after query due to limited validity) | +| `azurerm_api_request_*` | Azure request count and latency as histogram | + +| Environment variable | Example | Description | +|------------------------------------------|----------------------------------|----------------------------------------------------------| +| `METRIC_AZURERM_API_REQUEST_BUCKETS` | `1, 2.5, 5, 10, 30, 60, 90, 120` | Sets buckets for `azurerm_api_request` histogram metric | +| `METRIC_AZURERM_API_REQUEST_DISABLE` | `false` | Disables `azurerm_api_request_*` metric | +| `METRIC_AZURERM_API_RATELIMIT_DISABLE` | `false` | Disables `azurerm_api_ratelimit` metric | +| `METRIC_AZURERM_API_RATELIMIT_AUTORESET` | `false` | Disables `azurerm_api_ratelimit` autoreset after fetch | + ### Metric name and help template system (with 21.5.3 and later) diff --git a/go.mod b/go.mod index c2972fc..2b1374a 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( google.golang.org/protobuf v1.27.1 // indirect ) -require github.com/webdevops/go-prometheus-common v0.0.0-20220211085101-e22e574ab9ea +require github.com/webdevops/go-prometheus-common v0.0.0-20220211101814-4c9913788fe1 require ( github.com/Azure/go-autorest v14.2.0+incompatible // indirect diff --git a/go.sum b/go.sum index 86f3517..e9e4964 100644 --- a/go.sum +++ b/go.sum @@ -232,8 +232,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/webdevops/go-prometheus-common v0.0.0-20220211085101-e22e574ab9ea h1:WDmr5sYRO4caY21JSKo4TCtXRnu393cFGv/MVOIk/Os= -github.com/webdevops/go-prometheus-common v0.0.0-20220211085101-e22e574ab9ea/go.mod h1:naEkgDRh6L+Ef0qzaS9Q60m1GkwN5Mu6xaNd/Ha84Sg= +github.com/webdevops/go-prometheus-common v0.0.0-20220211101814-4c9913788fe1 h1:wIf6O43jGEarp8ojgInXRIt6jHeQ94JUvsy4O3wqKHY= +github.com/webdevops/go-prometheus-common v0.0.0-20220211101814-4c9913788fe1/go.mod h1:naEkgDRh6L+Ef0qzaS9Q60m1GkwN5Mu6xaNd/Ha84Sg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=