-
Notifications
You must be signed in to change notification settings - Fork 4
Add additional logs to wasp-bot
#61
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,18 +12,24 @@ import moment from "../moment"; | |
| */ | ||
| export async function fetchEventsForReportGenerator(): Promise<PosthogEvent[]> { | ||
| const allEvents = await tryToFetchAllCliEvents(); | ||
|
|
||
| logger.info("\nNumber of CLI events fetched:", allEvents.length); | ||
|
|
||
| const waspTeamFilters = [isNotWaspTeamEvent, isNotMihoPrivateCIServerEvent]; | ||
| const nonWaspTeamEvents = waspTeamFilters.reduce( | ||
| (events, f) => events.filter(f), | ||
| allEvents, | ||
| ); | ||
| logger.debug( | ||
| "\nNumber of non-Wasp-team CLI events:", | ||
| nonWaspTeamEvents.length, | ||
| ); | ||
|
|
||
| const sortedNonWaspTeamEvents = _.sortBy(nonWaspTeamEvents, "timestamp"); | ||
|
|
||
| const sortedValidEvents = markAsCiEventBurstsFromDifferentUsersFromSameIp( | ||
| sortedNonWaspTeamEvents, | ||
| ); | ||
| logger.debug("\nNumber of valid CLI events:", sortedValidEvents.length); | ||
|
Comment on lines
+22
to
+32
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we care about these in our logging?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just wondered how much do these filters affect the data.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also there might be betters ways to solve some of them I hope. |
||
|
|
||
| return sortedValidEvents; | ||
| } | ||
|
|
||
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.
Since this will log the message with the stack trace, etc...