-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: dual write exceptions in new step (#25343)
- Loading branch information
Showing
7 changed files
with
96 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...in-server/src/worker/ingestion/event-pipeline/produceExceptionSymbolificationEventStep.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { RawClickHouseEvent } from '../../../types' | ||
import { status } from '../../../utils/status' | ||
import { EventPipelineRunner } from './runner' | ||
|
||
export function produceExceptionSymbolificationEventStep( | ||
runner: EventPipelineRunner, | ||
event: RawClickHouseEvent | ||
): Promise<[Promise<void>]> { | ||
const ack = runner.hub.kafkaProducer | ||
.produce({ | ||
topic: runner.hub.EXCEPTIONS_SYMBOLIFICATION_KAFKA_TOPIC, | ||
key: event.uuid, | ||
value: Buffer.from(JSON.stringify(event)), | ||
waitForAck: true, | ||
}) | ||
.catch((error) => { | ||
status.warn('⚠️', 'Failed to produce exception event for symbolification', { | ||
team_id: event.team_id, | ||
uuid: event.uuid, | ||
error, | ||
}) | ||
throw error | ||
}) | ||
|
||
return Promise.resolve([ack]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters