Răsfoiți Sursa

hyperdx: session replays — õige HYPERDX_API_KEY + brauseri collector-URL (config) + nutikodu-web SDK

Ardo 3 săptămâni în urmă
părinte
comite
29c1a260ed
2 a modificat fișierele cu 19 adăugiri și 1 ștergeri
  1. 3 1
      dev/docker-compose.yml
  2. 16 0
      dev/nutikodu-web/static/index.html

+ 3 - 1
dev/docker-compose.yml

@@ -134,8 +134,10 @@ services:
       - HYPERDX_APP_URL=http://100.87.1.24:18080
       - HYPERDX_APP_PORT=8080
       - HYPERDX_API_PORT=8000
-      - HYPERDX_API_KEY=790900ff1b76521b3626450576b78715
+      - HYPERDX_API_KEY=02a19ecf-f62e-4e17-819f-3ee1498d69f3
       - NEXT_PUBLIC_IS_LOCAL_MODE=false
+      # Brauseri (session replay) collector-URL peab olema kliendist kättesaadav (mitte localhost).
+      - NEXT_PUBLIC_OTEL_EXPORTER_OTLP_ENDPOINT=http://100.87.1.24:4318
       - EXPRESS_SESSION_SECRET=dev_session_secret_2026
       - CLICKHOUSE_ENDPOINT=tcp://clickhouse:9000?dial_timeout=10s
       - CLICKHOUSE_USER=default

+ 16 - 0
dev/nutikodu-web/static/index.html

@@ -65,5 +65,21 @@
 
   <script src="/vendor/echarts.min.js"></script>
   <script src="/app.js"></script>
+
+  <!-- HyperDX Browser Integration: session replays + RUM (vt LOEMIND) -->
+  <script src="https://unpkg.com/@hyperdx/browser@0.26.0/build/index.js"></script>
+  <script>
+    if (window.HyperDX) {
+      HyperDX.init({
+        apiKey: '02a19ecf-f62e-4e17-819f-3ee1498d69f3',
+        service: 'nutikodu-web',
+        url: 'https://otel.odamus.com',
+        consoleCapture: true,
+        advancedNetworkCapture: true,
+        maskAllInputs: true,
+        maskAllText: true,
+      });
+    }
+  </script>
 </body>
 </html>