Skip to content

Commit

Permalink
Handle AttributeError exceptions in logs CLI (#3980)
Browse files Browse the repository at this point in the history
* Handle AttributeError exceptions in logs CLI
  • Loading branch information
yaroliakh authored Oct 16, 2024
1 parent 762ebc8 commit 979ea52
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions paasta_tools/cli/cmds/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@ def paasta_app_output_passes_filter(
# https://github.com/gweis/isodate/issues/53
except ValueError:
return True
except AttributeError:
# Timestamp might be missing. We had an issue where OTel was splitting overly long log lines
# and not including timestamps in the resulting log records (OBSPLAT-2216).
# Although this was then fixed in OTel, we should not rely on timestamps being present,
# as the format cannot be guaranteed.
return False
if not check_timestamp_in_range(timestamp, start_time, end_time):
return False
return (
Expand Down

0 comments on commit 979ea52

Please sign in to comment.