datadog-frontend-toolkit 1.0.8 → 1.0.9
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/cjs/resources/templates/slos.js +4 -14
- package/dist/cjs/resources/templates/slos.js.map +1 -1
- package/dist/cli/commands/setup.js +1 -1
- package/dist/esm/resources/templates/slos.js +4 -14
- package/dist/esm/resources/templates/slos.js.map +1 -1
- package/dist/resources/templates/slos.js +4 -14
- package/dist/resources/templates/slos.js.map +1 -1
- package/dist/types/resources/templates/slos.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.buildSloTemplates = buildSloTemplates;
|
|
8
|
+
// Note: Only metric monitors and synthetics monitors are supported for
|
|
9
|
+
// monitor-based SLOs. RUM alert and log alert monitors are NOT supported.
|
|
10
|
+
// The Frontend Availability SLO uses the error rate count monitor which
|
|
11
|
+
// is the most compatible option.
|
|
8
12
|
const SLO_MAPPINGS = [
|
|
9
13
|
{
|
|
10
14
|
monitorPattern: 'High Frontend Error Rate',
|
|
@@ -13,20 +17,6 @@ const SLO_MAPPINGS = [
|
|
|
13
17
|
target: 99.5,
|
|
14
18
|
warning: 99.9,
|
|
15
19
|
},
|
|
16
|
-
{
|
|
17
|
-
monitorPattern: 'JS Error Spike',
|
|
18
|
-
sloName: 'JS Error Stability',
|
|
19
|
-
sloDescription: 'Measures JavaScript error stability based on error spike monitor health.',
|
|
20
|
-
target: 99.0,
|
|
21
|
-
warning: 99.5,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
monitorPattern: 'Error Log Anomaly',
|
|
25
|
-
sloName: 'Error Log Health',
|
|
26
|
-
sloDescription: 'Measures error log health based on error log anomaly monitor.',
|
|
27
|
-
target: 99.0,
|
|
28
|
-
warning: 99.5,
|
|
29
|
-
},
|
|
30
20
|
];
|
|
31
21
|
function buildSloTemplates(service, env, monitorIds, team) {
|
|
32
22
|
const tags = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slos.js","sourceRoot":"","sources":["../../../../src/resources/templates/slos.ts"],"names":[],"mappings":";AAAA;;;GAGG;;
|
|
1
|
+
{"version":3,"file":"slos.js","sourceRoot":"","sources":["../../../../src/resources/templates/slos.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAkCH,8CA8BC;AA5CD,uEAAuE;AACvE,0EAA0E;AAC1E,wEAAwE;AACxE,iCAAiC;AACjC,MAAM,YAAY,GAAwB;IACxC;QACE,cAAc,EAAE,0BAA0B;QAC1C,OAAO,EAAE,uBAAuB;QAChC,cAAc,EAAE,oEAAoE;QACpF,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;KACd;CACF,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,OAAe,EACf,GAAW,EACX,UAA0C,EAC1C,IAAa;IAEb,MAAM,IAAI,GAAG;QACX,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAClC,CAAC;IAEF,MAAM,IAAI,GAAkB,EAAE,CAAC;IAE/B,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE,CAAC;QACnC,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;QAChF,IAAI,CAAC,OAAO;YAAE,SAAS;QAEvB,IAAI,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,UAAU,OAAO,KAAK,GAAG,OAAO,OAAO,CAAC,OAAO,EAAE;YACvD,WAAW,EAAE,GAAG,OAAO,CAAC,cAAc,uCAAuC;YAC7E,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;YACzB,UAAU,EAAE;gBACV,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE;gBACrE,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE;aACvE;YACD,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -52,7 +52,7 @@ async function setup(options) {
|
|
|
52
52
|
console.log(' Resources to provision:');
|
|
53
53
|
dashboards = await (0, prompt_1.confirm)(' Create Dashboard?');
|
|
54
54
|
monitors = await (0, prompt_1.confirm)(' Create Monitors (6)?');
|
|
55
|
-
slos = await (0, prompt_1.confirm)(' Create SLOs (
|
|
55
|
+
slos = await (0, prompt_1.confirm)(' Create SLOs (1)?');
|
|
56
56
|
}
|
|
57
57
|
const provisioningConfig = {
|
|
58
58
|
apiKey,
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* SLO templates for Datadog API provisioning.
|
|
3
3
|
* Uses monitor-based SLOs that reference the provisioned RUM monitors.
|
|
4
4
|
*/
|
|
5
|
+
// Note: Only metric monitors and synthetics monitors are supported for
|
|
6
|
+
// monitor-based SLOs. RUM alert and log alert monitors are NOT supported.
|
|
7
|
+
// The Frontend Availability SLO uses the error rate count monitor which
|
|
8
|
+
// is the most compatible option.
|
|
5
9
|
const SLO_MAPPINGS = [
|
|
6
10
|
{
|
|
7
11
|
monitorPattern: 'High Frontend Error Rate',
|
|
@@ -10,20 +14,6 @@ const SLO_MAPPINGS = [
|
|
|
10
14
|
target: 99.5,
|
|
11
15
|
warning: 99.9,
|
|
12
16
|
},
|
|
13
|
-
{
|
|
14
|
-
monitorPattern: 'JS Error Spike',
|
|
15
|
-
sloName: 'JS Error Stability',
|
|
16
|
-
sloDescription: 'Measures JavaScript error stability based on error spike monitor health.',
|
|
17
|
-
target: 99.0,
|
|
18
|
-
warning: 99.5,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
monitorPattern: 'Error Log Anomaly',
|
|
22
|
-
sloName: 'Error Log Health',
|
|
23
|
-
sloDescription: 'Measures error log health based on error log anomaly monitor.',
|
|
24
|
-
target: 99.0,
|
|
25
|
-
warning: 99.5,
|
|
26
|
-
},
|
|
27
17
|
];
|
|
28
18
|
export function buildSloTemplates(service, env, monitorIds, team) {
|
|
29
19
|
const tags = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slos.js","sourceRoot":"","sources":["../../../../src/resources/templates/slos.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAoBH,MAAM,YAAY,GAAwB;IACxC;QACE,cAAc,EAAE,0BAA0B;QAC1C,OAAO,EAAE,uBAAuB;QAChC,cAAc,EAAE,oEAAoE;QACpF,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;KACd;
|
|
1
|
+
{"version":3,"file":"slos.js","sourceRoot":"","sources":["../../../../src/resources/templates/slos.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAoBH,uEAAuE;AACvE,0EAA0E;AAC1E,wEAAwE;AACxE,iCAAiC;AACjC,MAAM,YAAY,GAAwB;IACxC;QACE,cAAc,EAAE,0BAA0B;QAC1C,OAAO,EAAE,uBAAuB;QAChC,cAAc,EAAE,oEAAoE;QACpF,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;KACd;CACF,CAAC;AAEF,MAAM,UAAU,iBAAiB,CAC/B,OAAe,EACf,GAAW,EACX,UAA0C,EAC1C,IAAa;IAEb,MAAM,IAAI,GAAG;QACX,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAClC,CAAC;IAEF,MAAM,IAAI,GAAkB,EAAE,CAAC;IAE/B,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE,CAAC;QACnC,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;QAChF,IAAI,CAAC,OAAO;YAAE,SAAS;QAEvB,IAAI,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,UAAU,OAAO,KAAK,GAAG,OAAO,OAAO,CAAC,OAAO,EAAE;YACvD,WAAW,EAAE,GAAG,OAAO,CAAC,cAAc,uCAAuC;YAC7E,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;YACzB,UAAU,EAAE;gBACV,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE;gBACrE,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE;aACvE;YACD,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.buildSloTemplates = buildSloTemplates;
|
|
8
|
+
// Note: Only metric monitors and synthetics monitors are supported for
|
|
9
|
+
// monitor-based SLOs. RUM alert and log alert monitors are NOT supported.
|
|
10
|
+
// The Frontend Availability SLO uses the error rate count monitor which
|
|
11
|
+
// is the most compatible option.
|
|
8
12
|
const SLO_MAPPINGS = [
|
|
9
13
|
{
|
|
10
14
|
monitorPattern: 'High Frontend Error Rate',
|
|
@@ -13,20 +17,6 @@ const SLO_MAPPINGS = [
|
|
|
13
17
|
target: 99.5,
|
|
14
18
|
warning: 99.9,
|
|
15
19
|
},
|
|
16
|
-
{
|
|
17
|
-
monitorPattern: 'JS Error Spike',
|
|
18
|
-
sloName: 'JS Error Stability',
|
|
19
|
-
sloDescription: 'Measures JavaScript error stability based on error spike monitor health.',
|
|
20
|
-
target: 99.0,
|
|
21
|
-
warning: 99.5,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
monitorPattern: 'Error Log Anomaly',
|
|
25
|
-
sloName: 'Error Log Health',
|
|
26
|
-
sloDescription: 'Measures error log health based on error log anomaly monitor.',
|
|
27
|
-
target: 99.0,
|
|
28
|
-
warning: 99.5,
|
|
29
|
-
},
|
|
30
20
|
];
|
|
31
21
|
function buildSloTemplates(service, env, monitorIds, team) {
|
|
32
22
|
const tags = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slos.js","sourceRoot":"","sources":["../../../src/resources/templates/slos.ts"],"names":[],"mappings":";AAAA;;;GAGG;;
|
|
1
|
+
{"version":3,"file":"slos.js","sourceRoot":"","sources":["../../../src/resources/templates/slos.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAkCH,8CA8BC;AA5CD,uEAAuE;AACvE,0EAA0E;AAC1E,wEAAwE;AACxE,iCAAiC;AACjC,MAAM,YAAY,GAAwB;IACxC;QACE,cAAc,EAAE,0BAA0B;QAC1C,OAAO,EAAE,uBAAuB;QAChC,cAAc,EAAE,oEAAoE;QACpF,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;KACd;CACF,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,OAAe,EACf,GAAW,EACX,UAA0C,EAC1C,IAAa;IAEb,MAAM,IAAI,GAAG;QACX,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAClC,CAAC;IAEF,MAAM,IAAI,GAAkB,EAAE,CAAC;IAE/B,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE,CAAC;QACnC,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,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,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"slos.d.ts","sourceRoot":"","sources":["../../../../src/resources/templates/slos.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3E,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAgBD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,UAAU,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,EAC1C,IAAI,CAAC,EAAE,MAAM,GACZ,WAAW,EAAE,CAyBf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datadog-frontend-toolkit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Enterprise-grade, framework-agnostic frontend observability toolkit for Datadog. Auto-instruments RUM, Logs, Error Tracking, Performance Monitoring, and provisions Dashboards, Monitors & SLOs.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|