Skip to content

Commit

Permalink
chore: remove high cardinality histogram metrics for UT
Browse files Browse the repository at this point in the history
  • Loading branch information
dhawal1248 committed Jun 28, 2024
1 parent 13d2951 commit f42b81c
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 56 deletions.
1 change: 0 additions & 1 deletion src/legacy/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,6 @@ if (startDestTransformer) {
ctx.status = ctxStatusCode;
ctx.set('apiVersion', API_VERSION);

stats.timing('user_transform_request_latency', startTime, {});
stats.timingSummary('user_transform_request_latency_summary', startTime, {});
stats.increment('user_transform_requests', {});
stats.histogram('user_transform_output_events', transformedEvents.length, {});
Expand Down
8 changes: 0 additions & 8 deletions src/services/userTransform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,7 @@ export class UserTransformService {
...getTransformationMetadata(eventsToProcess[0]?.metadata),
});
} finally {
stats.timing('user_transform_request_latency', userFuncStartTime, {
...metaTags,
...getTransformationMetadata(eventsToProcess[0]?.metadata),
});

stats.timing('user_transform_batch_size', requestSize, {
...metaTags,
...getTransformationMetadata(eventsToProcess[0]?.metadata),
});

stats.timingSummary('user_transform_request_latency_summary', userFuncStartTime, {
...metaTags,
Expand Down
1 change: 0 additions & 1 deletion src/util/customTransformer-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ async function userTransformHandlerV1(
...(events.length && events[0].metadata ? getTransformationMetadata(events[0].metadata) : {}),
};
stats.counter('user_transform_function_input_events', events.length, tags);
stats.timing('user_transform_function_latency', invokeTime, tags);
stats.timingSummary('user_transform_function_latency_summary', invokeTime, tags);
}

Expand Down
1 change: 0 additions & 1 deletion src/util/customTransformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ async function runUserTransform(
};

stats.counter('user_transform_function_input_events', events.length, tags);
stats.timing('user_transform_function_latency', invokeTime, tags);
stats.timingSummary('user_transform_function_latency_summary', invokeTime, tags);
}

Expand Down
1 change: 0 additions & 1 deletion src/util/openfaas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ const executeFaasFunction = async (
};

stats.counter('user_transform_function_input_events', events.length, tags);
stats.timing('user_transform_function_latency', startTime, tags);
stats.timingSummary('user_transform_function_latency_summary', startTime, tags);
}
};
Expand Down
44 changes: 0 additions & 44 deletions src/util/prometheus.js
Original file line number Diff line number Diff line change
Expand Up @@ -839,34 +839,6 @@ class Prometheus {
],
},
// histogram
{
name: 'user_transform_request_latency',
help: 'user_transform_request_latency',
type: 'histogram',
labelNames: [
'workspaceId',
'transformationId',
'sourceType',
'destinationType',
'k8_namespace',
],
},
{
name: 'user_transform_batch_size',
help: 'user_transform_batch_size',
type: 'histogram',
labelNames: [
'workspaceId',
'transformationId',
'sourceType',
'destinationType',
'k8_namespace',
],
buckets: [
1024, 102400, 524288, 1048576, 10485760, 20971520, 52428800, 104857600, 209715200,
524288000,
], // 1KB, 100KB, 0.5MB, 1MB, 10MB, 20MB, 50MB, 100MB, 200MB, 500MB
},
{
name: 'creation_time',
help: 'creation_time',
Expand Down Expand Up @@ -917,22 +889,6 @@ class Prometheus {
labelNames: [],
buckets: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 150, 200],
},
{
name: 'user_transform_function_latency',
help: 'user_transform_function_latency',
type: 'histogram',
labelNames: [
'identifier',
'testMode',
'sourceType',
'destinationType',
'k8_namespace',
'errored',
'statusCode',
'transformationId',
'workspaceId',
],
},
// summary
{
name: 'user_transform_request_latency_summary',
Expand Down

0 comments on commit f42b81c

Please sign in to comment.