Skip to content

Commit

Permalink
feat: onboard braze stats (#2703)
Browse files Browse the repository at this point in the history
  • Loading branch information
utsabc committed Oct 10, 2023
1 parent 4ce47ec commit f205325
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/v0/destinations/braze/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,23 @@ const processBatch = (transformedEvents) => {
const attributes = attributeArrayChunks[i];
const events = eventsArrayChunks[i];
const purchases = purchaseArrayChunks[i];

if (attributes) {
stats.gauge('braze_batch_attributes_pack_size', attributes.length, {
destination_id: destination.ID,
});
}
if (events) {
stats.gauge('braze_batch_events_pack_size', events.length, {
destination_id: destination.ID,
});
}
if (purchases) {
stats.gauge('braze_batch_purchase_pack_size', purchases.length, {
destination_id: destination.ID,
});
}

const response = defaultRequestConfig();
response.endpoint = endpoint;
response.body.JSON = removeUndefinedAndNullValues({
Expand Down

0 comments on commit f205325

Please sign in to comment.