feat(web): npm i @azure/monitor-opentelemetry

This commit is contained in:
Collin Barrett 2025-06-13 19:08:11 -05:00
parent eb038c69ed
commit 30bf6c5d71
3 changed files with 11 additions and 0 deletions

BIN
web/package-lock.json generated

Binary file not shown.

View file

@ -9,12 +9,14 @@
"lint": "next lint"
},
"dependencies": {
"@azure/monitor-opentelemetry": "^1.11.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.514.0",
"next": "15.3.3",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"server-only": "^0.0.1",
"tailwind-merge": "^3.3.1"
},
"devDependencies": {

View file

@ -0,0 +1,9 @@
import "server-only";
import { useAzureMonitor } from "@azure/monitor-opentelemetry";
export function register() {
if (process.env.APPLICATIONINSIGHTS_CONNECTION_STRING) {
// eslint-disable-next-line react-hooks/rules-of-hooks
useAzureMonitor();
}
}