fix: make connectionString optional

This commit is contained in:
Arvid Norlin
2024-07-01 13:33:28 +02:00
parent be2817c83a
commit 2a71a45d3d
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -1,7 +1,10 @@
import { env } from "./env/server"
export async function register() {
if (process.env.NEXT_RUNTIME === "nodejs") {
if (
process.env.NEXT_RUNTIME === "nodejs" &&
env.APPLICATION_INSIGHTS_CONNECTION_STRING
) {
const { AzureMonitorTraceExporter } = await import(
"@azure/monitor-opentelemetry-exporter"
)