@salesforce/b2c-tooling-sdk 1.18.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/clients/index.d.ts +2 -0
- package/dist/esm/clients/index.js +1 -0
- package/dist/esm/clients/index.js.map +1 -1
- package/dist/esm/clients/metrics.d.ts +123 -0
- package/dist/esm/clients/metrics.generated.d.ts +1016 -0
- package/dist/esm/clients/metrics.generated.js +6 -0
- package/dist/esm/clients/metrics.generated.js.map +1 -0
- package/dist/esm/clients/metrics.js +65 -0
- package/dist/esm/clients/metrics.js.map +1 -0
- package/dist/esm/clients/middleware-registry.d.ts +1 -1
- package/dist/esm/clients/middleware-registry.js.map +1 -1
- package/dist/esm/index.d.ts +4 -2
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/operations/logs/filter.d.ts +6 -1
- package/dist/esm/operations/logs/filter.js +7 -2
- package/dist/esm/operations/logs/filter.js.map +1 -1
- package/dist/esm/operations/metrics/index.d.ts +371 -0
- package/dist/esm/operations/metrics/index.js +478 -0
- package/dist/esm/operations/metrics/index.js.map +1 -0
- package/dist/esm/operations/metrics/tags.d.ts +148 -0
- package/dist/esm/operations/metrics/tags.js +235 -0
- package/dist/esm/operations/metrics/tags.js.map +1 -0
- package/package.json +6 -2
- package/specs/metrics-v1.json +1713 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025, Salesforce, Inc.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2
|
|
4
|
+
* For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { normalizeTenantId } from '../../clients/custom-apis.js';
|
|
7
|
+
import { getLogger } from '../../logging/logger.js';
|
|
8
|
+
/**
|
|
9
|
+
* Maps a {@link MetricsTagContext} filter field to the tag key it authoritatively
|
|
10
|
+
* sets when present. These override any value the string heuristics would infer.
|
|
11
|
+
*/
|
|
12
|
+
const FILTER_TAG_KEYS = [
|
|
13
|
+
['apiFamily', 'apiFamily'],
|
|
14
|
+
['apiName', 'apiName'],
|
|
15
|
+
['ocapiCategory', 'ocapiCategory'],
|
|
16
|
+
['ocapiApi', 'ocapiApi'],
|
|
17
|
+
['thirdPartyServiceId', 'thirdPartyServiceId'],
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* Splits a normalized tenant id (`bdpx_prd`) into its realm and environment.
|
|
21
|
+
* The environment is the final underscore-delimited segment; everything before
|
|
22
|
+
* it is the realm. Ids without an underscore yield just a realm.
|
|
23
|
+
*/
|
|
24
|
+
function splitRealmEnvironment(tenantId) {
|
|
25
|
+
const normalized = normalizeTenantId(tenantId);
|
|
26
|
+
const lastUnderscore = normalized.lastIndexOf('_');
|
|
27
|
+
if (lastUnderscore <= 0 || lastUnderscore === normalized.length - 1) {
|
|
28
|
+
return { realm: normalized };
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
realm: normalized.slice(0, lastUnderscore),
|
|
32
|
+
environment: normalized.slice(lastUnderscore + 1),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Strips a leading `realm.` or `realm ` prefix from a packed series id, if
|
|
37
|
+
* present. The Metrics API prefixes most ids with the realm using either a `.`
|
|
38
|
+
* or a space; this removes whichever is found so the category rule sees only the
|
|
39
|
+
* dimension remainder. Returns the input unchanged when no realm prefix matches.
|
|
40
|
+
*/
|
|
41
|
+
function stripRealmPrefix(seriesId, realm) {
|
|
42
|
+
if (seriesId.startsWith(`${realm}.`))
|
|
43
|
+
return seriesId.slice(realm.length + 1);
|
|
44
|
+
if (seriesId.startsWith(`${realm} `))
|
|
45
|
+
return seriesId.slice(realm.length + 1);
|
|
46
|
+
return seriesId;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Extractor for series whose remainder is a bare API family (`product`,
|
|
50
|
+
* `custom`, …) — but which may instead be an HTTP status class (`2xx`) or the
|
|
51
|
+
* metric's own fallback id. SCAPI mixes these within a single metric.
|
|
52
|
+
*/
|
|
53
|
+
const scapiFamilyOrStatus = (remainder) => {
|
|
54
|
+
if (/^[1-5]xx$/.test(remainder))
|
|
55
|
+
return { statusClass: remainder };
|
|
56
|
+
return { apiFamily: remainder };
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Per-category, per-metric extraction rules. Keyed by `category` then
|
|
60
|
+
* `metricId`; a category-level `*` entry applies to any metric not explicitly
|
|
61
|
+
* listed. Rules operate on the realm-stripped remainder (see
|
|
62
|
+
* {@link stripRealmPrefix}); returning `{}` means "no extra dimensions, just the
|
|
63
|
+
* context tags."
|
|
64
|
+
*/
|
|
65
|
+
const EXTRACTORS = {
|
|
66
|
+
scapi: {
|
|
67
|
+
// `bdpx.product` → apiFamily=product; `bdpx 2xx`/`bdpx 3xx` → statusClass
|
|
68
|
+
totalCalls: scapiFamilyOrStatus,
|
|
69
|
+
requestLatency: (remainder) => {
|
|
70
|
+
// `Average overall latency` is a rollup, not a per-family series.
|
|
71
|
+
if (/overall/i.test(remainder))
|
|
72
|
+
return { aggregation: 'overall' };
|
|
73
|
+
return { apiFamily: remainder };
|
|
74
|
+
},
|
|
75
|
+
responseCount: scapiFamilyOrStatus,
|
|
76
|
+
errors4xx: (remainder) => ({ apiFamily: remainder }),
|
|
77
|
+
// `bdpx.product HIT` / `bdpx.custom MISS` → apiFamily + cacheStatus
|
|
78
|
+
cacheHitRate: (remainder) => {
|
|
79
|
+
const spaceIdx = remainder.lastIndexOf(' ');
|
|
80
|
+
if (spaceIdx > 0) {
|
|
81
|
+
return { apiFamily: remainder.slice(0, spaceIdx), cacheStatus: remainder.slice(spaceIdx + 1) };
|
|
82
|
+
}
|
|
83
|
+
return { apiFamily: remainder };
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
ocapi: {
|
|
87
|
+
// `bdpx.shop` → ocapiCategory=shop
|
|
88
|
+
totalCalls: (remainder) => ({ ocapiCategory: remainder }),
|
|
89
|
+
callsMean: (remainder) => ({ ocapiCategory: remainder }),
|
|
90
|
+
},
|
|
91
|
+
controller: {
|
|
92
|
+
// `bdpx.Home-Show` → controller=Home-Show (applies to every controller metric)
|
|
93
|
+
'*': (remainder) => ({ controller: remainder }),
|
|
94
|
+
},
|
|
95
|
+
'third-party': {
|
|
96
|
+
// `bdpx.login.salesforce.com` → host; the host itself contains dots, so we
|
|
97
|
+
// treat the whole remainder as the host for call/latency metrics.
|
|
98
|
+
callsCount: (remainder) => ({ host: remainder }),
|
|
99
|
+
callsP95: (remainder) => ({ host: remainder }),
|
|
100
|
+
// `bdpx.host.socketReadTimeout` → host + exceptionType. The exception type is
|
|
101
|
+
// the final dot-segment; everything before it is the (dotted) host. This is
|
|
102
|
+
// only unambiguous because we key on the remoteExceptions metric.
|
|
103
|
+
remoteExceptions: (remainder) => {
|
|
104
|
+
const lastDot = remainder.lastIndexOf('.');
|
|
105
|
+
if (lastDot > 0) {
|
|
106
|
+
return { host: remainder.slice(0, lastDot), exceptionType: remainder.slice(lastDot + 1) };
|
|
107
|
+
}
|
|
108
|
+
return { host: remainder };
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
ecdn: {
|
|
112
|
+
// `2xx bdpx.host` (status class BEFORE the realm) → statusClass + host; other
|
|
113
|
+
// eCDN metrics are just `bdpx.host` → host. Operates on the raw id because
|
|
114
|
+
// the realm is not a leading prefix here.
|
|
115
|
+
successAndError: (_remainder, rawId, realm) => {
|
|
116
|
+
const spaceIdx = rawId.indexOf(' ');
|
|
117
|
+
if (spaceIdx > 0) {
|
|
118
|
+
const statusClass = rawId.slice(0, spaceIdx);
|
|
119
|
+
const host = stripRealmPrefix(rawId.slice(spaceIdx + 1), realm);
|
|
120
|
+
return { statusClass, host };
|
|
121
|
+
}
|
|
122
|
+
return { host: stripRealmPrefix(rawId, realm) };
|
|
123
|
+
},
|
|
124
|
+
'*': (remainder) => ({ host: remainder }),
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Extracts the dimension tags for a single series id.
|
|
129
|
+
*
|
|
130
|
+
* Combines three tiers, most-authoritative last:
|
|
131
|
+
* 1. **Request identity** — `realm`/`environment` from the tenant id (never parsed
|
|
132
|
+
* from the series string).
|
|
133
|
+
* 2. **String heuristics** — category/metric-specific dimensions parsed from the
|
|
134
|
+
* packed id (`apiFamily`, `host`, `cacheStatus`, …), or the raw remainder under
|
|
135
|
+
* `series` when no rule matches.
|
|
136
|
+
* 3. **Applied filters** — any filter that was sent with the request
|
|
137
|
+
* ({@link MetricsTagContext}) is stamped last, overriding a heuristic guess.
|
|
138
|
+
* This corrects drill-down ids: with `apiFamily=shopper` the server returns
|
|
139
|
+
* `bdpx.shopper.auth.v1`, which heuristics would mis-tag as
|
|
140
|
+
* `apiFamily: "shopper.auth.v1"`; the filter restores `apiFamily: "shopper"`.
|
|
141
|
+
*
|
|
142
|
+
* The result is always a superset of the request context and never throws.
|
|
143
|
+
*
|
|
144
|
+
* @param params - The series' category, metric id, series id, and request context
|
|
145
|
+
* @returns The extracted {@link MetricSeriesTags}
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```typescript
|
|
149
|
+
* parseSeriesTags({
|
|
150
|
+
* category: 'scapi', metricId: 'cacheHitRate',
|
|
151
|
+
* seriesId: 'bdpx.product HIT', context: {tenantId: 'f_ecom_bdpx_prd'},
|
|
152
|
+
* });
|
|
153
|
+
* // → { realm: 'bdpx', environment: 'prd', apiFamily: 'product', cacheStatus: 'HIT' }
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
export function parseSeriesTags(params) {
|
|
157
|
+
const { category, metricId, seriesId, context } = params;
|
|
158
|
+
const { realm, environment } = splitRealmEnvironment(context.tenantId);
|
|
159
|
+
const tags = { realm };
|
|
160
|
+
if (environment)
|
|
161
|
+
tags.environment = environment;
|
|
162
|
+
const categoryRules = EXTRACTORS[category];
|
|
163
|
+
const extractor = categoryRules?.[metricId] ?? categoryRules?.['*'];
|
|
164
|
+
const remainder = stripRealmPrefix(seriesId, realm);
|
|
165
|
+
if (extractor) {
|
|
166
|
+
Object.assign(tags, extractor(remainder, seriesId, realm));
|
|
167
|
+
}
|
|
168
|
+
else if (remainder && remainder !== metricId) {
|
|
169
|
+
// No rule for this category/metric. Preserve the (realm-stripped) remainder
|
|
170
|
+
// so nothing is lost, unless it is just the metric id echoed back (a
|
|
171
|
+
// value-less fallback series).
|
|
172
|
+
tags.series = remainder;
|
|
173
|
+
}
|
|
174
|
+
// Applied filters are authoritative — stamp them last so they override any
|
|
175
|
+
// heuristic guess from a drilled-down id.
|
|
176
|
+
for (const [field, key] of FILTER_TAG_KEYS) {
|
|
177
|
+
const value = context[field];
|
|
178
|
+
if (value)
|
|
179
|
+
tags[key] = value;
|
|
180
|
+
}
|
|
181
|
+
return tags;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Enriches a metrics response by adding a structured `tags` map to every series,
|
|
185
|
+
* in place-safe fashion (returns a new response; the input is not mutated).
|
|
186
|
+
*
|
|
187
|
+
* This is the batch counterpart to {@link parseSeriesTags}: it walks every
|
|
188
|
+
* metric and series and attaches `series.tags` derived from the series id, the
|
|
189
|
+
* metric id, the category, and the request context. Existing fields (`id`,
|
|
190
|
+
* `name`, `data`) are preserved exactly, so the enriched response is a
|
|
191
|
+
* structural superset — consumers that ignore `tags` are unaffected. The
|
|
192
|
+
* category must be supplied because a {@link MetricsDataResponse} does not carry
|
|
193
|
+
* it (it is implied by the endpoint that produced the response).
|
|
194
|
+
*
|
|
195
|
+
* @param response - The metrics response to enrich
|
|
196
|
+
* @param category - The metric category the response was fetched for
|
|
197
|
+
* @param context - The request identity used to derive `realm`/`environment`
|
|
198
|
+
* @returns A new response with `tags` added to each series
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```typescript
|
|
202
|
+
* const raw = await getScapiMetrics(client, tenantId);
|
|
203
|
+
* const enriched = enrichMetricsTags(raw, 'scapi', {tenantId});
|
|
204
|
+
* for (const metric of enriched.data) {
|
|
205
|
+
* for (const series of metric.dataSeries) {
|
|
206
|
+
* console.log(series.tags, series.data);
|
|
207
|
+
* }
|
|
208
|
+
* }
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
export function enrichMetricsTags(response, category, context) {
|
|
212
|
+
let unparsed = 0;
|
|
213
|
+
const data = (response.data ?? []).map((metric) => ({
|
|
214
|
+
...metric,
|
|
215
|
+
dataSeries: (metric.dataSeries ?? []).map((series) => {
|
|
216
|
+
const tags = parseSeriesTags({
|
|
217
|
+
category,
|
|
218
|
+
metricId: metric.metricId,
|
|
219
|
+
seriesId: series.id,
|
|
220
|
+
context,
|
|
221
|
+
});
|
|
222
|
+
// Count series where no dimension beyond identity was recovered, to log
|
|
223
|
+
// once about incomplete coverage without failing.
|
|
224
|
+
const hasDimension = Object.keys(tags).some((k) => k !== 'realm' && k !== 'environment');
|
|
225
|
+
if (!hasDimension)
|
|
226
|
+
unparsed++;
|
|
227
|
+
return { ...series, tags };
|
|
228
|
+
}),
|
|
229
|
+
}));
|
|
230
|
+
if (unparsed > 0) {
|
|
231
|
+
getLogger().debug({ unparsed, category, tenantId: context.tenantId }, 'enrichMetricsTags: some series yielded only identity tags (no category dimensions)');
|
|
232
|
+
}
|
|
233
|
+
return { ...response, data };
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=tags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tags.js","sourceRoot":"","sources":["../../../../src/operations/metrics/tags.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAqCH,OAAO,EAAC,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAC;AA2ClD;;;GAGG;AACH,MAAM,eAAe,GAA6C;IAChE,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC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 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/b2c-tooling-sdk",
|
|
3
3
|
"description": "Core tooling library for Salesforce B2C Commerce CLI",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.19.0",
|
|
5
5
|
"author": "Charles Lavery",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": "SalesforceCommerceCloud/b2c-developer-tooling",
|
|
@@ -96,6 +96,10 @@
|
|
|
96
96
|
"types": "./dist/esm/operations/cip/index.d.ts",
|
|
97
97
|
"default": "./dist/esm/operations/cip/index.js"
|
|
98
98
|
},
|
|
99
|
+
"./operations/metrics": {
|
|
100
|
+
"types": "./dist/esm/operations/metrics/index.d.ts",
|
|
101
|
+
"default": "./dist/esm/operations/metrics/index.js"
|
|
102
|
+
},
|
|
99
103
|
"./slas": {
|
|
100
104
|
"types": "./dist/esm/slas/index.d.ts",
|
|
101
105
|
"default": "./dist/esm/slas/index.js"
|
|
@@ -236,7 +240,7 @@
|
|
|
236
240
|
"xml2js": "0.6.2"
|
|
237
241
|
},
|
|
238
242
|
"scripts": {
|
|
239
|
-
"generate:types": "openapi-typescript specs/data-api.json -o src/clients/ocapi.generated.ts && openapi-typescript specs/slas-admin-v1.yaml -o src/clients/slas-admin.generated.ts && openapi-typescript specs/ods-api-v1.json -o src/clients/ods.generated.ts && openapi-typescript specs/mrt-api-v1.json -o src/clients/mrt.generated.ts && openapi-typescript specs/mrt-b2c.json -o src/clients/mrt-b2c.generated.ts && openapi-typescript specs/custom-apis-v1.yaml -o src/clients/custom-apis.generated.ts && openapi-typescript specs/scapi-schemas-v1.yaml -o src/clients/scapi-schemas.generated.ts && openapi-typescript specs/cdn-zones-v1.yaml -o src/clients/cdn-zones.generated.ts && openapi-typescript specs/am-users-api-v1.yaml -o src/clients/am-users-api.generated.ts && openapi-typescript specs/am-roles-api-v1.yaml -o src/clients/am-roles-api.generated.ts && openapi-typescript specs/am-apiclients-api-v1.yaml -o src/clients/am-apiclients-api.generated.ts && openapi-typescript specs/granular-replications-v1.yaml -o src/clients/granular-replications.generated.ts",
|
|
243
|
+
"generate:types": "openapi-typescript specs/data-api.json -o src/clients/ocapi.generated.ts && openapi-typescript specs/slas-admin-v1.yaml -o src/clients/slas-admin.generated.ts && openapi-typescript specs/ods-api-v1.json -o src/clients/ods.generated.ts && openapi-typescript specs/mrt-api-v1.json -o src/clients/mrt.generated.ts && openapi-typescript specs/mrt-b2c.json -o src/clients/mrt-b2c.generated.ts && openapi-typescript specs/custom-apis-v1.yaml -o src/clients/custom-apis.generated.ts && openapi-typescript specs/scapi-schemas-v1.yaml -o src/clients/scapi-schemas.generated.ts && openapi-typescript specs/cdn-zones-v1.yaml -o src/clients/cdn-zones.generated.ts && openapi-typescript specs/am-users-api-v1.yaml -o src/clients/am-users-api.generated.ts && openapi-typescript specs/am-roles-api-v1.yaml -o src/clients/am-roles-api.generated.ts && openapi-typescript specs/am-apiclients-api-v1.yaml -o src/clients/am-apiclients-api.generated.ts && openapi-typescript specs/granular-replications-v1.yaml -o src/clients/granular-replications.generated.ts && openapi-typescript specs/metrics-v1.json -o src/clients/metrics.generated.ts",
|
|
240
244
|
"build": "pnpm run generate:types && pnpm run build:esm",
|
|
241
245
|
"build:esm": "tsc -p tsconfig.esm.json",
|
|
242
246
|
"clean": "shx rm -rf dist",
|