Skip to content
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

Add --timestamp and --ingested-time options #35

Closed
vlcinsky opened this issue Jan 19, 2016 · 2 comments
Closed

Add --timestamp and --ingested-time options #35

vlcinsky opened this issue Jan 19, 2016 · 2 comments

Comments

@vlcinsky
Copy link

Current version 0.2.0 allow printing log records, but does not allow printing ingestedTime and timestamp in separate columns.

When is printing timestamp and ingestedTime relevant

In many cases, log records do contain timestamp of the record as part of it's text, but there are good reasons to show ingestedTime and timestamp as recorded by AWS for following reasons:

  • log records do not have to contain any information about timestamp
  • the time reported by log record might be wrong (e.g. due to not synced time on the computer it was generated)
  • sometime it can be practical to compare timestamp as reported by log record and as parsed by AWS plus time it was ingested.

Proposed behaviour

By default, no timestamp and ingestedTime columns are printed.

Add options --timestamp and --ingested-time. If used, timestamp and ingestedTime columns are printed.

The order of columns shall be:

  • group
  • stream
  • timestamp
  • ingestedTime
  • log record text

This order has the advantage, that columns with predictable width and delimiters are printed first and variable length part comes at the end. It shall simplify processing of the awslogs output by other tools.

Both times shall be expressed in RFC3339 format in UTC, this shall ensure, the output is not dependent on where is the command run. As both times are expressed with miliseconds, the datetime might look like 2016-01-19T22:03:36.123Z

Conclusions

There exists PR #26, which is getting close, but would have to be modified to meet the requirements mentioned above, namely:

  • allow output of ingestedTime
@vlcinsky
Copy link
Author

PR #36 shall resolve this issue

@jorgebastida
Copy link
Owner

Merged! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants