Distinguish between REST secured/public in perf logs
MODIFY
src/types/Performance.ts
src/types/Performance.ts
@@ -23,7 +23,8 @@ export enum PerformanceRecordGroup {
OCPP = 'ocpp',
OCPI = 'ocpi',
OICP = 'oicp',
- REST = 'rest',
+ REST_PUBLIC = 'rest-public',
+ REST_SECURED = 'rest-secured',
GREENCOM = 'greencom',
STRIPE = 'stripe',
RECAPTCHA = 'recaptcha',

MODIFY
src/utils/Utils.ts
src/utils/Utils.ts
@@ -1470,12 +1470,14 @@ export default class Utils {
}
// REST API
if (url.startsWith('/client/api/') ||
- url.startsWith('/client/util/') ||
+ url.startsWith('/v1/api/')) {
+ return PerformanceRecordGroup.REST_SECURED;
+ }
+ if (url.startsWith('/client/util/') ||
url.startsWith('/client/auth/') ||
- url.startsWith('/v1/api/') ||
url.startsWith('/v1/util/') ||
url.startsWith('/v1/auth/')) {
- return PerformanceRecordGroup.REST;
+ return PerformanceRecordGroup.REST_PUBLIC;
}
// OCPI
if (url.includes('ocpi')) {

Distinguish between REST secured/public in perf logs