You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If there is not unit field in the raw reply from the https://{your-environment-id}.live.dynatrace.com/api/v2/metrics API, the client doesn't handle it properly.
vduseev
changed the title
"None is not a valid Unit" in metrics.list.query()
"None is not a valid Unit" in metrics.list.query(fields="entityType")
Sep 10, 2024
Describe the bug
If there is not unit field in the raw reply from the
https://{your-environment-id}.live.dynatrace.com/api/v2/metrics
API, the client doesn't handle it properly.api-client-python/dynatrace/environment_v2/metrics.py
Line 230 in 620213c
The
Unit
enum doesn't have any value forNone
, obviously.To Reproduce
Steps to reproduce the behavior:
fields
specified:client.metrics.list.query(page_size=500, fields="entityType")
Solution:
Most likely, this needs to be rewritten to
Currently, you can go around that by specifying
unit
as a field:The text was updated successfully, but these errors were encountered: