mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-01 02:05:18 -05:00
* feat(logs): updated telemetry, added nested sanitization, added granular trace spans for logs and updated UI * refactor trace spans into separate components * remove any's from tool defs * updated UI and overlayed spans * cleanup * ack PR comments * stricter type safety * clean
29 lines
878 B
TypeScript
29 lines
878 B
TypeScript
/**
|
|
* OpenTelemetry Instrumentation Entry Point
|
|
*
|
|
* This is the main entry point for OpenTelemetry instrumentation.
|
|
* It delegates to runtime-specific instrumentation modules.
|
|
*/
|
|
export async function register() {
|
|
// Load Node.js-specific instrumentation
|
|
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
|
const nodeInstrumentation = await import('./instrumentation-node')
|
|
if (nodeInstrumentation.register) {
|
|
await nodeInstrumentation.register()
|
|
}
|
|
}
|
|
|
|
// Load Edge Runtime-specific instrumentation
|
|
if (process.env.NEXT_RUNTIME === 'edge') {
|
|
const edgeInstrumentation = await import('./instrumentation-edge')
|
|
if (edgeInstrumentation.register) {
|
|
await edgeInstrumentation.register()
|
|
}
|
|
}
|
|
|
|
// Load client instrumentation if we're on the client
|
|
if (typeof window !== 'undefined') {
|
|
await import('./instrumentation-client')
|
|
}
|
|
}
|