Azure / Azure/azure-functions-host
Switch to multi-dimensional metrics
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
As of today, Azure Functions provide an individual metric per function for the same scope such as `{function name} AvgDurationMs`.

This means that if we have 100 functions, we'll have n * 100 metrics where n is the number of different metrics Azure Functions provides.
### Describe the solution you'd like
Would be great if Azure Functions runtime would move to **multi-dimensional metrics in Azure Monitor** and label every metric measurement with the name of the function.
This would give the following benefits:
- **Reduce the number of metrics** to n, regardless of the amount of functions.
- Allow metric consumers to **[filter & split the metric](https://docs.microsoft.com/en-gb/azure/azure-monitor/platform/metrics-charts#how-do-i-create-a-new-chart)** and more **easily create dashboards**
- Create **one alert on a given metric for all functions**
All kudos go to @jcorioland
Contributor guide
Research direction
Start by reviewing how the Azure Functions runtime currently emits per-function metrics and how Azure Monitor supports multi-dimensional metrics. Done means metrics are emitted with the function name as a dimension, the metric count no longer grows per function, and consumers can filter, split, dashboard, and alert across functions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100