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
When calling dt.audit_logs.list() I'm seeing sporadic errors in my logs. The errors I see are ValueError exceptions complaining that specific values are not a valid Category. I am seeing this exception for ACTIVEGATE_TOKEN, ACTIVE_GATE, AGENT, COMPONENT and MANUAL_TAGGING_SERVICE (so far).
[ERROR] ValueError: 'ACTIVEGATE_TOKEN' is not a valid Category
[ERROR] ValueError: 'ACTIVE_GATE' is not a valid Category
[ERROR] ValueError: 'AGENT' is not a valid Category
[ERROR] ValueError: 'COMPONENT' is not a valid Category
[ERROR] ValueError: 'MANUAL_TAGGING_SERVICE' is not a valid Category
Here is an example of the raw exception for your reference:
[ERROR] ValueError: 'MANUAL_TAGGING_SERVICE' is not a valid Category
Traceback (most recent call last):
File "/var/task/collect_audit_events.py", line 39, in lambda_handler
events = dt.audit_logs.list(
File "/opt/python/dynatrace/environment_v2/audit_logs.py", line 41, in list
return PaginatedList(
File "/opt/python/dynatrace/pagination.py", line 37, in __init__
self.__elements = self._get_next_page()
File "/opt/python/dynatrace/pagination.py", line 68, in _get_next_page
data = [self.__target_class(self.__http_client, response.headers, element) for element in elements]
File "/opt/python/dynatrace/pagination.py", line 68, in <listcomp>
data = [self.__target_class(self.__http_client, response.headers, element) for element in elements]
File "/opt/python/dynatrace/dynatrace_object.py", line 35, in __init__
self._create_from_raw_data(raw_element)
File "/opt/python/dynatrace/environment_v2/audit_logs.py", line 83, in _create_from_raw_data
self.category: Category = Category(raw_element.get("category"))
File "/var/lang/lib/python3.10/enum.py", line 385, in __call__
return cls.__new__(cls, value)
File "/var/lang/lib/python3.10/enum.py", line 710, in __new__
raise ve_exc
My assumption here is that additional categories have been added to Dynatrace (SaaS), but the API has not been updated (yet) to include them...
The text was updated successfully, but these errors were encountered:
The latest docs didn't just add some possible values for category it looks like the majority of them were changed or are different, only 'TOKEN' and 'WEB_UI' are still present which is what the original list was.
I'll do some asking/checking to see if these values really are different as opposed to just being added. Either way, just adding these new ones might be the best 'backward compatible' way of doing it. There'd be no risk of supporting values that aren't coming in.
Not from the source, but I did add all of the new ones and left the old ones in here for compatibility. I should have closed this when merging but there shouldn't be any issues with the latest releases.
Describe the bug
When calling
dt.audit_logs.list()
I'm seeing sporadic errors in my logs. The errors I see are ValueError exceptions complaining that specific values are not a valid Category. I am seeing this exception forACTIVEGATE_TOKEN
,ACTIVE_GATE
,AGENT
,COMPONENT
andMANUAL_TAGGING_SERVICE
(so far).[ERROR] ValueError: 'ACTIVEGATE_TOKEN' is not a valid Category
[ERROR] ValueError: 'ACTIVE_GATE' is not a valid Category
[ERROR] ValueError: 'AGENT' is not a valid Category
[ERROR] ValueError: 'COMPONENT' is not a valid Category
[ERROR] ValueError: 'MANUAL_TAGGING_SERVICE' is not a valid Category
Here is an example of the raw exception for your reference:
My assumption here is that additional categories have been added to Dynatrace (SaaS), but the API has not been updated (yet) to include them...
The text was updated successfully, but these errors were encountered: