mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-28 03:00:29 -04:00
* v1 queuing system * working async queue * working impl of sync + async request formats * fix tests * fix rate limit calc * fix rate limiting issues * regen migration * fix test * fix instrumentation script issues * remove use workflow queue env var * make modal have async examples * Remove conflicting 54th migration before merging staging * new migration files * remove console log * update modal correctly * working sync executor * works for sync * remove useless stats endpoint * fix tests * add sync exec timeout * working impl with cron job * migrate to trigger.dev * remove migration * remove unused code * update readme * restructure jobs API response * add logging for async execs * improvement: example ui/ux * use getBaseUrl() func --------- Co-authored-by: Waleed Latif <walif6@gmail.com> Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
33 lines
1.2 KiB
TypeScript
33 lines
1.2 KiB
TypeScript
export async function register() {
|
|
console.log('[Main Instrumentation] register() called, environment:', {
|
|
NEXT_RUNTIME: process.env.NEXT_RUNTIME,
|
|
NODE_ENV: process.env.NODE_ENV,
|
|
})
|
|
|
|
// Load Node.js-specific instrumentation
|
|
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
|
console.log('[Main Instrumentation] Loading Node.js instrumentation...')
|
|
const nodeInstrumentation = await import('./instrumentation-node')
|
|
if (nodeInstrumentation.register) {
|
|
console.log('[Main Instrumentation] Calling Node.js register()...')
|
|
await nodeInstrumentation.register()
|
|
}
|
|
}
|
|
|
|
// Load Edge Runtime-specific instrumentation
|
|
if (process.env.NEXT_RUNTIME === 'edge') {
|
|
console.log('[Main Instrumentation] Loading Edge Runtime instrumentation...')
|
|
const edgeInstrumentation = await import('./instrumentation-edge')
|
|
if (edgeInstrumentation.register) {
|
|
console.log('[Main Instrumentation] Calling Edge Runtime register()...')
|
|
await edgeInstrumentation.register()
|
|
}
|
|
}
|
|
|
|
// Load client instrumentation if we're on the client
|
|
if (typeof window !== 'undefined') {
|
|
console.log('[Main Instrumentation] Loading client instrumentation...')
|
|
await import('./instrumentation-client')
|
|
}
|
|
}
|