Skip to content

Commit

Permalink
remove stats for sfmc (#2647)
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh-joshi99 authored Jan 9, 2025
1 parent 195fc46 commit ea099ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,7 @@ const action: ActionDefinition<Settings, Payload> = {
perform: async (request, { settings, payload }) => {
return upsertRows(request, settings.subdomain, [payload])
},
performBatch: async (request, { settings, payload, statsContext, features }) => {
if (features && features['enable-sfmc-id-key-stats']) {
const statsClient = statsContext?.statsClient
const tags = statsContext?.tags
const setKey = new Set()
const setId = new Set()
payload.forEach((profile) => {
if (profile.id != undefined && profile.id != null) {
setId.add(profile.id)
}
if (profile.key != undefined && profile.key != null) {
setKey.add(profile.key)
}
})
statsClient?.histogram(`sfmc_id`, setId.size, tags)
statsClient?.histogram(`sfmc_key`, setKey.size, tags)
}
performBatch: async (request, { settings, payload }) => {
return upsertRows(request, settings.subdomain, payload)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,7 @@ const action: ActionDefinition<Settings, Payload> = {
perform: async (request, { settings, payload }) => {
return upsertRows(request, settings.subdomain, [payload])
},
performBatch: async (request, { settings, payload, statsContext, features }) => {
if (features && features['enable-sfmc-id-key-stats']) {
const statsClient = statsContext?.statsClient
const tags = statsContext?.tags
const setKey = new Set()
const setId = new Set()
payload.forEach((profile) => {
if (profile.id != undefined && profile.id != null) {
setId.add(profile.id)
}
if (profile.key != undefined && profile.key != null) {
setKey.add(profile.key)
}
})
statsClient?.histogram(`sfmc_id`, setId.size, tags)
statsClient?.histogram(`sfmc_key`, setKey.size, tags)
}
performBatch: async (request, { settings, payload }) => {
return upsertRows(request, settings.subdomain, payload)
}
}
Expand Down

0 comments on commit ea099ba

Please sign in to comment.