-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: --mq-traces in support bundle operation #103
Conversation
for namespace in namespaces: | ||
try: | ||
traces = get_traces(namespace=namespace, trace_ids=["!support_bundle!"]) | ||
if traces: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - now that get_traces
can return either a list of dicts or a list of tuples, do we need to typecheck its return value? Might even just be here, as the other reference to it is a straight return get_traces(...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added test coverage for the return value in the stats tests area.
If the wrong type gets returned, and the later accessing code here causes an exception it should get caught, and also, we have a backup exception handler at the support bundle runner level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also thinking about the type check it would per list item since the outer most type is either list or None. I kind of like the exception handle to provide a hint of something going wrong. We can consider making it a warning to show outside of --debug
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss in subsequent PR.
--mq-traces
flag toaz iot ops support create-bundle
.stats
command supports both fetching traces by--trace-ids
or--trace-dir
.