Skip to content

Conversation

@celian-garcia
Copy link
Member

@celian-garcia celian-garcia commented Oct 29, 2025

Description

When we collect metrics, we ask for all available aggregations (Average, Sum, Min, Max, ...) but when we do so with some metrics, Azure API is giving a 501 Not Implemented error. So we need to really respect the definition of each metric.

Link to tracking issue

Relates #43648 (not fully fixing)

Testing

For the full e2e tests, the impact on tests has only been to setup supported aggregation in the metrics definition mocks. We simulate supporting all aggregation in the definition to make sure the tests results are unchanged.

We rely on unit test of the getMetricAggregations function to test a more variety of cases.

Documentation

Updated to provide more details.
image

@celian-garcia celian-garcia force-pushed the fix/43648 branch 3 times, most recently from 3217f33 to a687de9 Compare October 30, 2025 15:50
@marcinsiennicki95
Copy link
Contributor

Could you explain how the CreateAccount metric will works for Microsoft.DocumentDB/DatabaseAccounts when using an empty [] configuration? The README isn’t clear me: does it automatically collect all available aggregations for this metric (only count), or do I need to specify them explicitly?

@celian-garcia
Copy link
Member Author

Could you explain how the CreateAccount metric will works for Microsoft.DocumentDB/DatabaseAccounts when using an empty [] configuration? The README isn’t clear me: does it automatically collect all available aggregations for this metric (only count), or do I need to specify them explicitly?

I can make it more explicit in the Readme indeed but as long as you define aggregations for one metric of a namespace, you have to define all aggregations for all metrics you want in that namespace. If you want all aggregation of a metric you set a [*] as value.

@marcinsiennicki95
Copy link
Contributor

marcinsiennicki95 commented Nov 4, 2025

Thx, now it is clear :) It will work for me, I just want to collect all aggregation for selected metrics.

image

@celian-garcia
Copy link
Member Author

celian-garcia commented Nov 5, 2025

Thx, now it is clear :) It will work for me, I just want to collect all aggregation for selected metrics.

image

Ok I will update the README then. Thanks for the early feedback 🙂
I'm not sure [] value will work though. Right value is really the wildcard it's interpreted [*].

Edit: You are right, I'm re-reading the tests and setting value empty [] has the same effect than the wildcard [*]

@celian-garcia celian-garcia force-pushed the fix/43648 branch 4 times, most recently from a3264ce to a767d8b Compare November 6, 2025 17:41
@celian-garcia celian-garcia marked this pull request as ready for review November 6, 2025 17:44
@celian-garcia celian-garcia requested a review from a team as a code owner November 6, 2025 17:44
@celian-garcia celian-garcia requested a review from mx-psi November 6, 2025 17:44
…or each metric (501 not implemented issue)

Signed-off-by: Célian Garcia <[email protected]>
Signed-off-by: Celian GARCIA <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants