@backstage-community/plugin-analytics-module-newrelic-browser 0.21.0 → 0.22.1
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/CHANGELOG.md +12 -0
- package/config.schema.json +103 -0
- package/dist/module.esm.js +1 -1
- package/dist/module.esm.js.map +1 -1
- package/package.json +10 -9
- package/config.d.ts +0 -96
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @backstage-community/plugin-analytics-module-newrelic-browser
|
|
2
2
|
|
|
3
|
+
## 0.22.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7c6b73e: Export the analytics implementation extension from each module, so it can be referenced directly rather than only through the module that carries it. Added tests covering the APIs each implementation asks the app to inject and the analytics client it builds.
|
|
8
|
+
|
|
9
|
+
## 0.22.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 70ce2a9: Backstage version bump to v1.54.5
|
|
14
|
+
|
|
3
15
|
## 0.21.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"app": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"analytics": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"newRelic": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"endpoint": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Data ingestion endpoint to use. Standard New Relic endpoints are bam.nr-data.net (US) or bam.eu01.nr-data.net (EU). A custom endpoint can also be provided, for example when routing through an internal proxy.",
|
|
17
|
+
"visibility": "frontend"
|
|
18
|
+
},
|
|
19
|
+
"accountId": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "New Relic Account ID, e.g. 1234567",
|
|
22
|
+
"visibility": "frontend"
|
|
23
|
+
},
|
|
24
|
+
"applicationId": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "New Relic Application ID, e.g. 987654321",
|
|
27
|
+
"visibility": "frontend"
|
|
28
|
+
},
|
|
29
|
+
"licenseKey": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "New Relic License Key, e.g. NRJS-12a3456bc78de9123f4",
|
|
32
|
+
"visibility": "frontend"
|
|
33
|
+
},
|
|
34
|
+
"distributedTracingEnabled": {
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"description": "Whether to enabled distributed tracing, defaults to false",
|
|
37
|
+
"visibility": "frontend"
|
|
38
|
+
},
|
|
39
|
+
"cookiesEnabled": {
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"description": "Whether to enabled tracing of cookies, defaults to false",
|
|
42
|
+
"visibility": "frontend"
|
|
43
|
+
},
|
|
44
|
+
"sessionReplay": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"properties": {
|
|
47
|
+
"enabled": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"description": "Whether to enable Session Replay, defaults to false"
|
|
50
|
+
},
|
|
51
|
+
"samplingRate": {
|
|
52
|
+
"type": "number",
|
|
53
|
+
"description": "Sampling rate for session replay, defaults to 0"
|
|
54
|
+
},
|
|
55
|
+
"errorSamplingRate": {
|
|
56
|
+
"type": "number",
|
|
57
|
+
"description": "Error sampling rate for session replay, defaults to 100"
|
|
58
|
+
},
|
|
59
|
+
"maskTextSelector": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"description": "Whether to mask all inputs, defaults to false"
|
|
62
|
+
},
|
|
63
|
+
"maskAllInputs": {
|
|
64
|
+
"type": "boolean",
|
|
65
|
+
"description": "Whether to mask all inputs, defaults to true"
|
|
66
|
+
},
|
|
67
|
+
"collectFonts": {
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"description": "Whether to collect fonts, defaults to true"
|
|
70
|
+
},
|
|
71
|
+
"blockSelector": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"description": "Block selector for session replay, defaults to true"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": [
|
|
77
|
+
"enabled"
|
|
78
|
+
],
|
|
79
|
+
"description": "Session Replay configuration",
|
|
80
|
+
"deepVisibility": "frontend"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": [
|
|
84
|
+
"endpoint",
|
|
85
|
+
"accountId",
|
|
86
|
+
"applicationId",
|
|
87
|
+
"licenseKey",
|
|
88
|
+
"distributedTracingEnabled",
|
|
89
|
+
"cookiesEnabled"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"required": [
|
|
94
|
+
"newRelic"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"required": [
|
|
101
|
+
"app"
|
|
102
|
+
]
|
|
103
|
+
}
|
package/dist/module.esm.js
CHANGED
package/dist/module.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.esm.js","sources":["../src/module.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n configApiRef,\n createFrontendModule,\n identityApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { AnalyticsImplementationBlueprint } from '@backstage/plugin-app-react';\n\nimport { NewRelicBrowser } from './apis/implementations/AnalyticsApi';\n\
|
|
1
|
+
{"version":3,"file":"module.esm.js","sources":["../src/module.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n configApiRef,\n createFrontendModule,\n identityApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { AnalyticsImplementationBlueprint } from '@backstage/plugin-app-react';\n\nimport { NewRelicBrowser } from './apis/implementations/AnalyticsApi';\n\nexport const newRelicBrowserImplementation =\n AnalyticsImplementationBlueprint.make({\n name: 'newrelic-browser',\n params: defineParams =>\n defineParams({\n deps: { configApi: configApiRef, identityApi: identityApiRef },\n factory: ({ configApi, identityApi }) =>\n NewRelicBrowser.fromConfig(configApi, { identityApi }),\n }),\n });\n\n/**\n * @public\n */\nexport const newRelicBrowserModule = createFrontendModule({\n pluginId: 'app',\n extensions: [newRelicBrowserImplementation],\n});\n"],"names":[],"mappings":";;;;AAwBO,MAAM,6BAAA,GACX,iCAAiC,IAAA,CAAK;AAAA,EACpC,IAAA,EAAM,kBAAA;AAAA,EACN,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,IAAA,EAAM,EAAE,SAAA,EAAW,YAAA,EAAc,aAAa,cAAA,EAAe;AAAA,IAC7D,OAAA,EAAS,CAAC,EAAE,SAAA,EAAW,WAAA,EAAY,KACjC,eAAA,CAAgB,UAAA,CAAW,SAAA,EAAW,EAAE,WAAA,EAAa;AAAA,GACxD;AACL,CAAC;AAKI,MAAM,wBAAwB,oBAAA,CAAqB;AAAA,EACxD,QAAA,EAAU,KAAA;AAAA,EACV,UAAA,EAAY,CAAC,6BAA6B;AAC5C,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-analytics-module-newrelic-browser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.1",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "frontend-plugin-module",
|
|
6
6
|
"pluginId": "app",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"types": "./dist/index.d.ts",
|
|
48
48
|
"files": [
|
|
49
49
|
"dist",
|
|
50
|
-
"config.
|
|
50
|
+
"config.schema.json"
|
|
51
51
|
],
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "backstage-cli package build",
|
|
@@ -60,15 +60,16 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@backstage/config": "^1.3.8",
|
|
63
|
-
"@backstage/core-components": "^0.18.
|
|
64
|
-
"@backstage/core-plugin-api": "^1.12.
|
|
65
|
-
"@backstage/frontend-plugin-api": "^0.
|
|
66
|
-
"@backstage/plugin-app-react": "^0.2.
|
|
63
|
+
"@backstage/core-components": "^0.18.13",
|
|
64
|
+
"@backstage/core-plugin-api": "^1.12.9",
|
|
65
|
+
"@backstage/frontend-plugin-api": "^0.18.0",
|
|
66
|
+
"@backstage/plugin-app-react": "^0.2.6",
|
|
67
67
|
"@newrelic/browser-agent": "^1.295.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@backstage/cli": "^0.36.
|
|
71
|
-
"@backstage/dev-utils": "^1.1.
|
|
70
|
+
"@backstage/cli": "^0.36.5",
|
|
71
|
+
"@backstage/dev-utils": "^1.1.26",
|
|
72
|
+
"@backstage/frontend-test-utils": "^0.6.3",
|
|
72
73
|
"@testing-library/jest-dom": "^6.0.0",
|
|
73
74
|
"@testing-library/react": "^16.0.0",
|
|
74
75
|
"@types/react": "^18.2.58",
|
|
@@ -78,6 +79,6 @@
|
|
|
78
79
|
"peerDependencies": {
|
|
79
80
|
"react": "^16.13.1 || ^17.0.0 || ^18.0.0"
|
|
80
81
|
},
|
|
81
|
-
"configSchema": "config.
|
|
82
|
+
"configSchema": "config.schema.json",
|
|
82
83
|
"module": "./dist/index.esm.js"
|
|
83
84
|
}
|
package/config.d.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2023 The Backstage Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
export interface Config {
|
|
18
|
-
app: {
|
|
19
|
-
analytics?: {
|
|
20
|
-
newRelic: {
|
|
21
|
-
/**
|
|
22
|
-
* Data ingestion endpoint to use. Standard New Relic endpoints are
|
|
23
|
-
* bam.nr-data.net (US) or bam.eu01.nr-data.net (EU). A custom endpoint
|
|
24
|
-
* can also be provided, for example when routing through an internal proxy.
|
|
25
|
-
* @visibility frontend
|
|
26
|
-
*/
|
|
27
|
-
endpoint: 'bam.eu01.nr-data.net' | 'bam.nr-data.net' | string;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* New Relic Account ID, e.g. 1234567
|
|
31
|
-
* @visibility frontend
|
|
32
|
-
*/
|
|
33
|
-
accountId: string;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* New Relic Application ID, e.g. 987654321
|
|
37
|
-
* @visibility frontend
|
|
38
|
-
*/
|
|
39
|
-
applicationId: string;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* New Relic License Key, e.g. NRJS-12a3456bc78de9123f4
|
|
43
|
-
* @visibility frontend
|
|
44
|
-
*/
|
|
45
|
-
licenseKey: string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Whether to enabled distributed tracing, defaults to false
|
|
49
|
-
* @visibility frontend
|
|
50
|
-
*/
|
|
51
|
-
distributedTracingEnabled: boolean;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Whether to enabled tracing of cookies, defaults to false
|
|
55
|
-
* @visibility frontend
|
|
56
|
-
*/
|
|
57
|
-
cookiesEnabled: boolean;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Session Replay configuration
|
|
61
|
-
* @deepVisibility frontend
|
|
62
|
-
*/
|
|
63
|
-
sessionReplay?: {
|
|
64
|
-
/**
|
|
65
|
-
* Whether to enable Session Replay, defaults to false
|
|
66
|
-
*/
|
|
67
|
-
enabled: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Sampling rate for session replay, defaults to 0
|
|
70
|
-
*/
|
|
71
|
-
samplingRate?: number;
|
|
72
|
-
/**
|
|
73
|
-
* Error sampling rate for session replay, defaults to 100
|
|
74
|
-
*/
|
|
75
|
-
errorSamplingRate?: number;
|
|
76
|
-
/**
|
|
77
|
-
* Whether to mask all inputs, defaults to false
|
|
78
|
-
*/
|
|
79
|
-
maskTextSelector?: string;
|
|
80
|
-
/**
|
|
81
|
-
* Whether to mask all inputs, defaults to true
|
|
82
|
-
*/
|
|
83
|
-
maskAllInputs?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Whether to collect fonts, defaults to true
|
|
86
|
-
*/
|
|
87
|
-
collectFonts?: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Block selector for session replay, defaults to true
|
|
90
|
-
*/
|
|
91
|
-
blockSelector?: string;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
}
|