From b230e3173af73b4ca516c4993b2ff9ca9e0b6354 Mon Sep 17 00:00:00 2001 From: Qin Guan Date: Sat, 3 Feb 2024 14:49:18 +0800 Subject: [PATCH] feat: add application version to newrelic --- plugins/new-relic.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/new-relic.ts b/plugins/new-relic.ts index 52ecb44..6240799 100644 --- a/plugins/new-relic.ts +++ b/plugins/new-relic.ts @@ -1,6 +1,7 @@ import { BrowserAgent } from '@newrelic/browser-agent/loaders/browser-agent' export default defineNuxtPlugin(() => { + const appConfig = useAppConfig() const { public: config } = useRuntimeConfig() const options = { @@ -10,6 +11,7 @@ export default defineNuxtPlugin(() => { } const newrelic = new BrowserAgent(options) + newrelic.setApplicationVersion(`${appConfig.buildInfo.version}-${appConfig.buildInfo.commit}`) return { provide: {