mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 23:17:59 -05:00
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:
@@ -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 {
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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',
|
||||
}
|
||||
|
||||
@@ -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|.*\\..*).*)',
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user