Skip to content

Commit 578129c

Browse files
waleedlatif1waleedlatif
andauthored
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>
1 parent 8d7f3a5 commit 578129c

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

apps/sim/app/api/telemetry/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ async function forwardToCollector(data: any): Promise<boolean> {
8686
return false
8787
}
8888

89-
const endpoint = env.TELEMETRY_ENDPOINT || 'https://telemetry.sim.ai/v1/traces'
89+
const endpoint = env.TELEMETRY_ENDPOINT || 'https://telemetry.simstudio.ai/v1/traces'
9090
const timeout = DEFAULT_TIMEOUT
9191

9292
try {

apps/sim/instrumentation-node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const Sentry = isProd ? require('@sentry/nextjs') : { captureRequestError: () =>
1313
const logger = createLogger('OtelInstrumentation')
1414

1515
const DEFAULT_TELEMETRY_CONFIG = {
16-
endpoint: env.TELEMETRY_ENDPOINT || 'https://telemetry.sim.ai/v1/traces',
16+
endpoint: env.TELEMETRY_ENDPOINT || 'https://telemetry.simstudio.ai/v1/traces',
1717
serviceName: 'sim-studio',
1818
serviceVersion: '0.1.0',
1919
serverSide: { enabled: true },

apps/sim/lib/telemetry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export type TelemetryStatus = {
3030
const TELEMETRY_STATUS_KEY = 'simstudio-telemetry-status'
3131

3232
let telemetryConfig = {
33-
endpoint: env.TELEMETRY_ENDPOINT || 'https://telemetry.sim.ai/v1/traces',
33+
endpoint: env.TELEMETRY_ENDPOINT || 'https://telemetry.simstudio.ai/v1/traces',
3434
serviceName: 'sim-studio',
3535
serviceVersion: '0.1.0',
3636
}

apps/sim/next.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path'
22
import { withSentryConfig } from '@sentry/nextjs'
33
import type { NextConfig } from 'next'
44
import { env, isTruthy } from './lib/env'
5-
import { isDev, isProd } from './lib/environment'
5+
import { isDev, isHosted, isProd } from './lib/environment'
66
import { getMainCSPPolicy, getWorkflowExecutionCSPPolicy } from './lib/security/csp'
77

88
const nextConfig: NextConfig = {
@@ -154,6 +154,11 @@ const nextConfig: NextConfig = {
154154
]
155155
},
156156
async redirects() {
157+
// Only enable domain redirects for the hosted version
158+
if (!isHosted) {
159+
return []
160+
}
161+
157162
return [
158163
{
159164
source: '/((?!api|_next|_vercel|favicon|static|.*\\..*).*)',

apps/sim/telemetry.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const config = {
2929
* Endpoint URL where telemetry data is sent
3030
* Change this if you want to send telemetry to your own collector
3131
*/
32-
endpoint: env.TELEMETRY_ENDPOINT || 'https://telemetry.sim.ai/v1/traces',
32+
endpoint: env.TELEMETRY_ENDPOINT || 'https://telemetry.simstudio.ai/v1/traces',
3333

3434
/**
3535
* Service name used to identify this instance

0 commit comments

Comments
 (0)