Monitor Query readme and samples issues #20471
Labels
Client
This issue points to a problem in the data-plane of the library.
Docs
Monitor
Monitor, Monitor Ingestion, Monitor Query
needs-team-triage
Workflow: This issue needs the team to triage.
test-manual-pass
Milestone
Section link:
Reason2,3:
ImportError: cannot import name 'LogsQueryRequest' from 'azure.monitor.query'
Reason4:
TypeError: query() missing 1 required keyword-only argument: 'timespan'
Reason5:
AttributeError: 'LogsBatchQueryResult' object has no attribute 'body'
Reason8:
The type of 'col' is 'str'. AttributeError: 'str' object has no attribute 'name'
Suggestion1:
Update to
from datetime import timedelta, datetime
Suggestion2,3:
Update to
LogsBatchQuery
Suggestion4:
Add the code
timespan=(datetime(2021, 6, 2), timedelta(hours=1)),
Suggestion5:
Suggestion6:
Update to
table.columns
Section link:
Reason1,2:
TypeError: query() missing 1 required keyword-only argument: 'timespan'
Suggestion1: Add the code:
from datetime import datetime
Suggestion2: Add the code:
timespan=(datetime(2021, 5, 2), datetime(2021, 6, 2))
Section link:
Reason:
NameError: name 'datetime' is not defined
Suggestion:
Update to
from datetime import timedelta, datetime
Section link1, link2, link3, link4,link5:
Reason:
The type of 'col' is 'str'. AttributeError: 'str' object has no attribute 'name'
Suggestion:
Update to
table.columns
Section link1, link2:
Reason:
The type of 'col' is 'str'. AttributeError: 'str' object has no attribute 'name'
Suggestion:
Section link1, link2:
Reason:
TypeError: query() missing 1 required keyword-only argument: 'timespan'
Suggestion:
Add the parameter
timespan=(datetime(2021, 5, 2), datetime(2021, 6, 2))
inclient.querty()
.Section link:
Reason:
AttributeError: 'MetricAvailability' object has no attribute 'time_grain'.
Suggestion:
Update to
print(availability.granularity)
@jameszliao-msft , @lmazuel , @scottaddie , @srnagar and @rakshith91 for notification.
The text was updated successfully, but these errors were encountered: