Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into chore.labels-int-api
Browse files Browse the repository at this point in the history
  • Loading branch information
Sai Sankeerth committed Jun 19, 2024
2 parents 57eafca + 20020af commit 73fcf87
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 44 deletions.
25 changes: 0 additions & 25 deletions src/controllers/destination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import logger from '../logger';

export class DestinationController {
public static async destinationTransformAtProcessor(ctx: Context) {
const startTime = new Date();
logger.debug('Native(Process-Transform):: Requst to transformer::', ctx.request.body);
let resplist: ProcessorTransformationResponse[];
const requestMetadata = MiscService.getRequestMetadata(ctx);
Expand Down Expand Up @@ -71,22 +70,10 @@ export class DestinationController {
version,
...metaTags,
});
stats.timing('dest_transform_request_latency', startTime, {
destination,
feature: tags.FEATURES.PROCESSOR,
version,
...metaTags,
});
stats.increment('dest_transform_requests', {
destination,
version,
...metaTags,
});
return ctx;
}

public static async destinationTransformAtRouter(ctx: Context) {
const startTime = new Date();
logger.debug('Native(Router-Transform):: Requst to transformer::', ctx.request.body);
const requestMetadata = MiscService.getRequestMetadata(ctx);
const routerRequest = ctx.request.body as RouterTransformationRequest;
Expand Down Expand Up @@ -145,18 +132,11 @@ export class DestinationController {
version: 'v0',
...metaTags,
});
stats.timing('dest_transform_request_latency', startTime, {
destination,
version: 'v0',
feature: tags.FEATURES.ROUTER,
...metaTags,
});
return ctx;
}

public static batchProcess(ctx: Context) {
logger.debug('Native(Process-Transform-Batch):: Requst to transformer::', ctx.request.body);
const startTime = new Date();
const requestMetadata = MiscService.getRequestMetadata(ctx);
const routerRequest = ctx.request.body as RouterTransformationRequest;
const destination = routerRequest.destType;
Expand Down Expand Up @@ -187,11 +167,6 @@ export class DestinationController {
ctx.body = [errResp];
}
ControllerUtility.postProcess(ctx);
stats.timing('dest_transform_request_latency', startTime, {
destination,
feature: tags.FEATURES.BATCH,
version: 'v0',
});
return ctx;
}
}
6 changes: 0 additions & 6 deletions src/controllers/regulation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Context } from 'koa';
import { ServiceSelector } from '../helpers/serviceSelector';
import { DestinationPostTransformationService } from '../services/destination/postTransformation';
import { UserDeletionRequest, UserDeletionResponse } from '../types';
import stats from '../util/stats';
import tags from '../v0/util/tags';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { CatchErr } from '../util/types';
Expand All @@ -11,7 +10,6 @@ import logger from '../logger';
export class RegulationController {
public static async deleteUsers(ctx: Context) {
logger.debug('Native(Process-Transform):: Requst to transformer::', ctx.request.body);
const startTime = new Date();
let rudderDestInfo: any;
try {
const rudderDestInfoHeader = ctx.get('x-rudder-dest-info');
Expand Down Expand Up @@ -47,10 +45,6 @@ export class RegulationController {
ctx.body = [{ error, statusCode: 500 }] as UserDeletionResponse[]; // TODO: responses array length is always 1. Is that okay?
ctx.status = 500;
}
stats.timing('dest_transform_request_latency', startTime, {
feature: tags.FEATURES.USER_DELETION,
version: 'v0',
});
return ctx;
}
}
13 changes: 0 additions & 13 deletions src/util/prometheus.js
Original file line number Diff line number Diff line change
Expand Up @@ -721,19 +721,6 @@ class Prometheus {
type: 'histogram',
labelNames: ['feature', 'implementation', 'destType'],
},
{
name: 'dest_transform_request_latency',
help: 'dest_transform_request_latency',
type: 'histogram',
labelNames: [
'destination',
'version',
'sourceType',
'destinationType',
'k8_namespace',
'feature',
],
},
{
name: 'user_transform_request_latency',
help: 'user_transform_request_latency',
Expand Down

0 comments on commit 73fcf87

Please sign in to comment.