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

Provide a default query if not specified #188

Merged
merged 4 commits into from
Oct 18, 2023
Merged

Conversation

Kellen-Stuart
Copy link
Contributor

Old Behavior

If the query parameter was not provided - the [0] arg - then an error would be returned

No query provided

New Behavior

This merge request defaults the query to

      fields @timestamp, @message, @logStream, @log
      | sort @timestamp desc

(if not provided).

Testing

Screenshot of the output from a manual test

No Cloudwatch Insight Query provided. Defaulting to:

      fields @timestamp, @message, @logStream, @log
      | sort @timestamp desc

Querying between 2023-10-06T20:43:15.096Z and 2023-10-06T21:43:15.096Z
    for 1 log group(s): ["/aws/lambda/CoreAPI-processesTaskGeneratePatientExport"]

    0 records (0.00 MB) scanned, 0 matched

No results returned.

@bcelenza
Copy link
Owner

bcelenza commented Oct 7, 2023

Thanks! Could we also make a small update to the README to describe the default behavior? Right around here seems good: https://github.com/bcelenza/aws-cwq/blob/main/README.md?plain=1#L52

@Kellen-Stuart
Copy link
Contributor Author

Kellen-Stuart commented Oct 10, 2023

Thanks! Could we also make a small update to the README to describe the default behavior? Right around here seems good: https://github.com/bcelenza/aws-cwq/blob/main/README.md?plain=1#L52

Sure thing! What do you think about this? 04d0db9

README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@bcelenza bcelenza merged commit 49fbf0c into bcelenza:main Oct 18, 2023
1 check passed
@bcelenza
Copy link
Owner

Thanks so much!!

@github-actions
Copy link

🎉 This PR is included in version 1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants