fix(domain): fix telemetry endpoint, only add redirects for hosted version (#822)

* fix(otel): change back telemetry endpoint

* only add redirects for hosted version

---------

Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
This commit is contained in:
Waleed Latif
2025-07-29 17:10:06 -07:00
committed by GitHub
parent 8d7f3a50d1
commit 578129c6e6
5 changed files with 10 additions and 5 deletions

View File

@@ -86,7 +86,7 @@ async function forwardToCollector(data: any): Promise<boolean> {
return false
}
const endpoint = env.TELEMETRY_ENDPOINT || 'https://telemetry.sim.ai/v1/traces'
const endpoint = env.TELEMETRY_ENDPOINT || 'https://telemetry.simstudio.ai/v1/traces'
const timeout = DEFAULT_TIMEOUT
try {

View File

@@ -13,7 +13,7 @@ const Sentry = isProd ? require('@sentry/nextjs') : { captureRequestError: () =>
const logger = createLogger('OtelInstrumentation')
const DEFAULT_TELEMETRY_CONFIG = {
endpoint: env.TELEMETRY_ENDPOINT || 'https://telemetry.sim.ai/v1/traces',
endpoint: env.TELEMETRY_ENDPOINT || 'https://telemetry.simstudio.ai/v1/traces',
serviceName: 'sim-studio',
serviceVersion: '0.1.0',
serverSide: { enabled: true },

View File

@@ -30,7 +30,7 @@ export type TelemetryStatus = {
const TELEMETRY_STATUS_KEY = 'simstudio-telemetry-status'
let telemetryConfig = {
endpoint: env.TELEMETRY_ENDPOINT || 'https://telemetry.sim.ai/v1/traces',
endpoint: env.TELEMETRY_ENDPOINT || 'https://telemetry.simstudio.ai/v1/traces',
serviceName: 'sim-studio',
serviceVersion: '0.1.0',
}

View File

@@ -2,7 +2,7 @@ import path from 'path'
import { withSentryConfig } from '@sentry/nextjs'
import type { NextConfig } from 'next'
import { env, isTruthy } from './lib/env'
import { isDev, isProd } from './lib/environment'
import { isDev, isHosted, isProd } from './lib/environment'
import { getMainCSPPolicy, getWorkflowExecutionCSPPolicy } from './lib/security/csp'
const nextConfig: NextConfig = {
@@ -154,6 +154,11 @@ const nextConfig: NextConfig = {
]
},
async redirects() {
// Only enable domain redirects for the hosted version
if (!isHosted) {
return []
}
return [
{
source: '/((?!api|_next|_vercel|favicon|static|.*\\..*).*)',

View File

@@ -29,7 +29,7 @@ const config = {
* Endpoint URL where telemetry data is sent
* Change this if you want to send telemetry to your own collector
*/
endpoint: env.TELEMETRY_ENDPOINT || 'https://telemetry.sim.ai/v1/traces',
endpoint: env.TELEMETRY_ENDPOINT || 'https://telemetry.simstudio.ai/v1/traces',
/**
* Service name used to identify this instance