-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide support for multi-dimensional metrics (#807)
* Document new feature Signed-off-by: Tom Kerkhove <[email protected]> * Update changelog Signed-off-by: Tom Kerkhove <[email protected]> * Allow customers to configure a dimension Signed-off-by: Tom Kerkhove <[email protected]> * Provide support for multi-dimensional metrics Signed-off-by: Tom Kerkhove <[email protected]> * More local tracing Signed-off-by: Tom Kerkhove <[email protected]> * Use new doc endpoint Signed-off-by: Tom Kerkhove <[email protected]> * Improve logging Signed-off-by: Tom Kerkhove <[email protected]> * Block EntityPath dimension for Service Bus for now Signed-off-by: Tom Kerkhove <[email protected]> * Add ACI to local testing * Remove usings Signed-off-by: Tom Kerkhove <[email protected]> * Markdown linting Signed-off-by: Tom Kerkhove <[email protected]> * Markdown linting Signed-off-by: Tom Kerkhove <[email protected]> * Update docs Signed-off-by: Tom Kerkhove <[email protected]> * Uncomment sample dimension * Move azureMetricConfiguration.dimensionName to azureMetricConfiguration.dimension.Name Signed-off-by: Tom Kerkhove <[email protected]>
- Loading branch information
1 parent
42959a4
commit 6c390c9
Showing
39 changed files
with
482 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
layout: default | ||
title: Frequently asked questions (FAQs) | ||
--- | ||
|
||
## Are multi-dimensional metrics supported? | ||
|
||
Yes, every scraper supports scraping multi-dimensional metrics except for | ||
Azure Storage queues. | ||
|
||
You can configure the dimension you are interested in via | ||
`azureMetricConfiguration.dimension.Name`, for more information see | ||
our ['Metric Configuration' page](/configuration/v1.x/metrics/#metrics). | ||
|
||
However, you can only use it with metrics in Azure Monitor that support this, | ||
for a complete overview we recommend reading the | ||
[official documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported). | ||
|
||
[← back](/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/Promitor.Core.Scraping/Configuration/Model/MetricDimension.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace Promitor.Core.Scraping.Configuration.Model | ||
{ | ||
/// <summary> | ||
/// Information about the dimension of an Azure Monitor metric | ||
/// </summary> | ||
public class MetricDimension | ||
{ | ||
/// <summary> | ||
/// Name of the dimension | ||
/// </summary> | ||
public string Name { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...Promitor.Core.Scraping/Configuration/Serialization/v1/Core/MetricDimensionDeserializer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Microsoft.Extensions.Logging; | ||
using Promitor.Core.Scraping.Configuration.Serialization.v1.Model; | ||
using YamlDotNet.RepresentationModel; | ||
|
||
namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Core | ||
{ | ||
public class MetricDimensionDeserializer : Deserializer<MetricDimensionV1> | ||
{ | ||
private const string NameTag = "name"; | ||
|
||
public MetricDimensionDeserializer(ILogger<MetricDimensionDeserializer> logger) | ||
: base(logger) | ||
{ | ||
} | ||
|
||
public override MetricDimensionV1 Deserialize(YamlMappingNode node) | ||
{ | ||
return new MetricDimensionV1 | ||
{ | ||
Name = node.GetString(NameTag), | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/Promitor.Core.Scraping/Configuration/Serialization/v1/Model/MetricDimensionV1.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace Promitor.Core.Scraping.Configuration.Serialization.v1.Model | ||
{ | ||
/// <summary> | ||
/// Information about the dimension of an Azure Monitor metric | ||
/// </summary> | ||
public class MetricDimensionV1 | ||
{ | ||
/// <summary> | ||
/// Name of the dimension | ||
/// </summary> | ||
public string Name { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.