Skip to content

Commit

Permalink
chore: plugin-server updates for exception handling (#26276)
Browse files Browse the repository at this point in the history
  • Loading branch information
daibhin authored Nov 19, 2024
1 parent 2353cac commit 53b600d
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 273 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function produceExceptionSymbolificationEventStep(
const ack = runner.hub.kafkaProducer
.produce({
topic: runner.hub.EXCEPTIONS_SYMBOLIFICATION_KAFKA_TOPIC,
key: event.uuid,
key: String(event.team_id),
value: Buffer.from(JSON.stringify(event)),
waitForAck: true,
})
Expand Down
9 changes: 1 addition & 8 deletions plugin-server/src/worker/ingestion/event-pipeline/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { EventsProcessor } from '../process-event'
import { captureIngestionWarning, generateEventDeadLetterQueueMessage } from '../utils'
import { createEventStep } from './createEventStep'
import { emitEventStep } from './emitEventStep'
import { enrichExceptionEventStep } from './enrichExceptionEventStep'
import { extractHeatmapDataStep } from './extractHeatmapDataStep'
import {
eventProcessedAndIngestedCounter,
Expand Down Expand Up @@ -254,15 +253,9 @@ export class EventPipelineRunner {
heatmapKafkaAcks.forEach((ack) => kafkaAcks.push(ack))
}

const enrichedIfErrorEvent = await this.runStep(
enrichExceptionEventStep,
[this, preparedEventWithoutHeatmaps],
event.team_id
)

const rawEvent = await this.runStep(
createEventStep,
[this, enrichedIfErrorEvent, person, processPerson],
[this, preparedEventWithoutHeatmaps, person, processPerson],
event.team_id
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,6 @@ Array [
},
],
],
Array [
"enrichExceptionEventStep",
Array [
Object {
"distinctId": "my_id",
"elementsList": Array [],
"event": "$pageview",
"eventUuid": "uuid1",
"ip": "127.0.0.1",
"projectId": 1,
"properties": Object {},
"teamId": 2,
"timestamp": "2020-02-23T02:15:00.000Z",
},
],
],
Array [
"createEventStep",
Array [
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ describe('EventPipelineRunner', () => {
'processPersonsStep',
'prepareEventStep',
'extractHeatmapDataStep',
'enrichExceptionEventStep',
'createEventStep',
'emitEventStep',
])
Expand Down Expand Up @@ -175,7 +174,6 @@ describe('EventPipelineRunner', () => {
'processPersonsStep',
'prepareEventStep',
'extractHeatmapDataStep',
'enrichExceptionEventStep',
'createEventStep',
'emitEventStep',
])
Expand All @@ -199,7 +197,7 @@ describe('EventPipelineRunner', () => {
const result = await runner.runEventPipeline(pipelineEvent)
expect(result.error).toBeUndefined()

expect(pipelineStepMsSummarySpy).toHaveBeenCalledTimes(9)
expect(pipelineStepMsSummarySpy).toHaveBeenCalledTimes(8)
expect(pipelineLastStepCounterSpy).toHaveBeenCalledTimes(1)
expect(eventProcessedAndIngestedCounterSpy).toHaveBeenCalledTimes(1)
expect(pipelineStepMsSummarySpy).toHaveBeenCalledWith('emitEventStep')
Expand Down Expand Up @@ -398,7 +396,6 @@ describe('EventPipelineRunner', () => {
'processPersonsStep',
'prepareEventStep',
'extractHeatmapDataStep',
'enrichExceptionEventStep',
'createEventStep',
'emitEventStep',
])
Expand Down

0 comments on commit 53b600d

Please sign in to comment.