Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Blaschke <[email protected]>
  • Loading branch information
mblaschke committed Jun 15, 2023
1 parent bd36e09 commit 95a832c
Showing 1 changed file with 2 additions and 33 deletions.
35 changes: 2 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Usage:
Application Options:
--log.debug debug mode [$LOG_DEBUG]
--log.trace trace mode [$LOG_TRACE]
--log.devel development mode [$LOG_DEVEL]
--log.json Switch log output to json format [$LOG_JSON]
--azure-environment= Azure environment name (default: AZUREPUBLICCLOUD) [$AZURE_ENVIRONMENT]
--azure-subscription= Azure subscription ID [$AZURE_SUBSCRIPTION_ID]
Expand Down Expand Up @@ -56,40 +56,9 @@ for Azure API authentication (using ENV vars) see following documentations:
| `azure_resourcegraph_query_results` | Number of results from query |
| `azure_resourcegraph_query_requests` | Count of requests (eg paged subqueries) per query |


### 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 |

#### Settings

| 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_ENABLE` | `false` | Enables/disables `azurerm_api_request_*` metric |
| `METRIC_AZURERM_API_REQUEST_LABELS` | `apiEndpoint, method, statusCode` | Controls labels of `azurerm_api_request_*` metric |
| `METRIC_AZURERM_API_RATELIMIT_ENABLE` | `false` | Enables/disables `azurerm_api_ratelimit` metric |
| `METRIC_AZURERM_API_RATELIMIT_AUTORESET` | `false` | Enables/disables `azurerm_api_ratelimit` autoreset after fetch |


| `azurerm_api_request` label | Status | Description |
|-----------------------------|--------------------|----------------------------------------------------------------------------------------------------------|
| `apiEndpoint` | enabled by default | hostname of endpoint (max 3 parts) |
| `routingRegion` | enabled by default | detected region for API call, either routing region from Azure Management API or Azure resource location |
| `subscriptionID` | enabled by default | detected subscriptionID |
| `tenantID` | enabled by default | detected tenantID (extracted from jwt auth token) |
| `resourceProvider` | enabled by default | detected Azure Management API provider |
| `method` | enabled by default | HTTP method |
| `statusCode` | enabled by default | HTTP status code |

see [armclient tracing documentation](https://github.com/webdevops/go-common/blob/main/azuresdk/README.md#azuretracing-metrics)

## Example

Expand Down

0 comments on commit 95a832c

Please sign in to comment.