Skip to content

Commit

Permalink
fix: capture metrics for v0 transformation metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayachand committed Mar 27, 2024
1 parent b1b479f commit 88851f9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/util/customTransformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,12 @@ async function runUserTransform(
const tags = {
identifier: 'v0',
errored: transformationError ? true : false,
...(events.length && events[0].metadata ? getMetadata(events[0].metadata) : {}),
...(events.length && events[0].metadata ? getTransformationMetadata(events[0].metadata) : {}),
...(Object.values(eventsMetadata).length
? getMetadata(Object.values(eventsMetadata)[0])
: {}),
...(Object.values(eventsMetadata).length
? getTransformationMetadata(Object.values(eventsMetadata)[0])
: {}),
};

stats.counter('user_transform_function_input_events', events.length, tags);
Expand Down

0 comments on commit 88851f9

Please sign in to comment.