-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Aggregation should be a list #19381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aggregation should be a list #19381
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| import pytest | ||
| import os | ||
| from datetime import datetime | ||
| from azure.identity import ClientSecretCredential | ||
| from azure.monitor.query import MetricsQueryClient | ||
|
|
||
|
|
@@ -15,9 +16,13 @@ def _credential(): | |
| def test_metrics_auth(): | ||
| credential = _credential() | ||
| client = MetricsQueryClient(credential) | ||
| # returns LogsQueryResults | ||
| response = client.query(os.environ['METRICS_RESOURCE_URI'], metric_names=["PublishSuccessCount"], timespan='P2D') | ||
|
|
||
| response = client.query( | ||
| os.environ['METRICS_RESOURCE_URI'], | ||
| metric_names=["MatchedEventCount"], | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it by design to change it from "PublishSuccessCount" to "MatchedEventCount"?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the metric name publishe success count does not have any aggregations supported - these metric names are defined by each service |
||
| start_time=datetime(2021, 6, 21), | ||
| duration='P1D', | ||
| aggregation=['Count'] | ||
| ) | ||
| assert response is not None | ||
| assert response.metrics is not None | ||
|
|
||
rakshith91 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.