Skip to content

Commit

Permalink
readd the size of batch request for tracking plan validation
Browse files Browse the repository at this point in the history
  • Loading branch information
abhimanyubabbar committed Mar 12, 2024
1 parent 7db83f2 commit 54a4ffb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/services/trackingPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ export class TrackingPlanservice {
respList.push(eventValidationResponse);

Check warning on line 71 in src/services/trackingPlan.ts

View check run for this annotation

Codecov / codecov/patch

src/services/trackingPlan.ts#L71

Added line #L71 was not covered by tests
}

stats.histogram('tp_batch_size', requestSize, {

Check warning on line 74 in src/services/trackingPlan.ts

View check run for this annotation

Codecov / codecov/patch

src/services/trackingPlan.ts#L74

Added line #L74 was not covered by tests
...metaTags,
...tpTags,
});

// capture overall function latency
// with metadata tags
stats.histogram('tp_batch_validation_latency', (Date.now() - startTime) / 1000, {

Check warning on line 81 in src/services/trackingPlan.ts

View check run for this annotation

Codecov / codecov/patch

src/services/trackingPlan.ts#L81

Added line #L81 was not covered by tests
Expand Down
12 changes: 9 additions & 3 deletions src/util/prometheus.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,10 +590,16 @@ class Prometheus {
labelNames: ['method', 'route', 'code'],
},
{
name: 'tp_request_size',
help: 'tp_request_size',
name: 'tp_batch_size',
help: 'Size of batch of events for tracking plan validation',
type: 'histogram',
labelNames: ['sourceType', 'destinationType', 'k8_namespace'],
labelNames: [
'sourceType',
'destinationType',
'k8_namespace',
'workspaceId',
'trackingPlanId',
],
},
{
name: 'tp_event_validation_latency',
Expand Down

0 comments on commit 54a4ffb

Please sign in to comment.