Renamed config settings

Signed-off-by: Jonathan Mezach <jonathan.mezach@rr-wfm.com>
This commit is contained in:
Jonathan Mezach
2023-07-20 14:54:06 +02:00
parent 8944880a2d
commit 5bbee4c954
4 changed files with 15 additions and 15 deletions
@@ -47,7 +47,7 @@ in New Relic Browser using the Copy/Paste method.
# app-config.yaml
app:
analytics:
nr:
newRelic:
endpoint: 'bam.nr-data.net',
accountId: '1234567'
applicationId: '987654321'
@@ -64,7 +64,7 @@ By default the distributed tracing and cookies features are disabled. You can en
# app-config.yaml
app:
analytics:
nr:
newRelic:
...
distributedTracing: true
cookiesEnabled: true
@@ -109,9 +109,9 @@ make and test changes is to do the following:
2. Install all dependencies `yarn install`
3. If one does not exist, create an `app-config.local.yaml` file in the root of
the monorepo and add config for this plugin (see below)
4. Enter this plugin's working directory: `cd plugins/analytics-provider-nr`
4. Enter this plugin's working directory: `cd plugins/analytics-provider-newrelic-browser`
5. Start the plugin in isolation: `yarn start`
6. Navigate to the playground page at `http://localhost:3000/nr`
6. Navigate to the playground page at `http://localhost:3000/newrelic`
7. Open the web console to see events fire when you navigate or when you
interact with instrumented components.
@@ -125,7 +125,7 @@ Paste this into your `app-config.local.yaml` while developing this plugin:
```yaml
app:
analytics:
nr:
newRelic:
accountId: '1234567'
applicationId: '987654321'
licenseKey: 'NRJS-12a3456bc78de9123f4'
+1 -1
View File
@@ -17,7 +17,7 @@
export interface Config {
app: {
analytics?: {
nr: {
newRelic: {
/**
* Data ingestion endpoint to use, either bam.eu01.nr-data.net (EU) or bam.nr-data.net (US)
* @visibility frontend
@@ -33,7 +33,7 @@ createDevApp()
}),
})
.addPage({
path: '/nr',
path: '/newrelic',
title: 'New Relic Playground',
element: <Playground />,
})
@@ -102,17 +102,17 @@ export class NewRelicBrowser implements AnalyticsApi {
| ((userEntityRef: string) => Promise<string>);
},
) {
const newRelicBrowserConfig = config.getConfig('app.analytics.newRelic');
const browserOptions: NewRelicBrowserOptions = {
endpoint: config.getString('app.analytics.nr.endpoint'),
accountId: config.getString('app.analytics.nr.accountId'),
applicationId: config.getString('app.analytics.nr.applicationId'),
licenseKey: config.getString('app.analytics.nr.licenseKey'),
endpoint: newRelicBrowserConfig.getString('endpoint'),
accountId: newRelicBrowserConfig.getString('accountId'),
applicationId: newRelicBrowserConfig.getString('applicationId'),
licenseKey: newRelicBrowserConfig.getString('licenseKey'),
distributedTracingEnabled:
config.getOptionalBoolean(
'app.analytics.nr.distributedTracingEnabled',
) ?? false,
newRelicBrowserConfig.getOptionalBoolean('distributedTracingEnabled') ??
false,
cookiesEnabled:
config.getOptionalBoolean('app.analytics.nr.cookiesEnabled') ?? false,
newRelicBrowserConfig.getOptionalBoolean('cookiesEnabled') ?? false,
};
return new NewRelicBrowser(
browserOptions,