diff --git a/.github/workflows/deploy-service.yml b/.github/workflows/deploy-service.yml index f8257d52ee..794878ecad 100644 --- a/.github/workflows/deploy-service.yml +++ b/.github/workflows/deploy-service.yml @@ -54,6 +54,8 @@ jobs: - name: Build if: ${{ inputs.service == 'web' }} working-directory: app/web + env: + VITE_OTEL_EXPORTER_OTLP_ENDPOINT: ${{ env.VITE_SI_WORKSPACE_URL }} run: pnpm run build - name: Deploy diff --git a/app/web/src/main.ts b/app/web/src/main.ts index b06d0425d3..ef83a9c8d0 100644 --- a/app/web/src/main.ts +++ b/app/web/src/main.ts @@ -28,7 +28,7 @@ const { envVariables } = getProjectEnvVariables(); let otelEndpoint = envVariables.VITE_OTEL_EXPORTER_OTLP_ENDPOINT ?? import.meta.env.VITE_OTEL_EXPORTER_OTLP_ENDPOINT; -if (!otelEndpoint) otelEndpoint = window.location.host; +if (!otelEndpoint) otelEndpoint = window.location.hostname; const sdk = new HoneycombWebSDK({ endpoint: `${otelEndpoint}/v1/traces`, serviceName: "si-vue",