Skip to content

Commit

Permalink
fix: nr rum
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-guan committed Jan 29, 2024
1 parent b0b0aab commit 8ee21f8
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 11 deletions.
16 changes: 5 additions & 11 deletions nuxt.config.ts

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@cloudflare/workers-types": "^4.20231218.0",
"@growthbook/growthbook": "^0.31.0",
"@libsql/client": "^0.3.6",
"@newrelic/browser-agent": "^1.251.0",
"@nuxt/devtools": "latest",
"@nuxt/ui": "^2.11.1",
"@paralleldrive/cuid2": "^2.2.2",
Expand Down
13 changes: 13 additions & 0 deletions plugins/new-relic.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { BrowserAgent } from '@newrelic/browser-agent/loaders/browser-agent'

export default defineNuxtPlugin(() => {
const { public: config } = useRuntimeConfig()

const options = {
init: { distributed_tracing: { enabled: true }, privacy: { cookies_enabled: true }, ajax: { deny_list: ['bam.eu01.nr-data.net'] } },
info: { beacon: 'bam.eu01.nr-data.net', errorBeacon: 'bam.eu01.nr-data.net', licenseKey: 'NRJS-1b1f41c1d6baafe183c', applicationID: config.newRelic.applicationId, sa: 1 },
loader_config: { accountID: '4337277', trustKey: '4337277', agentID: '538559115', licenseKey: 'NRJS-1b1f41c1d6baafe183c', applicationID: config.newRelic.applicationId },
}

const _ = new BrowserAgent(options)
})
76 changes: 76 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8ee21f8

Please # to comment.