-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: drop console log events when disabled #18210
feat: drop console log events when disabled #18210
Conversation
@@ -95,6 +95,11 @@ type PartitionMetrics = { | |||
lastKnownCommit?: number | |||
} | |||
|
|||
export interface TeamIDWithConfig { |
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 with structure since if/when we start ingesting network performance events to ClickHouse we'll want the same control
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.
Looks good - always a bit worried if we start adding more values that we are holding in memory but this should be fine.
Yep, I nearly added a refresher in the console log ingester 🙈 before realising we only want a little more data not twice as much 📈 |
@@ -30,9 +30,10 @@ function deduplicateConsoleLogEvents(consoleLogEntries: ConsoleLogEntry[]): Cons | |||
const deduped: ConsoleLogEntry[] = [] | |||
|
|||
for (const cle of consoleLogEntries) { | |||
if (!seen.has(cle.message)) { | |||
const fingerPrint = `${cle.log_level}-${cle.message}` |
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.
the only real change since last review...
Deduplication didn't work at all 🙈 🤦
* feat: drop console log events when disabled * don't process logs before dropping them * write tests and as a result fix de-duplication * overwriting default with default is unnecessary
We had a team sending very large/numerous console logs in a very few session recordings. They also had long sessions.
The sessions were causing problems at ingestion and so we disabled the console log ingestion. But because their sessions were long-lived and this only affects new sessions it didn't relieve ingestion pressure.
So, we had to disable all recording for the team. So that when the teams refresher next updated we'd start dropping their recordings.
This PR amends the teams refresher to pick out (some) config for the teams so that we can still check if a team exist and is enabled for general replay ingestion - but also in the console log ingester check if a team is enabled and when there are console logs in an event drop them if the team is disabled