Skip to content

Commit 3391c25

Browse files
committed
chore: more tags for when we process data sink worker result
Signed-off-by: Uroš Marolt <uros@marolt.me>
1 parent b0bab02 commit 3391c25

1 file changed

Lines changed: 20 additions & 4 deletions

File tree

services/apps/data_sink_worker/src/service/dataSink.service.ts

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,11 +476,27 @@ export default class DataSinkService extends LoggerBase {
476476
const items = groupedByType.get(type)
477477
const msPerItem = Math.floor(totalTime / items.length)
478478

479-
items.forEach(() => {
480-
telemetry.distribution('data_sink_worker.process_result', msPerItem, {
481-
type,
479+
const args = { type }
480+
481+
if (type === IntegrationResultType.ACTIVITY) {
482+
items.forEach((item) => {
483+
const activityArgs = {
484+
...args,
485+
platform: item.platform,
486+
integrationId: item.integrationId,
487+
onboarding:
488+
item.onboarding === null || item.onboarding === undefined
489+
? '<not-set>'
490+
: item.onboarding.toString(),
491+
channel: (item.data.data as IActivityData).channel,
492+
}
493+
telemetry.distribution('data_sink_worker.process_result', msPerItem, activityArgs)
482494
})
483-
})
495+
} else {
496+
items.forEach(() => {
497+
telemetry.distribution('data_sink_worker.process_result', msPerItem, args)
498+
})
499+
}
484500
}
485501
}
486502
}

0 commit comments

Comments
 (0)