reroute-js 0.31.8 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/cli/bin.d.ts +1 -1
  2. package/cli/bin.js +6 -6
  3. package/cli/bin.js.map +4 -4
  4. package/cli/index.d.ts +1 -1
  5. package/cli/index.js +4 -4
  6. package/cli/index.js.map +1 -1
  7. package/cli/src/cli.d.ts +1 -1
  8. package/cli/src/commands/analyze.d.ts +1 -1
  9. package/cli/src/commands/build.d.ts +1 -1
  10. package/cli/src/commands/dev.d.ts +1 -1
  11. package/cli/src/commands/gen.d.ts +1 -1
  12. package/cli/src/commands/index.d.ts +1 -1
  13. package/cli/src/commands/init.d.ts +1 -1
  14. package/cli/src/commands/lib/assets.d.ts +1 -1
  15. package/cli/src/commands/lib/bundler.d.ts +1 -1
  16. package/cli/src/commands/lib/command.d.ts +1 -1
  17. package/cli/src/commands/lib/env.d.ts +1 -1
  18. package/cli/src/commands/lib/index.d.ts +1 -1
  19. package/cli/src/commands/lib/log.d.ts +1 -1
  20. package/cli/src/commands/lib/markdown/availability.d.ts +1 -1
  21. package/cli/src/commands/lib/markdown/index.d.ts +1 -1
  22. package/cli/src/commands/lib/markdown/processor.d.ts +1 -1
  23. package/cli/src/commands/lib/production.d.ts +1 -1
  24. package/cli/src/commands/lib/server.d.ts +1 -1
  25. package/cli/src/commands/lib/streaming/analyzer.d.ts +1 -1
  26. package/cli/src/commands/lib/streaming/suspense.d.ts +1 -1
  27. package/cli/src/commands/lib/tailwind.d.ts +1 -1
  28. package/cli/src/commands/lib/terminal-ui.d.ts +1 -1
  29. package/cli/src/commands/lib/version.d.ts +1 -1
  30. package/cli/src/commands/og.d.ts +1 -1
  31. package/cli/src/commands/start.d.ts +1 -1
  32. package/cli/src/index.d.ts +1 -1
  33. package/core/index.d.ts +1 -1
  34. package/core/index.js +2 -2
  35. package/core/index.js.map +4 -4
  36. package/core/src/bundler/hash.d.ts +1 -1
  37. package/core/src/bundler/index.d.ts +1 -1
  38. package/core/src/config.d.ts +7 -1
  39. package/core/src/config.d.ts.map +1 -1
  40. package/core/src/content/discovery.d.ts +1 -1
  41. package/core/src/content/index.d.ts +1 -1
  42. package/core/src/content/metadata.d.ts +1 -1
  43. package/core/src/index.d.ts +1 -1
  44. package/core/src/llms/extractor.d.ts +1 -1
  45. package/core/src/llms/formatter.d.ts +1 -1
  46. package/core/src/llms/full-generator.d.ts +1 -1
  47. package/core/src/llms/index-generator.d.ts +1 -1
  48. package/core/src/llms/index.d.ts +1 -1
  49. package/core/src/og/discovery.d.ts +1 -1
  50. package/core/src/og/index.d.ts +1 -1
  51. package/core/src/og/meta.d.ts +1 -1
  52. package/core/src/og/render.d.ts +1 -1
  53. package/core/src/og/types.d.ts +1 -1
  54. package/core/src/robots/discovery.d.ts +1 -1
  55. package/core/src/robots/generator.d.ts +1 -1
  56. package/core/src/robots/index.d.ts +1 -1
  57. package/core/src/robots/policies.d.ts +1 -1
  58. package/core/src/rss/discovery.d.ts +1 -1
  59. package/core/src/rss/generator.d.ts +1 -1
  60. package/core/src/rss/index.d.ts +1 -1
  61. package/core/src/sitemap/discovery.d.ts +1 -1
  62. package/core/src/sitemap/generator.d.ts +1 -1
  63. package/core/src/sitemap/index.d.ts +1 -1
  64. package/core/src/ssr/index.d.ts +1 -1
  65. package/core/src/ssr/lib/cache.d.ts +1 -1
  66. package/core/src/ssr/lib/collections.d.ts +1 -1
  67. package/core/src/ssr/lib/compression.d.ts +1 -1
  68. package/core/src/ssr/lib/compute/content.d.ts +1 -1
  69. package/core/src/ssr/lib/compute/index.d.ts +1 -1
  70. package/core/src/ssr/lib/compute/layouts.d.ts +1 -1
  71. package/core/src/ssr/lib/compute/routes.d.ts +1 -1
  72. package/core/src/ssr/lib/data.d.ts +1 -1
  73. package/core/src/ssr/lib/html.d.ts +1 -1
  74. package/core/src/ssr/lib/imports.d.ts +1 -1
  75. package/core/src/ssr/lib/index.d.ts +1 -1
  76. package/core/src/ssr/lib/layouts.d.ts +1 -1
  77. package/core/src/ssr/lib/metadata.d.ts +1 -1
  78. package/core/src/ssr/lib/mime.d.ts +1 -1
  79. package/core/src/ssr/lib/modules.d.ts +1 -1
  80. package/core/src/ssr/lib/path.d.ts +1 -1
  81. package/core/src/ssr/lib/preload.d.ts +1 -1
  82. package/core/src/ssr/lib/scripts/collections.d.ts +1 -1
  83. package/core/src/ssr/lib/scripts/data.d.ts +1 -1
  84. package/core/src/ssr/lib/scripts/escape.d.ts +1 -1
  85. package/core/src/ssr/lib/scripts/feeds.d.ts +1 -1
  86. package/core/src/ssr/lib/scripts/index.d.ts +1 -1
  87. package/core/src/ssr/lib/seed.d.ts +1 -1
  88. package/core/src/ssr/lib/serialize.d.ts +1 -1
  89. package/core/src/ssr/lib/setup.d.ts +1 -1
  90. package/core/src/ssr/lib/styles.d.ts +1 -1
  91. package/core/src/ssr/lib/template.d.ts +1 -1
  92. package/core/src/ssr/lib/types.d.ts +1 -1
  93. package/core/src/ssr/render.d.ts +1 -1
  94. package/core/src/ssr/stream.d.ts +1 -1
  95. package/elysia/index.d.ts +1 -1
  96. package/elysia/index.js +2 -2
  97. package/elysia/index.js.map +4 -4
  98. package/elysia/src/index.d.ts +1 -1
  99. package/elysia/src/libs/assets.d.ts +1 -1
  100. package/elysia/src/libs/cache.d.ts +1 -1
  101. package/elysia/src/libs/caching.d.ts +1 -1
  102. package/elysia/src/libs/http.d.ts +1 -1
  103. package/elysia/src/libs/image.d.ts +1 -1
  104. package/elysia/src/libs/index.d.ts +1 -1
  105. package/elysia/src/libs/llms.d.ts +1 -1
  106. package/elysia/src/libs/response.d.ts +1 -1
  107. package/elysia/src/libs/serving.d.ts +1 -1
  108. package/elysia/src/plugin.d.ts +1 -1
  109. package/elysia/src/routes/artifacts.d.ts +1 -1
  110. package/elysia/src/routes/content.d.ts +1 -1
  111. package/elysia/src/routes/image.d.ts +1 -1
  112. package/elysia/src/routes/index.d.ts +1 -1
  113. package/elysia/src/routes/internal.d.ts +1 -1
  114. package/elysia/src/routes/llms.d.ts +1 -1
  115. package/elysia/src/routes/og.d.ts +1 -1
  116. package/elysia/src/routes/redirects.d.ts +1 -1
  117. package/elysia/src/routes/robots.d.ts +1 -1
  118. package/elysia/src/routes/rss.d.ts +1 -1
  119. package/elysia/src/routes/search.d.ts +1 -1
  120. package/elysia/src/routes/sitemap.d.ts +1 -1
  121. package/elysia/src/routes/ssr.d.ts +1 -1
  122. package/elysia/src/routes/static.d.ts +1 -1
  123. package/elysia/src/types.d.ts +1 -1
  124. package/package.json +1 -1
  125. package/react/index.d.ts +1 -1
  126. package/react/index.js +2 -2
  127. package/react/index.js.map +1 -1
  128. package/react/src/components/ClientOnly.d.ts +1 -1
  129. package/react/src/components/ContentRoute.d.ts +1 -1
  130. package/react/src/components/Image.d.ts +1 -1
  131. package/react/src/components/LazyRoute.d.ts +1 -1
  132. package/react/src/components/Link.d.ts +1 -1
  133. package/react/src/components/Markdown.d.ts +1 -1
  134. package/react/src/components/Outlet.d.ts +1 -1
  135. package/react/src/components/index.d.ts +1 -1
  136. package/react/src/hooks/index.d.ts +1 -1
  137. package/react/src/hooks/useContent.d.ts +1 -1
  138. package/react/src/hooks/useData.d.ts +1 -1
  139. package/react/src/hooks/useFeed.d.ts +1 -1
  140. package/react/src/hooks/useLayoutData.d.ts +1 -1
  141. package/react/src/hooks/useLlms.d.ts +1 -1
  142. package/react/src/hooks/useNavigate.d.ts +1 -1
  143. package/react/src/hooks/useParams.d.ts +1 -1
  144. package/react/src/hooks/useRouter.d.ts +1 -1
  145. package/react/src/hooks/useSearch.d.ts +1 -1
  146. package/react/src/hooks/useSearchParams.d.ts +1 -1
  147. package/react/src/hooks/useToc.d.ts +1 -1
  148. package/react/src/index.d.ts +1 -1
  149. package/react/src/lib/collection.d.ts +1 -1
  150. package/react/src/lib/content.d.ts +1 -1
  151. package/react/src/lib/head.d.ts +1 -1
  152. package/react/src/lib/index.d.ts +1 -1
  153. package/react/src/lib/lazy-route.d.ts +1 -1
  154. package/react/src/lib/route-loader.d.ts +1 -1
  155. package/react/src/providers/ContentProvider.d.ts +1 -1
  156. package/react/src/providers/RerouteProvider.d.ts +1 -1
  157. package/react/src/providers/RouterProvider.d.ts +1 -1
  158. package/react/src/providers/index.d.ts +1 -1
  159. package/react/src/types/any.d.ts +1 -1
  160. package/react/src/types/index.d.ts +1 -1
  161. package/react/src/types/router.d.ts +1 -1
  162. package/telemetry/react.d.ts +1 -1
  163. package/telemetry/react.js +2 -2
  164. package/telemetry/react.js.map +1 -1
  165. package/telemetry/server.d.ts +1 -1
  166. package/telemetry/server.js +98 -2
  167. package/telemetry/server.js.map +4 -4
  168. package/telemetry/src/react/api.d.ts +1 -1
  169. package/telemetry/src/react/context.d.ts +1 -1
  170. package/telemetry/src/react/index.d.ts +1 -1
  171. package/telemetry/src/react/telemetry.d.ts +1 -1
  172. package/telemetry/src/server/context.d.ts +1 -1
  173. package/telemetry/src/server/index.d.ts +1 -1
  174. package/telemetry/src/server/instrumentation.d.ts +1 -1
  175. package/telemetry/src/server/plugin.d.ts +1 -1
  176. package/telemetry/src/server/plugin.d.ts.map +1 -1
  177. package/telemetry/src/server/sourcemap.d.ts +1 -1
@@ -4,7 +4,7 @@
4
4
  "sourcesContent": [
5
5
  "import { AsyncLocalStorage } from 'node:async_hooks';\n\n/**\n * Context attributes storage using AsyncLocalStorage for request-scoped context\n * This ensures concurrent requests don't mix context data\n */\nconst contextStorage = new AsyncLocalStorage<Record<string, string>>();\n\n/**\n * Set context attributes that will be automatically attached to all telemetry\n *\n * All attributes are prefixed with 'context.' when attached to spans/logs.\n *\n * **Privacy-first:** You control what data to track. No assumptions about PII.\n *\n * @example\n * ```typescript\n * // In your auth middleware\n * setContext({\n * 'user_id': user.id,\n * 'plan': user.subscription,\n * 'region': user.region,\n * });\n *\n * // Later, when an error happens, telemetry will include:\n * // context.user_id, context.plan, context.region\n * ```\n *\n * @param attributes - Key-value pairs to attach to telemetry (values must be strings)\n */\nexport function setContext(attributes: Record<string, string>): void {\n\tconst current = contextStorage.getStore() || {};\n\tconst updated = { ...current, ...attributes };\n\n\t// Store the updated attributes in the current async context\n\t// Note: This only works within an async context (e.g., inside a request handler)\n\t// For server-wide context (rare), use a global Map with request IDs instead\n\ttry {\n\t\t// If we're already in an async context, merge\n\t\tif (contextStorage.getStore()) {\n\t\t\t// AsyncLocalStorage doesn't have a way to update in place\n\t\t\t// So we need to be called from within the context that was created\n\t\t\t// This is typically fine since it's called from request handlers\n\t\t}\n\t} catch {\n\t\t// Not in async context - will be set when request starts\n\t}\n\n\t// Store globally as fallback for non-async contexts\n\tglobalContextAttributes = updated;\n}\n\n/**\n * Clear all context attributes\n *\n * Call this when a user logs out or when you want to reset context\n *\n * @example\n * ```typescript\n * app.post('/logout', async () => {\n * clearContext();\n * // ... logout logic\n * });\n * ```\n */\nexport function clearContext(): void {\n\tglobalContextAttributes = {};\n}\n\n/**\n * Get current context attributes\n * Returns attributes from async context if available, otherwise from global fallback\n *\n * @internal\n */\nexport function getContextAttr(): Record<string, string> {\n\treturn contextStorage.getStore() || globalContextAttributes || {};\n}\n\n// Global fallback for non-async contexts\nlet globalContextAttributes: Record<string, string> = {};\n\n/**\n * Get context attributes formatted for OpenTelemetry spans/logs\n * Prefixes all keys with 'context.'\n *\n * @internal\n */\nexport function getContextAttributesForTelemetry(): Record<string, string> {\n\tconst attrs = getContextAttr();\n\tconst prefixed: Record<string, string> = {};\n\n\tfor (const [key, value] of Object.entries(attrs)) {\n\t\tprefixed[`context.${key}`] = value;\n\t}\n\n\treturn prefixed;\n}\n",
6
6
  "/**\n * Telemetry utilities for instrumenting operations\n *\n * This module provides helpers to create spans for custom instrumentation:\n * - API endpoints\n * - Database queries\n * - External service calls\n * - Business logic operations\n */\n\nimport { context, type Span, SpanStatusCode, trace } from '@opentelemetry/api';\n\n// Check if OpenTelemetry is available (lazy loaded to avoid requiring it)\nlet otelAvailable: boolean | undefined;\n\nfunction isOtelAvailable(): boolean {\n\tif (otelAvailable !== undefined) return otelAvailable;\n\n\ttry {\n\t\t// Check if @opentelemetry/api is available\n\t\trequire('@opentelemetry/api');\n\t\totelAvailable = true;\n\t\treturn true;\n\t} catch {\n\t\totelAvailable = false;\n\t\treturn false;\n\t}\n}\n\n/**\n * No-op span implementation when OpenTelemetry is not available\n * Implements the Span interface but all methods do nothing\n */\nclass NoopSpan implements Span {\n\tspanContext() {\n\t\treturn {\n\t\t\ttraceId: '',\n\t\t\tspanId: '',\n\t\t\ttraceFlags: 0,\n\t\t};\n\t}\n\tsetAttribute() {\n\t\treturn this;\n\t}\n\tsetAttributes() {\n\t\treturn this;\n\t}\n\taddEvent() {\n\t\treturn this;\n\t}\n\taddLink() {\n\t\treturn this;\n\t}\n\taddLinks() {\n\t\treturn this;\n\t}\n\tsetStatus() {\n\t\treturn this;\n\t}\n\tupdateName() {\n\t\treturn this;\n\t}\n\tend() {}\n\tisRecording() {\n\t\treturn false;\n\t}\n\trecordException() {}\n}\n\n// Singleton instance\nconst noopSpan = new NoopSpan();\n\n/**\n * Execute a function within a named span for distributed tracing\n *\n * @example\n * ```ts\n * const result = await withSpan('database.query', async (span) => {\n * span.setAttribute('query', 'SELECT * FROM users');\n * return await db.query('SELECT * FROM users');\n * });\n * ```\n */\nexport async function withSpan<T>(\n\tname: string,\n\tfn: (span: Span) => Promise<T>,\n\tattributes?: Record<string, string | number | boolean>,\n): Promise<T> {\n\tif (!isOtelAvailable()) {\n\t\treturn fn(noopSpan);\n\t}\n\n\tconst tracer = trace.getTracer('reroute');\n\treturn tracer.startActiveSpan(name, { attributes }, async (span) => {\n\t\ttry {\n\t\t\tconst result = await fn(span);\n\t\t\tspan.end();\n\t\t\treturn result;\n\t\t} catch (error) {\n\t\t\tspan.recordException(error as Error);\n\t\t\tspan.setStatus({\n\t\t\t\tcode: SpanStatusCode.ERROR,\n\t\t\t\tmessage: error instanceof Error ? error.message : String(error),\n\t\t\t});\n\t\t\tspan.end();\n\t\t\tthrow error;\n\t\t}\n\t});\n}\n\n/**\n * Execute a synchronous function within a named span\n */\nexport function withSpanSync<T>(\n\tname: string,\n\tfn: (span: Span) => T,\n\tattributes?: Record<string, string | number | boolean>,\n): T {\n\tif (!isOtelAvailable()) {\n\t\treturn fn(noopSpan);\n\t}\n\n\tconst tracer = trace.getTracer('reroute');\n\treturn tracer.startActiveSpan(name, { attributes }, (span) => {\n\t\ttry {\n\t\t\tconst result = fn(span);\n\t\t\tspan.end();\n\t\t\treturn result;\n\t\t} catch (error) {\n\t\t\tspan.recordException(error as Error);\n\t\t\tspan.setStatus({\n\t\t\t\tcode: SpanStatusCode.ERROR,\n\t\t\t\tmessage: error instanceof Error ? error.message : String(error),\n\t\t\t});\n\t\t\tspan.end();\n\t\t\tthrow error;\n\t\t}\n\t});\n}\n\n/**\n * Add attributes to the current active span (if available)\n */\nexport function setSpanAttributes(\n\tattributes: Record<string, string | number | boolean>,\n) {\n\tif (!isOtelAvailable()) return;\n\n\tconst span = trace.getActiveSpan();\n\tif (span) {\n\t\tspan.setAttributes(attributes);\n\t}\n}\n\n/**\n * Record an event in the current active span\n */\nexport function addSpanEvent(\n\tname: string,\n\tattributes?: Record<string, string | number | boolean>,\n) {\n\tif (!isOtelAvailable()) return;\n\n\tconst span = trace.getActiveSpan();\n\tif (span) {\n\t\tspan.addEvent(name, attributes);\n\t}\n}\n\n/**\n * Execute a function within the context of a parent span\n * This ensures child spans created inside the function are properly nested\n *\n * @example\n * ```ts\n * const parentSpan = store.telemetrySpan;\n * await withParentSpan(parentSpan, async () => {\n * // Any spans created here will be children of parentSpan\n * await withSpan('child.operation', async () => {...});\n * });\n * ```\n */\nexport async function withParentSpan<T>(\n\tparentSpan: Span | undefined | null,\n\tfn: () => Promise<T>,\n): Promise<T> {\n\tif (!(isOtelAvailable() && parentSpan)) {\n\t\treturn fn();\n\t}\n\n\t// Set the parent span as active in the context\n\tconst ctx = trace.setSpan(context.active(), parentSpan);\n\treturn context.with(ctx, fn);\n}\n\n/**\n * Execute a synchronous function within the context of a parent span\n */\nexport function withParentSpanSync<T>(\n\tparentSpan: Span | undefined | null,\n\tfn: () => T,\n): T {\n\tif (!(isOtelAvailable() && parentSpan)) {\n\t\treturn fn();\n\t}\n\n\tconst ctx = trace.setSpan(context.active(), parentSpan);\n\treturn context.with(ctx, fn);\n}\n\n/**\n * Extract W3C Trace Context from incoming HTTP request headers\n * Returns the extracted context or undefined if not available\n *\n * @example\n * ```ts\n * const traceContext = extractTraceContext(request.headers);\n * ```\n */\nexport function extractTraceContext(\n\theaders: Headers | Record<string, string | undefined>,\n): ReturnType<typeof context.active> | undefined {\n\tif (!isOtelAvailable()) return undefined;\n\n\ttry {\n\t\tconst { propagation } = require('@opentelemetry/api');\n\n\t\t// Create a carrier object that matches the W3C Trace Context format\n\t\tconst carrier: Record<string, string | undefined> = {};\n\n\t\tif (headers instanceof Headers) {\n\t\t\tcarrier.traceparent = headers.get('traceparent') || undefined;\n\t\t\tcarrier.tracestate = headers.get('tracestate') || undefined;\n\t\t} else {\n\t\t\tcarrier.traceparent = headers.traceparent;\n\t\t\tcarrier.tracestate = headers.tracestate;\n\t\t}\n\n\t\t// If no traceparent header, return undefined\n\t\tif (!carrier.traceparent) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Extract context from carrier\n\t\treturn propagation.extract(context.active(), carrier);\n\t} catch (error) {\n\t\tconsole.error('[telemetry] Failed to extract trace context:', error);\n\t\treturn undefined;\n\t}\n}\n\n/**\n * Get the trace context from a span for injection into browser\n * Returns an object with traceparent and tracestate (if available)\n *\n * @example\n * ```ts\n * const span = store.telemetrySpan;\n * const traceContext = getTraceContextForInjection(span);\n * // Inject into HTML: <script>window.__TRACE_CONTEXT__ = {...traceContext};</script>\n * ```\n */\nexport function getTraceContextForInjection(\n\tspan: Span | undefined | null,\n): { traceparent?: string; tracestate?: string } | undefined {\n\tif (!(isOtelAvailable() && span)) return undefined;\n\n\ttry {\n\t\tconst { propagation } = require('@opentelemetry/api');\n\t\tconst carrier: Record<string, string | undefined> = {};\n\n\t\t// Set the span as active and inject context\n\t\tconst ctx = trace.setSpan(context.active(), span);\n\t\tpropagation.inject(ctx, carrier);\n\n\t\treturn {\n\t\t\ttraceparent: carrier.traceparent,\n\t\t\ttracestate: carrier.tracestate,\n\t\t};\n\t} catch (error) {\n\t\tconsole.error(\n\t\t\t'[telemetry] Failed to get trace context for injection:',\n\t\t\terror,\n\t\t);\n\t\treturn undefined;\n\t}\n}\n",
7
- "import { pathToFileURL } from 'node:url';\nimport type { ComponentType } from 'react';\n\n// biome-ignore lint/suspicious/noExplicitAny: The user document\ntype Doc = any;\ninterface StreamingOptions {\n\tenabled?: boolean;\n\tdefaultSkeleton?: ComponentType | string;\n\tdefaultLayoutSkeleton?: ComponentType | string;\n}\n\n/**\n * Sitemap configuration options\n */\ninterface SitemapOptions {\n\t/** Enable sitemap generation (default: false) */\n\tenabled?: boolean;\n\n\t/** Base URL for sitemap generation (e.g., 'https://example.com') - required when enabled */\n\tbaseUrl?: string;\n\n\t/**\n\t * Maximum URLs per sitemap file before pagination (default: 50000)\n\t * When exceeded, creates multiple sitemap files with a sitemap index\n\t * Set lower for testing (e.g., 10) to verify pagination works\n\t */\n\tmaxUrlsPerPage?: number;\n\n\t/**\n\t * Completely exclude specific routes from the sitemap\n\t * Routes listed here will not appear in the sitemap at all\n\t * @example ['/admin', '/api']\n\t */\n\texcludeRoutes?: string[];\n\n\t/**\n\t * Exclude specific routes from SSR data array discovery\n\t * Routes listed here will still appear in the sitemap as single entries,\n\t * but won't generate multiple URLs from arrays found in their SSR data\n\t * @example ['/download', '/pricing'] - these routes appear once, not per array item\n\t */\n\texcludeDiscovery?: string[];\n\n\t/**\n\t * Extract urls from ssr.data result (full control over data shape)\n\t * If provided, this takes precedence over automatic array discovery\n\t * @param data - Full ssr.data result\n\t * @param routePattern - The route pattern (e.g., '/changelog')\n\t * @returns Array of items to process, or null/undefined to skip this route\n\t */\n\textractUrls?: (data: Doc, routePattern: string) => Doc[] | null | undefined;\n\n\t/**\n\t * Extract URL segment from ssr.data items\n\t * @param item - Data item from ssr.data result\n\t * @param routePattern - The route pattern (e.g., '/changelog')\n\t * @returns URL segment to append to routePattern (e.g., '0.1.0' -> '/changelog/0.1.0')\n\t */\n\textractUrl?: (item: Doc, routePattern: string) => string | null | undefined;\n\n\t/**\n\t * Extract lastmod date from ssr.data items\n\t * @param item - Data item from ssr.data result\n\t * @returns ISO date string or undefined\n\t */\n\textractLastmod?: (item: Doc) => string | undefined;\n\n\t/** Default changefreq for URLs */\n\tchangefreq?:\n\t\t| 'always'\n\t\t| 'hourly'\n\t\t| 'daily'\n\t\t| 'weekly'\n\t\t| 'monthly'\n\t\t| 'yearly'\n\t\t| 'never';\n\n\t/** Default priority for URLs */\n\tpriority?: number;\n}\n\n/**\n * RSS feed configuration options\n */\ninterface RSSOptions {\n\t/** Enable RSS feed generation (default: false) */\n\tenabled?: boolean;\n\n\t/** Base URL for RSS feeds (e.g., 'https://example.com') - required when enabled */\n\tbaseUrl?: string;\n\n\t/** Feed title (e.g., 'My Blog') */\n\ttitle?: string;\n\n\t/** Feed description */\n\tdescription?: string;\n\n\t/** Maximum number of items per feed (default: 50) */\n\tlimit?: number;\n\n\t/** Feed format: 'rss' or 'atom' (default: 'rss') */\n\tformat?: 'rss' | 'atom';\n\n\t/**\n\t * Completely exclude specific routes from the RSS feed\n\t * Routes listed here will not appear in the feed at all\n\t * @example ['/admin', '/api']\n\t */\n\texcludeRoutes?: string[];\n\n\t/**\n\t * Exclude specific routes from SSR data array discovery\n\t * Routes listed here won't generate multiple feed items from arrays in their SSR data,\n\t * but may still generate a single feed item if appropriate\n\t * @example ['/download', '/pricing'] - won't generate items per array entry\n\t */\n\texcludeDiscovery?: string[];\n\n\t/**\n\t * Extract items from ssr.data result (full control over data shape)\n\t * If provided, this takes precedence over automatic array discovery\n\t * @param data - Full ssr.data result\n\t * @param routePattern - The route pattern (e.g., '/changelog')\n\t * @returns Array of items to process, or null/undefined to skip this route\n\t */\n\textractUrls?: (data: Doc, routePattern: string) => Doc[] | null | undefined;\n\n\t/**\n\t * Extract URL segment from ssr.data items (same as sitemap)\n\t */\n\textractUrl?: (item: Doc, routePattern: string) => string | null | undefined;\n\n\t/**\n\t * Extract publication date from items\n\t */\n\textractPubDate?: (item: Doc) => string | undefined;\n\n\t/**\n\t * Extract author from items\n\t */\n\textractAuthor?: (item: Doc) => string | undefined;\n\n\t/**\n\t * Extract content/body from items\n\t */\n\textractContent?: (item: Doc) => string | undefined;\n\n\t/**\n\t * Extract description/summary from items\n\t * Falls back to item.description or item.excerpt if not provided\n\t */\n\textractDescription?: (item: Doc) => string | undefined;\n}\n\n/**\n * Markdown configuration options\n */\ninterface MarkdownOptions {\n\t/**\n\t * Custom components to use when rendering markdown\n\t * Path to a module that exports a components object compatible with Streamdown\n\t * @example './src/client/lib/markdown-components'\n\t */\n\tcomponents?: string;\n\n\t/** Enable GitHub Flavored Markdown (default: true if remark-gfm is installed) */\n\tenableGfm?: boolean;\n\n\t/** Shiki theme for syntax highlighting (default: 'github-dark') */\n\ttheme?: string;\n}\n\n/**\n * Search index configuration options\n */\ninterface SearchOptions {\n\t/** Enable search index generation (default: false) */\n\tenabled?: boolean;\n\n\t/**\n\t * Collections to include in search index\n\t * @default [] - all collections will be indexed\n\t * @example ['blog', 'docs']\n\t */\n\tcollections?: string[];\n\n\t/**\n\t * Include full content text in search (increases index size significantly)\n\t * @default false - only index headings and metadata\n\t */\n\tincludeContent?: boolean;\n\n\t/**\n\t * Maximum content length to index per item (characters)\n\t * @default 5000 - prevents huge content from bloating index\n\t */\n\tcontentLimit?: number;\n\n\t/**\n\t * Fields to index from frontmatter metadata\n\t * @default ['title', 'description', 'excerpt', 'tags']\n\t */\n\tmetaFields?: string[];\n\n\t/**\n\t * Minimum heading level to index (1-6)\n\t * @default 1 - index all headings\n\t */\n\tminHeadingLevel?: number;\n\n\t/**\n\t * Maximum heading level to index (1-6)\n\t * @default 6 - index all headings\n\t */\n\tmaxHeadingLevel?: number;\n\n\t/**\n\t * Default page size for paginated results\n\t * @default 20\n\t */\n\tdefaultPageSize?: number;\n\n\t/**\n\t * Maximum allowed page size (prevents excessive results)\n\t * @default 100\n\t */\n\tmaxPageSize?: number;\n}\n\ninterface OGImageFont {\n\t/** Font family name (e.g., 'Inter') */\n\tname: string;\n\t/** Path to font file (TTF, OTF, or WOFF) relative to project root */\n\tpath: string;\n\t/** Font weight (e.g., 400, 700, 900) */\n\tweight?: number;\n\t/** Font style (default: 'normal') */\n\tstyle?:\n\t\t| 'normal'\n\t\t| 'italic'\n\t\t| 'bold'\n\t\t| 'bold-italic'\n\t\t| 'medium'\n\t\t| 'medium-italic'\n\t\t| 'semibold'\n\t\t| 'semibold-italic'\n\t\t| 'light'\n\t\t| 'light-italic'\n\t\t| 'thin'\n\t\t| 'thin-italic'\n\t\t| 'black'\n\t\t| 'black-italic'\n\t\t| 'extra-bold'\n\t\t| 'extra-bold-italic'\n\t\t| 'extra-light'\n\t\t| 'extra-light-italic'\n\t\t| 'extra-medium'\n\t\t| 'extra-medium-italic'\n\t\t| 'extra-semibold'\n\t\t| 'extra-semibold-italic'\n\t\t| 'extra-light'\n\t\t| 'extra-light-italic'\n\t\t| 'extra-medium'\n\t\t| 'extra-medium-italic'\n\t\t| 'extra-semibold'\n\t\t| 'extra-semibold-italic';\n\tdata?: ArrayBuffer | undefined;\n}\n\n/**\n * OG Image generation configuration options\n */\ninterface OGImageOptions {\n\t/** Enable OG image generation (default: false) */\n\tenabled?: boolean;\n\n\t/** Base URL for absolute OG image URLs (e.g., 'https://example.com') - required when enabled */\n\tbaseUrl?: string;\n\n\t/** Path to default template component or 'default' for built-in template */\n\tdefaultTemplate?: string;\n\n\t/** Image width in pixels (default: 1200) */\n\twidth?: number;\n\n\t/** Image height in pixels (default: 630) */\n\theight?: number;\n\n\t/** Cache duration in seconds (default: 3600 = 1 hour) */\n\tmaxAge?: number;\n\n\t/** Default avatar/logo URL (can be external or local path) */\n\tavatar?: string;\n\n\t/** Site name to display */\n\tsiteName?: string;\n\n\t/** Custom fonts to load for OG images */\n\tfonts?: OGImageFont[];\n}\n\n/**\n * LLMs content configuration options\n */\ninterface LLMsOptions {\n\t/** Enable LLM content features (default: false) */\n\tenabled?: boolean;\n\n\t/** Base URL for absolute URLs in llms.txt index (e.g., 'https://example.com') */\n\tbaseUrl?: string;\n\n\t/** Enable .txt extension for routes (default: true when enabled) */\n\tenableTextExtension?: boolean;\n\n\t/** Enable .md extension for routes (default: true when enabled) */\n\tenableMarkdownExtension?: boolean;\n\n\t/** Enable Accept header content negotiation (default: true when enabled) */\n\tenableContentNegotiation?: boolean;\n\n\t/** Enable /llms.txt index generation (default: true when enabled) */\n\tenableIndex?: boolean;\n\n\t/** Enable /llms-full.txt generation (default: true when enabled) */\n\tenableFullContent?: boolean;\n\n\t/** Cache duration in seconds for LLM content (default: 86400 = 24 hours, or falls back to options.maxAge) */\n\tmaxAge?: number;\n\n\t/** Cache duration in seconds for llms-full.txt specifically (default: 604800 = 7 days, or falls back to llms.maxAge) */\n\tmaxAgeFull?: number;\n\n\t/** Maximum items in full content bundle (default: 10000) */\n\tmaxItems?: number;\n\n\t/** Maximum file size for full content in bytes (default: 50MB) */\n\tmaxSize?: number;\n\n\t/**\n\t * Exclude specific routes from LLM features\n\t * Supports strings (exact match or substring), RegExp, or custom functions\n\t * @example ['/admin', '/api', /^\\/private/, (path) => path.includes('draft')]\n\t */\n\texcludeRoutes?: (string | RegExp | ((pathname: string) => boolean))[];\n\n\t/**\n\t * Exclude collections from LLM features\n\t * @example ['drafts', 'private']\n\t */\n\texcludeCollections?: string[];\n\n\t/** Site name for index header */\n\tsiteName?: string;\n\n\t/** Site description for index header (brief context for LLMs) */\n\tsiteDescription?: string;\n\n\t/**\n\t * Per-collection customization for titles and descriptions\n\t * @example\n\t * ```ts\n\t * collections: {\n\t * blog: {\n\t * title: 'My Awesome Blog',\n\t * description: 'Insights and tutorials about web development'\n\t * },\n\t * docs: {\n\t * title: 'Documentation',\n\t * description: 'Complete API reference and guides'\n\t * }\n\t * }\n\t * ```\n\t */\n\tcollections?: Record<\n\t\tstring,\n\t\t{\n\t\t\t/** Custom title for this collection's LLMS index */\n\t\t\ttitle?: string;\n\t\t\t/** Custom description for this collection's LLMS index */\n\t\t\tdescription?: string;\n\t\t}\n\t>;\n}\n\n/**\n * Robots policy for specific user-agents\n */\ninterface RobotsPolicy {\n\t/** User-Agent (e.g., '*', 'Googlebot', 'GPTBot') */\n\tuserAgent: string;\n\n\t/** Paths to explicitly allow */\n\tallow?: string[];\n\n\t/** Paths to disallow */\n\tdisallow?: string[];\n\n\t/** Crawl delay for this user-agent (seconds) */\n\tcrawlDelay?: number;\n}\n\n/**\n * Robots.txt generation configuration options\n */\ninterface RobotsOptions {\n\t/** Enable robots.txt generation (default: false) */\n\tenabled?: boolean;\n\n\t/** Base URL for sitemap reference (e.g., 'https://example.com') - required when enabled */\n\tbaseUrl?: string;\n\n\t/** Cache duration in seconds (default: 86400 = 24 hours) */\n\tmaxAge?: number;\n\n\t/** Custom policies per user-agent (default: permissive) */\n\tpolicies?: RobotsPolicy[];\n\n\t/** Auto-reference sitemap.xml if sitemap is enabled (default: true) */\n\treferenceSitemap?: boolean;\n\n\t/** Auto-disallow routes excluded from sitemap (default: true) */\n\tsitemapExclusion?: boolean;\n\n\t/** Auto-disallow old redirect source paths (default: true) */\n\tredirectExclusion?: boolean;\n\n\t/** Additional raw text appended to robots.txt */\n\tcustomRules?: string;\n\n\t/** Global crawl delay in seconds (optional) */\n\tcrawlDelay?: number;\n}\n\n/**\n * Telemetry proxy configuration for forwarding browser telemetry\n */\ninterface TelemetryProxyOptions {\n\t/**\n\t * Enable browser telemetry proxy (default: true when proxy config exists)\n\t * Creates endpoints to forward browser traces/metrics/logs to OTLP backend\n\t * This avoids CORS issues and ad blockers\n\t */\n\tenabled?: boolean;\n\n\t/**\n\t * Base path for proxy endpoints (default: '/__reroute_telemetry')\n\t * Creates:\n\t * - {pathname}/v1/traces\n\t * - {pathname}/v1/metrics\n\t * - {pathname}/v1/logs\n\t * - {pathname}/health\n\t */\n\tpathname?: string;\n\n\t/**\n\t * Enable verbose logging for proxy requests\n\t * @default false\n\t */\n\tverbose?: boolean;\n\n\t/**\n\t * Custom handler for proxy requests (advanced)\n\t * If provided, replaces default OTLP forwarding logic\n\t *\n\t * @example\n\t * ```ts\n\t * handler: async ({ body, endpoint, headers }) => {\n\t * // Custom logic: filter, transform, or route to different backends\n\t * await fetch(`https://custom-backend${endpoint}`, {\n\t * method: 'POST',\n\t * headers,\n\t * body: JSON.stringify(body),\n\t * });\n\t * return { status: 200 };\n\t * }\n\t * ```\n\t */\n\thandler?: (params: {\n\t\tbody: unknown;\n\t\tendpoint: string;\n\t\theaders: Record<string, string>;\n\t\totlpEndpoint: string;\n\t}) => Promise<{ status: number }>;\n}\n\n/**\n * Browser telemetry configuration options\n */\ninterface BrowserTelemetryOptions {\n\t/**\n\t * Enable browser telemetry\n\t * @default true\n\t */\n\tenabled?: boolean;\n\n\t/**\n\t * Service name for browser telemetry\n\t * @default 'reroute-app-browser'\n\t */\n\tserviceName?: string;\n\n\t/**\n\t * Service version\n\t * @default '1.0.0'\n\t */\n\tserviceVersion?: string;\n\n\t/**\n\t * OTLP endpoint URL (use relative URL for same-origin proxy)\n\t * @default '/__reroute_telemetry'\n\t */\n\totlpEndpoint?: string;\n\n\t/**\n\t * API key for authentication (optional)\n\t */\n\tapiKey?: string;\n\n\t/**\n\t * Deployment environment (e.g., 'production', 'staging', 'development')\n\t * @default 'development'\n\t */\n\tenvironment?: string;\n\n\t/**\n\t * Enable console.error capture\n\t * @default true\n\t */\n\tenableConsoleCapture?: boolean;\n\n\t/**\n\t * Ignore specific routes/URLs from breadcrumbs and network tracking\n\t *\n\t * Note: Functions are NOT supported for browser telemetry (closures cannot be serialized)\n\t * Use strings or regex patterns instead\n\t *\n\t * @example\n\t * ```ts\n\t * ignoreRoutes: [\n\t * '/bundles/', // String prefix match\n\t * /\\.(js|css|png)$/, // Regex pattern\n\t * /^\\/assets\\//, // Regex for path prefix\n\t * ]\n\t * ```\n\t */\n\tignoreRoutes?: Array<string | RegExp>;\n}\n\n/**\n * Telemetry configuration options for OpenTelemetry integration\n */\ninterface TelemetryOptions {\n\t/**\n\t * Enable server telemetry collection (default: false)\n\t * Must be explicitly enabled to start collecting traces, metrics, and logs\n\t */\n\tenabled?: boolean;\n\n\t/**\n\t * Browser telemetry configuration\n\t * Configure browser-side telemetry separately from server\n\t */\n\tbrowser?: BrowserTelemetryOptions;\n\n\t/**\n\t * Service name for server telemetry\n\t * @default 'reroute-app'\n\t */\n\tserviceName?: string;\n\n\t/**\n\t * Service version\n\t * @default process.env.npm_package_version || '1.0.0'\n\t */\n\tserviceVersion?: string;\n\n\t/**\n\t * OTLP endpoint URL\n\t * @default process.env.OTEL_EXPORTER_OTLP_ENDPOINT || 'http://localhost:4318'\n\t */\n\totlpEndpoint?: string;\n\n\t/**\n\t * API key for authentication (optional, only needed for SigNoz Cloud)\n\t */\n\tapiKey?: string;\n\n\t/**\n\t * Deployment environment (e.g., 'production', 'staging', 'development')\n\t * Used as a deployment.environment attribute on all telemetry\n\t * @default process.env.NODE_ENV || 'development'\n\t */\n\tenvironment?: string;\n\n\t/**\n\t * Metric export interval in milliseconds\n\t * @default 5000\n\t */\n\tmetricsInterval?: number;\n\n\t/**\n\t * Browser telemetry proxy configuration\n\t * When configured, creates endpoints to forward browser telemetry to OTLP backend\n\t * This avoids CORS issues and ad blockers\n\t */\n\tproxy?: TelemetryProxyOptions;\n\n\t/**\n\t * Ignore specific routes from telemetry collection\n\t * Supports flexible pattern matching:\n\t * - String: Matches if pathname contains the string (e.g., '/assets' matches '/assets/logo.png')\n\t * - RegExp: Tests pathname against regex (e.g., /\\.(js|css)$/ matches file extensions)\n\t * - Function: Custom logic with pathname and method (server-side only)\n\t *\n\t * Note: For browser telemetry, only strings and regex are supported (functions use closures that cannot be serialized)\n\t *\n\t * @example\n\t * ```ts\n\t * ignoreRoutes: [\n\t * '/health', // String match\n\t * /\\.(js|css|png|jpg|svg|ico|woff2?)$/, // Regex for static assets\n\t * (pathname) => pathname.startsWith('/assets/'), // Function (server-side only)\n\t * (pathname, method) => method === 'OPTIONS', // Access to HTTP method (server-side only)\n\t * ]\n\t * ```\n\t */\n\tignoreRoutes?: (\n\t\t| string\n\t\t| RegExp\n\t\t| ((pathname: string, method: string) => boolean)\n\t)[];\n\n\t/**\n\t * Enable distributed tracing (default: true)\n\t * Captures request flows across services with OpenTelemetry traces\n\t */\n\tenableTraces?: boolean;\n\n\t/**\n\t * Enable metrics collection (default: true)\n\t * Captures counters, gauges, and histograms for request volume, duration, etc.\n\t */\n\tenableMetrics?: boolean;\n\n\t/**\n\t * Enable structured logging (default: true)\n\t * Captures log events with structured attributes for better querying\n\t */\n\tenableLogs?: boolean;\n\n\t/**\n\t * Enable system metrics collection (default: true)\n\t * Captures CPU usage, memory consumption, and process metrics\n\t */\n\tenableSystemMetrics?: boolean;\n\n\t/**\n\t * Sample rate for regular requests (default: 1.0)\n\t * Controls what percentage of requests to track (0.0 = 0%, 1.0 = 100%)\n\t *\n\t * Use sampling to reduce telemetry volume and costs on high-traffic applications:\n\t * - 1.0 = Track every request (100%)\n\t * - 0.5 = Track half of requests (50%)\n\t * - 0.1 = Track 10% of requests\n\t * - 0.01 = Track 1% of requests\n\t *\n\t * Sampling uses random selection, so a 10% sample of 100,000 requests\n\t * still provides ~10,000 data points for statistical analysis\n\t *\n\t * @example sampleRate: 0.1 // Track 10% of requests\n\t */\n\tsampleRate?: number;\n\n\t/**\n\t * Sample rate for error requests (default: 1.0)\n\t * Controls what percentage of errors to track (0.0 = 0%, 1.0 = 100%)\n\t *\n\t * Typically set higher than sampleRate since errors are more important to track.\n\t * Common pattern: low sample rate for normal requests, 100% for errors\n\t *\n\t * @example\n\t * ```ts\n\t * sampleRate: 0.1, // Track 10% of normal requests\n\t * errorSampleRate: 1.0, // Track 100% of errors\n\t * ```\n\t */\n\terrorSampleRate?: number;\n\n\t/**\n\t * HTTP headers to capture as span/log attributes\n\t * Headers are captured with 'http.request.header.' prefix\n\t *\n\t * @example\n\t * ```ts\n\t * captureHeaders: ['user-agent', 'referer', 'x-custom-header']\n\t * // Creates attributes like:\n\t * // - http.request.header.user-agent\n\t * // - http.request.header.referer\n\t * ```\n\t */\n\tcaptureHeaders?: string[];\n\n\t/**\n\t * Custom attributes to add to all spans and logs\n\t * Useful for tagging telemetry with environment, region, version, etc.\n\t *\n\t * @example\n\t * ```ts\n\t * customAttributes: {\n\t * environment: 'production',\n\t * region: 'us-east-1',\n\t * version: '1.2.3',\n\t * }\n\t * ```\n\t */\n\tcustomAttributes?: Record<string, string | number | boolean>;\n\n\t/**\n\t * Source map configuration for production error tracking\n\t * When enabled, error stack traces are mapped to original source files\n\t * instead of compiled/minified code\n\t *\n\t * @example\n\t * ```ts\n\t * sourcemaps: {\n\t * enabled: true, // Enable sourcemap resolution\n\t * }\n\t * ```\n\t */\n\tsourcemaps?: {\n\t\t/**\n\t\t * Enable sourcemap resolution\n\t\t * @default true in production, false in development\n\t\t */\n\t\tenabled?: boolean;\n\t};\n}\n\n/**\n * Redirect handler function that can dynamically determine destination\n * @param url - The original URL object\n * @returns The destination path/url or null to skip redirect\n */\ntype RedirectHandler = (url: URL) => string | null | Promise<string | null>;\n\n/**\n * Individual redirect rule\n */\ninterface RedirectRule {\n\t/** Source path (string or regex pattern) */\n\tsource: string | RegExp;\n\t/** Destination path or handler function */\n\tdestination: string | RedirectHandler;\n\t/** HTTP status code (301 = permanent, 302 = temporary, 307 = preserve method, 308 = permanent preserve method) */\n\tstatus?: 301 | 302 | 307 | 308;\n\t/** Whether source is a regex pattern (auto-detected if source is RegExp) */\n\tregex?: boolean;\n}\n\ninterface ConfigOptions {\n\t// App component - must be string path in config (not ReactElement)\n\tapp?: string;\n\n\t// SSR options\n\thead?: string;\n\tlang?: string;\n\tappId?: string;\n\n\t// Static serving options\n\tassets?: string;\n\tprefix?: string;\n\tignorePatterns?: (string | RegExp)[];\n\tstaticHeaders?: Record<string, string>;\n\tmaxAge?: number;\n\tdirective?: string;\n\tindexHTML?: boolean;\n\n\t// Build options\n\tminify?: boolean;\n\n\t// Compression (applies to both sync and streaming SSR)\n\tcompression?: boolean;\n\n\t// Debug mode - enables detailed performance logging\n\tdebug?: boolean;\n\n\t// Image optimization options\n\timageMaxAge?: number;\n\timageAllowedDomains?: string[];\n\timageMaxWidth?: number;\n\timageMaxHeight?: number;\n\n\t// Bundle caching options\n\tbundleMaxAge?: number;\n}\n\ninterface RerouteConfig {\n\toptions?: ConfigOptions;\n\tstreaming?: StreamingOptions;\n\tredirects?: RedirectRule[];\n\tsitemap?: SitemapOptions;\n\trss?: RSSOptions;\n\tmarkdown?: MarkdownOptions;\n\tsearch?: SearchOptions;\n\togImage?: OGImageOptions;\n\tllms?: LLMsOptions;\n\trobots?: RobotsOptions;\n\ttelemetry?: TelemetryOptions;\n}\n\nfunction defineConfig(config: RerouteConfig): RerouteConfig {\n\treturn config;\n}\n\nasync function loadConfig(cwd: string): Promise<RerouteConfig> {\n\t// Check for bundled config first (compiled binary support)\n\tconst bundledConfig = (globalThis as Record<string, unknown>)\n\t\t.__REROUTE_CONFIG__ as RerouteConfig | undefined;\n\tif (bundledConfig) {\n\t\treturn bundledConfig;\n\t}\n\n\t// Fallback to filesystem read (dev mode)\n\tconst configPath = `${cwd}/reroute.config.ts`;\n\tconst configFile = Bun.file(configPath);\n\n\tif (!(await configFile.exists())) {\n\t\treturn {};\n\t}\n\n\ttry {\n\t\tconst mod = await import(\n\t\t\t`${pathToFileURL(configPath).href}?t=${Date.now()}`\n\t\t);\n\t\treturn (mod.default || mod) as RerouteConfig;\n\t} catch (error) {\n\t\tconsole.warn('[reroute] Failed to load reroute.config.ts:', error);\n\t\treturn {};\n\t}\n}\n\nexport {\n\tdefineConfig,\n\tloadConfig,\n\ttype BrowserTelemetryOptions,\n\ttype ConfigOptions,\n\ttype LLMsOptions,\n\ttype MarkdownOptions,\n\ttype OGImageOptions,\n\ttype OGImageFont,\n\ttype RedirectRule,\n\ttype RerouteConfig,\n\ttype RobotsOptions,\n\ttype RobotsPolicy,\n\ttype RSSOptions,\n\ttype SearchOptions,\n\ttype SitemapOptions,\n\ttype StreamingOptions,\n\ttype TelemetryOptions,\n\ttype TelemetryProxyOptions,\n};\n",
7
+ "import { pathToFileURL } from 'node:url';\nimport type { ComponentType } from 'react';\n\n// biome-ignore lint/suspicious/noExplicitAny: The user document\ntype Doc = any;\ninterface StreamingOptions {\n\tenabled?: boolean;\n\tdefaultSkeleton?: ComponentType | string;\n\tdefaultLayoutSkeleton?: ComponentType | string;\n}\n\n/**\n * Sitemap configuration options\n */\ninterface SitemapOptions {\n\t/** Enable sitemap generation (default: false) */\n\tenabled?: boolean;\n\n\t/** Base URL for sitemap generation (e.g., 'https://example.com') - required when enabled */\n\tbaseUrl?: string;\n\n\t/**\n\t * Maximum URLs per sitemap file before pagination (default: 50000)\n\t * When exceeded, creates multiple sitemap files with a sitemap index\n\t * Set lower for testing (e.g., 10) to verify pagination works\n\t */\n\tmaxUrlsPerPage?: number;\n\n\t/**\n\t * Completely exclude specific routes from the sitemap\n\t * Routes listed here will not appear in the sitemap at all\n\t * @example ['/admin', '/api']\n\t */\n\texcludeRoutes?: string[];\n\n\t/**\n\t * Exclude specific routes from SSR data array discovery\n\t * Routes listed here will still appear in the sitemap as single entries,\n\t * but won't generate multiple URLs from arrays found in their SSR data\n\t * @example ['/download', '/pricing'] - these routes appear once, not per array item\n\t */\n\texcludeDiscovery?: string[];\n\n\t/**\n\t * Extract urls from ssr.data result (full control over data shape)\n\t * If provided, this takes precedence over automatic array discovery\n\t * @param data - Full ssr.data result\n\t * @param routePattern - The route pattern (e.g., '/changelog')\n\t * @returns Array of items to process, or null/undefined to skip this route\n\t */\n\textractUrls?: (data: Doc, routePattern: string) => Doc[] | null | undefined;\n\n\t/**\n\t * Extract URL segment from ssr.data items\n\t * @param item - Data item from ssr.data result\n\t * @param routePattern - The route pattern (e.g., '/changelog')\n\t * @returns URL segment to append to routePattern (e.g., '0.1.0' -> '/changelog/0.1.0')\n\t */\n\textractUrl?: (item: Doc, routePattern: string) => string | null | undefined;\n\n\t/**\n\t * Extract lastmod date from ssr.data items\n\t * @param item - Data item from ssr.data result\n\t * @returns ISO date string or undefined\n\t */\n\textractLastmod?: (item: Doc) => string | undefined;\n\n\t/** Default changefreq for URLs */\n\tchangefreq?:\n\t\t| 'always'\n\t\t| 'hourly'\n\t\t| 'daily'\n\t\t| 'weekly'\n\t\t| 'monthly'\n\t\t| 'yearly'\n\t\t| 'never';\n\n\t/** Default priority for URLs */\n\tpriority?: number;\n}\n\n/**\n * RSS feed configuration options\n */\ninterface RSSOptions {\n\t/** Enable RSS feed generation (default: false) */\n\tenabled?: boolean;\n\n\t/** Base URL for RSS feeds (e.g., 'https://example.com') - required when enabled */\n\tbaseUrl?: string;\n\n\t/** Feed title (e.g., 'My Blog') */\n\ttitle?: string;\n\n\t/** Feed description */\n\tdescription?: string;\n\n\t/** Maximum number of items per feed (default: 50) */\n\tlimit?: number;\n\n\t/** Feed format: 'rss' or 'atom' (default: 'rss') */\n\tformat?: 'rss' | 'atom';\n\n\t/**\n\t * Completely exclude specific routes from the RSS feed\n\t * Routes listed here will not appear in the feed at all\n\t * @example ['/admin', '/api']\n\t */\n\texcludeRoutes?: string[];\n\n\t/**\n\t * Exclude specific routes from SSR data array discovery\n\t * Routes listed here won't generate multiple feed items from arrays in their SSR data,\n\t * but may still generate a single feed item if appropriate\n\t * @example ['/download', '/pricing'] - won't generate items per array entry\n\t */\n\texcludeDiscovery?: string[];\n\n\t/**\n\t * Extract items from ssr.data result (full control over data shape)\n\t * If provided, this takes precedence over automatic array discovery\n\t * @param data - Full ssr.data result\n\t * @param routePattern - The route pattern (e.g., '/changelog')\n\t * @returns Array of items to process, or null/undefined to skip this route\n\t */\n\textractUrls?: (data: Doc, routePattern: string) => Doc[] | null | undefined;\n\n\t/**\n\t * Extract URL segment from ssr.data items (same as sitemap)\n\t */\n\textractUrl?: (item: Doc, routePattern: string) => string | null | undefined;\n\n\t/**\n\t * Extract publication date from items\n\t */\n\textractPubDate?: (item: Doc) => string | undefined;\n\n\t/**\n\t * Extract author from items\n\t */\n\textractAuthor?: (item: Doc) => string | undefined;\n\n\t/**\n\t * Extract content/body from items\n\t */\n\textractContent?: (item: Doc) => string | undefined;\n\n\t/**\n\t * Extract description/summary from items\n\t * Falls back to item.description or item.excerpt if not provided\n\t */\n\textractDescription?: (item: Doc) => string | undefined;\n}\n\n/**\n * Markdown configuration options\n */\ninterface MarkdownOptions {\n\t/**\n\t * Custom components to use when rendering markdown\n\t * Path to a module that exports a components object compatible with Streamdown\n\t * @example './src/client/lib/markdown-components'\n\t */\n\tcomponents?: string;\n\n\t/** Enable GitHub Flavored Markdown (default: true if remark-gfm is installed) */\n\tenableGfm?: boolean;\n\n\t/** Shiki theme for syntax highlighting (default: 'github-dark') */\n\ttheme?: string;\n}\n\n/**\n * Search index configuration options\n */\ninterface SearchOptions {\n\t/** Enable search index generation (default: false) */\n\tenabled?: boolean;\n\n\t/**\n\t * Collections to include in search index\n\t * @default [] - all collections will be indexed\n\t * @example ['blog', 'docs']\n\t */\n\tcollections?: string[];\n\n\t/**\n\t * Include full content text in search (increases index size significantly)\n\t * @default false - only index headings and metadata\n\t */\n\tincludeContent?: boolean;\n\n\t/**\n\t * Maximum content length to index per item (characters)\n\t * @default 5000 - prevents huge content from bloating index\n\t */\n\tcontentLimit?: number;\n\n\t/**\n\t * Fields to index from frontmatter metadata\n\t * @default ['title', 'description', 'excerpt', 'tags']\n\t */\n\tmetaFields?: string[];\n\n\t/**\n\t * Minimum heading level to index (1-6)\n\t * @default 1 - index all headings\n\t */\n\tminHeadingLevel?: number;\n\n\t/**\n\t * Maximum heading level to index (1-6)\n\t * @default 6 - index all headings\n\t */\n\tmaxHeadingLevel?: number;\n\n\t/**\n\t * Default page size for paginated results\n\t * @default 20\n\t */\n\tdefaultPageSize?: number;\n\n\t/**\n\t * Maximum allowed page size (prevents excessive results)\n\t * @default 100\n\t */\n\tmaxPageSize?: number;\n}\n\ninterface OGImageFont {\n\t/** Font family name (e.g., 'Inter') */\n\tname: string;\n\t/** Path to font file (TTF, OTF, or WOFF) relative to project root */\n\tpath: string;\n\t/** Font weight (e.g., 400, 700, 900) */\n\tweight?: number;\n\t/** Font style (default: 'normal') */\n\tstyle?:\n\t\t| 'normal'\n\t\t| 'italic'\n\t\t| 'bold'\n\t\t| 'bold-italic'\n\t\t| 'medium'\n\t\t| 'medium-italic'\n\t\t| 'semibold'\n\t\t| 'semibold-italic'\n\t\t| 'light'\n\t\t| 'light-italic'\n\t\t| 'thin'\n\t\t| 'thin-italic'\n\t\t| 'black'\n\t\t| 'black-italic'\n\t\t| 'extra-bold'\n\t\t| 'extra-bold-italic'\n\t\t| 'extra-light'\n\t\t| 'extra-light-italic'\n\t\t| 'extra-medium'\n\t\t| 'extra-medium-italic'\n\t\t| 'extra-semibold'\n\t\t| 'extra-semibold-italic'\n\t\t| 'extra-light'\n\t\t| 'extra-light-italic'\n\t\t| 'extra-medium'\n\t\t| 'extra-medium-italic'\n\t\t| 'extra-semibold'\n\t\t| 'extra-semibold-italic';\n\tdata?: ArrayBuffer | undefined;\n}\n\n/**\n * OG Image generation configuration options\n */\ninterface OGImageOptions {\n\t/** Enable OG image generation (default: false) */\n\tenabled?: boolean;\n\n\t/** Base URL for absolute OG image URLs (e.g., 'https://example.com') - required when enabled */\n\tbaseUrl?: string;\n\n\t/** Path to default template component or 'default' for built-in template */\n\tdefaultTemplate?: string;\n\n\t/** Image width in pixels (default: 1200) */\n\twidth?: number;\n\n\t/** Image height in pixels (default: 630) */\n\theight?: number;\n\n\t/** Cache duration in seconds (default: 3600 = 1 hour) */\n\tmaxAge?: number;\n\n\t/** Default avatar/logo URL (can be external or local path) */\n\tavatar?: string;\n\n\t/** Site name to display */\n\tsiteName?: string;\n\n\t/** Custom fonts to load for OG images */\n\tfonts?: OGImageFont[];\n}\n\n/**\n * LLMs content configuration options\n */\ninterface LLMsOptions {\n\t/** Enable LLM content features (default: false) */\n\tenabled?: boolean;\n\n\t/** Base URL for absolute URLs in llms.txt index (e.g., 'https://example.com') */\n\tbaseUrl?: string;\n\n\t/** Enable .txt extension for routes (default: true when enabled) */\n\tenableTextExtension?: boolean;\n\n\t/** Enable .md extension for routes (default: true when enabled) */\n\tenableMarkdownExtension?: boolean;\n\n\t/** Enable Accept header content negotiation (default: true when enabled) */\n\tenableContentNegotiation?: boolean;\n\n\t/** Enable /llms.txt index generation (default: true when enabled) */\n\tenableIndex?: boolean;\n\n\t/** Enable /llms-full.txt generation (default: true when enabled) */\n\tenableFullContent?: boolean;\n\n\t/** Cache duration in seconds for LLM content (default: 86400 = 24 hours, or falls back to options.maxAge) */\n\tmaxAge?: number;\n\n\t/** Cache duration in seconds for llms-full.txt specifically (default: 604800 = 7 days, or falls back to llms.maxAge) */\n\tmaxAgeFull?: number;\n\n\t/** Maximum items in full content bundle (default: 10000) */\n\tmaxItems?: number;\n\n\t/** Maximum file size for full content in bytes (default: 50MB) */\n\tmaxSize?: number;\n\n\t/**\n\t * Exclude specific routes from LLM features\n\t * Supports strings (exact match or substring), RegExp, or custom functions\n\t * @example ['/admin', '/api', /^\\/private/, (path) => path.includes('draft')]\n\t */\n\texcludeRoutes?: (string | RegExp | ((pathname: string) => boolean))[];\n\n\t/**\n\t * Exclude collections from LLM features\n\t * @example ['drafts', 'private']\n\t */\n\texcludeCollections?: string[];\n\n\t/** Site name for index header */\n\tsiteName?: string;\n\n\t/** Site description for index header (brief context for LLMs) */\n\tsiteDescription?: string;\n\n\t/**\n\t * Per-collection customization for titles and descriptions\n\t * @example\n\t * ```ts\n\t * collections: {\n\t * blog: {\n\t * title: 'My Awesome Blog',\n\t * description: 'Insights and tutorials about web development'\n\t * },\n\t * docs: {\n\t * title: 'Documentation',\n\t * description: 'Complete API reference and guides'\n\t * }\n\t * }\n\t * ```\n\t */\n\tcollections?: Record<\n\t\tstring,\n\t\t{\n\t\t\t/** Custom title for this collection's LLMS index */\n\t\t\ttitle?: string;\n\t\t\t/** Custom description for this collection's LLMS index */\n\t\t\tdescription?: string;\n\t\t}\n\t>;\n}\n\n/**\n * Robots policy for specific user-agents\n */\ninterface RobotsPolicy {\n\t/** User-Agent (e.g., '*', 'Googlebot', 'GPTBot') */\n\tuserAgent: string;\n\n\t/** Paths to explicitly allow */\n\tallow?: string[];\n\n\t/** Paths to disallow */\n\tdisallow?: string[];\n\n\t/** Crawl delay for this user-agent (seconds) */\n\tcrawlDelay?: number;\n}\n\n/**\n * Robots.txt generation configuration options\n */\ninterface RobotsOptions {\n\t/** Enable robots.txt generation (default: false) */\n\tenabled?: boolean;\n\n\t/** Base URL for sitemap reference (e.g., 'https://example.com') - required when enabled */\n\tbaseUrl?: string;\n\n\t/** Cache duration in seconds (default: 86400 = 24 hours) */\n\tmaxAge?: number;\n\n\t/** Custom policies per user-agent (default: permissive) */\n\tpolicies?: RobotsPolicy[];\n\n\t/** Auto-reference sitemap.xml if sitemap is enabled (default: true) */\n\treferenceSitemap?: boolean;\n\n\t/** Auto-disallow routes excluded from sitemap (default: true) */\n\tsitemapExclusion?: boolean;\n\n\t/** Auto-disallow old redirect source paths (default: true) */\n\tredirectExclusion?: boolean;\n\n\t/** Additional raw text appended to robots.txt */\n\tcustomRules?: string;\n\n\t/** Global crawl delay in seconds (optional) */\n\tcrawlDelay?: number;\n}\n\n/**\n * Telemetry proxy configuration for forwarding browser telemetry\n */\ninterface TelemetryProxyOptions {\n\t/**\n\t * Enable browser telemetry proxy (default: true when proxy config exists)\n\t * Creates endpoints to forward browser traces/metrics/logs to OTLP backend\n\t * This avoids CORS issues and ad blockers\n\t */\n\tenabled?: boolean;\n\n\t/**\n\t * Base path for proxy endpoints (default: '/__reroute_telemetry')\n\t * Creates:\n\t * - {pathname}/v1/traces\n\t * - {pathname}/v1/metrics\n\t * - {pathname}/v1/logs\n\t * - {pathname}/health\n\t */\n\tpathname?: string;\n\n\t/**\n\t * Enable verbose logging for proxy requests\n\t * @default false\n\t */\n\tverbose?: boolean;\n\n\t/**\n\t * Custom handler for proxy requests (advanced)\n\t * If provided, replaces default OTLP forwarding logic\n\t *\n\t * @example\n\t * ```ts\n\t * handler: async ({ body, endpoint, headers }) => {\n\t * // Custom logic: filter, transform, or route to different backends\n\t * await fetch(`https://custom-backend${endpoint}`, {\n\t * method: 'POST',\n\t * headers,\n\t * body: JSON.stringify(body),\n\t * });\n\t * return { status: 200 };\n\t * }\n\t * ```\n\t */\n\thandler?: (params: {\n\t\tbody: unknown;\n\t\tendpoint: string;\n\t\theaders: Record<string, string>;\n\t\totlpEndpoint: string;\n\t}) => Promise<{ status: number }>;\n}\n\n/**\n * Browser telemetry configuration options\n */\ninterface BrowserTelemetryOptions {\n\t/**\n\t * Enable browser telemetry\n\t * @default true\n\t */\n\tenabled?: boolean;\n\n\t/**\n\t * Service name for browser telemetry\n\t * @default 'reroute-app-browser'\n\t */\n\tserviceName?: string;\n\n\t/**\n\t * Service version\n\t * @default '1.0.0'\n\t */\n\tserviceVersion?: string;\n\n\t/**\n\t * OTLP endpoint URL (use relative URL for same-origin proxy)\n\t * @default '/__reroute_telemetry'\n\t */\n\totlpEndpoint?: string;\n\n\t/**\n\t * API key for authentication (optional)\n\t */\n\tapiKey?: string;\n\n\t/**\n\t * Deployment environment (e.g., 'production', 'staging', 'development')\n\t * @default 'development'\n\t */\n\tenvironment?: string;\n\n\t/**\n\t * Enable console.error capture\n\t * @default true\n\t */\n\tenableConsoleCapture?: boolean;\n\n\t/**\n\t * Ignore specific routes/URLs from breadcrumbs and network tracking\n\t *\n\t * Note: Functions are NOT supported for browser telemetry (closures cannot be serialized)\n\t * Use strings or regex patterns instead\n\t *\n\t * @example\n\t * ```ts\n\t * ignoreRoutes: [\n\t * '/bundles/', // String prefix match\n\t * /\\.(js|css|png)$/, // Regex pattern\n\t * /^\\/assets\\//, // Regex for path prefix\n\t * ]\n\t * ```\n\t */\n\tignoreRoutes?: Array<string | RegExp>;\n}\n\n/**\n * Telemetry configuration options for OpenTelemetry integration\n */\ninterface TelemetryOptions {\n\t/**\n\t * Enable server telemetry collection (default: false)\n\t * Must be explicitly enabled to start collecting traces, metrics, and logs\n\t */\n\tenabled?: boolean;\n\n\t/**\n\t * Browser telemetry configuration\n\t * Configure browser-side telemetry separately from server\n\t */\n\tbrowser?: BrowserTelemetryOptions;\n\n\t/**\n\t * Service name for server telemetry\n\t * @default 'reroute-app'\n\t */\n\tserviceName?: string;\n\n\t/**\n\t * Service version\n\t * @default process.env.npm_package_version || '1.0.0'\n\t */\n\tserviceVersion?: string;\n\n\t/**\n\t * OTLP endpoint URL\n\t * @default process.env.OTEL_EXPORTER_OTLP_ENDPOINT || 'http://localhost:4318'\n\t */\n\totlpEndpoint?: string;\n\n\t/**\n\t * API key for authentication (optional, only needed for SigNoz Cloud)\n\t */\n\tapiKey?: string;\n\n\t/**\n\t * Deployment environment (e.g., 'production', 'staging', 'development')\n\t * Used as a deployment.environment attribute on all telemetry\n\t * @default process.env.NODE_ENV || 'development'\n\t */\n\tenvironment?: string;\n\n\t/**\n\t * Metric export interval in milliseconds\n\t * @default 5000\n\t */\n\tmetricsInterval?: number;\n\n\t/**\n\t * Browser telemetry proxy configuration\n\t * When configured, creates endpoints to forward browser telemetry to OTLP backend\n\t * This avoids CORS issues and ad blockers\n\t */\n\tproxy?: TelemetryProxyOptions;\n\n\t/**\n\t * Ignore specific routes from telemetry collection\n\t * Supports flexible pattern matching:\n\t * - String: Matches if pathname contains the string (e.g., '/assets' matches '/assets/logo.png')\n\t * - RegExp: Tests pathname against regex (e.g., /\\.(js|css)$/ matches file extensions)\n\t * - Function: Custom logic with pathname and method (server-side only)\n\t *\n\t * Note: For browser telemetry, only strings and regex are supported (functions use closures that cannot be serialized)\n\t *\n\t * @example\n\t * ```ts\n\t * ignoreRoutes: [\n\t * '/health', // String match\n\t * /\\.(js|css|png|jpg|svg|ico|woff2?)$/, // Regex for static assets\n\t * (pathname) => pathname.startsWith('/assets/'), // Function (server-side only)\n\t * (pathname, method) => method === 'OPTIONS', // Access to HTTP method (server-side only)\n\t * ]\n\t * ```\n\t */\n\tignoreRoutes?: (\n\t\t| string\n\t\t| RegExp\n\t\t| ((pathname: string, method: string) => boolean)\n\t)[];\n\n\t/**\n\t * Enable distributed tracing (default: true)\n\t * Captures request flows across services with OpenTelemetry traces\n\t */\n\tenableTraces?: boolean;\n\n\t/**\n\t * Enable metrics collection (default: true)\n\t * Captures counters, gauges, and histograms for request volume, duration, etc.\n\t */\n\tenableMetrics?: boolean;\n\n\t/**\n\t * Enable structured logging (default: true)\n\t * Captures log events with structured attributes for better querying\n\t */\n\tenableLogs?: boolean;\n\n\t/**\n\t * Enable system metrics collection (default: true)\n\t * Captures CPU usage, memory consumption, and process metrics\n\t */\n\tenableSystemMetrics?: boolean;\n\n\t/**\n\t * Enable console.error and console.warn capture (default: true)\n\t * Automatically creates telemetry spans for console.error/warn calls\n\t * Useful for catching errors that are logged but not thrown\n\t */\n\tenableConsoleCapture?: boolean;\n\n\t/**\n\t * Sample rate for regular requests (default: 1.0)\n\t * Controls what percentage of requests to track (0.0 = 0%, 1.0 = 100%)\n\t *\n\t * Use sampling to reduce telemetry volume and costs on high-traffic applications:\n\t * - 1.0 = Track every request (100%)\n\t * - 0.5 = Track half of requests (50%)\n\t * - 0.1 = Track 10% of requests\n\t * - 0.01 = Track 1% of requests\n\t *\n\t * Sampling uses random selection, so a 10% sample of 100,000 requests\n\t * still provides ~10,000 data points for statistical analysis\n\t *\n\t * @example sampleRate: 0.1 // Track 10% of requests\n\t */\n\tsampleRate?: number;\n\n\t/**\n\t * Sample rate for error requests (default: 1.0)\n\t * Controls what percentage of errors to track (0.0 = 0%, 1.0 = 100%)\n\t *\n\t * Typically set higher than sampleRate since errors are more important to track.\n\t * Common pattern: low sample rate for normal requests, 100% for errors\n\t *\n\t * @example\n\t * ```ts\n\t * sampleRate: 0.1, // Track 10% of normal requests\n\t * errorSampleRate: 1.0, // Track 100% of errors\n\t * ```\n\t */\n\terrorSampleRate?: number;\n\n\t/**\n\t * HTTP headers to capture as span/log attributes\n\t * Headers are captured with 'http.request.header.' prefix\n\t *\n\t * @example\n\t * ```ts\n\t * captureHeaders: ['user-agent', 'referer', 'x-custom-header']\n\t * // Creates attributes like:\n\t * // - http.request.header.user-agent\n\t * // - http.request.header.referer\n\t * ```\n\t */\n\tcaptureHeaders?: string[];\n\n\t/**\n\t * Custom attributes to add to all spans and logs\n\t * Useful for tagging telemetry with environment, region, version, etc.\n\t *\n\t * @example\n\t * ```ts\n\t * customAttributes: {\n\t * environment: 'production',\n\t * region: 'us-east-1',\n\t * version: '1.2.3',\n\t * }\n\t * ```\n\t */\n\tcustomAttributes?: Record<string, string | number | boolean>;\n\n\t/**\n\t * Source map configuration for production error tracking\n\t * When enabled, error stack traces are mapped to original source files\n\t * instead of compiled/minified code\n\t *\n\t * @example\n\t * ```ts\n\t * sourcemaps: {\n\t * enabled: true, // Enable sourcemap resolution\n\t * }\n\t * ```\n\t */\n\tsourcemaps?: {\n\t\t/**\n\t\t * Enable sourcemap resolution\n\t\t * @default true in production, false in development\n\t\t */\n\t\tenabled?: boolean;\n\t};\n}\n\n/**\n * Redirect handler function that can dynamically determine destination\n * @param url - The original URL object\n * @returns The destination path/url or null to skip redirect\n */\ntype RedirectHandler = (url: URL) => string | null | Promise<string | null>;\n\n/**\n * Individual redirect rule\n */\ninterface RedirectRule {\n\t/** Source path (string or regex pattern) */\n\tsource: string | RegExp;\n\t/** Destination path or handler function */\n\tdestination: string | RedirectHandler;\n\t/** HTTP status code (301 = permanent, 302 = temporary, 307 = preserve method, 308 = permanent preserve method) */\n\tstatus?: 301 | 302 | 307 | 308;\n\t/** Whether source is a regex pattern (auto-detected if source is RegExp) */\n\tregex?: boolean;\n}\n\ninterface ConfigOptions {\n\t// App component - must be string path in config (not ReactElement)\n\tapp?: string;\n\n\t// SSR options\n\thead?: string;\n\tlang?: string;\n\tappId?: string;\n\n\t// Static serving options\n\tassets?: string;\n\tprefix?: string;\n\tignorePatterns?: (string | RegExp)[];\n\tstaticHeaders?: Record<string, string>;\n\tmaxAge?: number;\n\tdirective?: string;\n\tindexHTML?: boolean;\n\n\t// Build options\n\tminify?: boolean;\n\n\t// Compression (applies to both sync and streaming SSR)\n\tcompression?: boolean;\n\n\t// Debug mode - enables detailed performance logging\n\tdebug?: boolean;\n\n\t// Image optimization options\n\timageMaxAge?: number;\n\timageAllowedDomains?: string[];\n\timageMaxWidth?: number;\n\timageMaxHeight?: number;\n\n\t// Bundle caching options\n\tbundleMaxAge?: number;\n}\n\ninterface RerouteConfig {\n\toptions?: ConfigOptions;\n\tstreaming?: StreamingOptions;\n\tredirects?: RedirectRule[];\n\tsitemap?: SitemapOptions;\n\trss?: RSSOptions;\n\tmarkdown?: MarkdownOptions;\n\tsearch?: SearchOptions;\n\togImage?: OGImageOptions;\n\tllms?: LLMsOptions;\n\trobots?: RobotsOptions;\n\ttelemetry?: TelemetryOptions;\n}\n\nfunction defineConfig(config: RerouteConfig): RerouteConfig {\n\treturn config;\n}\n\nasync function loadConfig(cwd: string): Promise<RerouteConfig> {\n\t// Check for bundled config first (compiled binary support)\n\tconst bundledConfig = (globalThis as Record<string, unknown>)\n\t\t.__REROUTE_CONFIG__ as RerouteConfig | undefined;\n\tif (bundledConfig) {\n\t\treturn bundledConfig;\n\t}\n\n\t// Fallback to filesystem read (dev mode)\n\tconst configPath = `${cwd}/reroute.config.ts`;\n\tconst configFile = Bun.file(configPath);\n\n\tif (!(await configFile.exists())) {\n\t\treturn {};\n\t}\n\n\ttry {\n\t\tconst mod = await import(\n\t\t\t`${pathToFileURL(configPath).href}?t=${Date.now()}`\n\t\t);\n\t\treturn (mod.default || mod) as RerouteConfig;\n\t} catch (error) {\n\t\tconsole.warn('[reroute] Failed to load reroute.config.ts:', error);\n\t\treturn {};\n\t}\n}\n\nexport {\n\tdefineConfig,\n\tloadConfig,\n\ttype BrowserTelemetryOptions,\n\ttype ConfigOptions,\n\ttype LLMsOptions,\n\ttype MarkdownOptions,\n\ttype OGImageOptions,\n\ttype OGImageFont,\n\ttype RedirectRule,\n\ttype RerouteConfig,\n\ttype RobotsOptions,\n\ttype RobotsPolicy,\n\ttype RSSOptions,\n\ttype SearchOptions,\n\ttype SitemapOptions,\n\ttype StreamingOptions,\n\ttype TelemetryOptions,\n\ttype TelemetryProxyOptions,\n};\n",
8
8
  "export * from './discovery';\nexport * from './metadata';\n",
9
9
  "import type { CacheEntry } from './types';\n\n/**\n * Simple in-memory cache for SSR data.\n * Thread-safe for single-process usage.\n */\nclass SSRDataCache {\n\tprivate cache: Map<string, CacheEntry<unknown>> = new Map();\n\tprivate static cleanupInterval: NodeJS.Timeout | null = null;\n\n\tconstructor() {\n\t\t// Run cleanup every 60 seconds to remove expired entries\n\t\tif (!SSRDataCache.cleanupInterval) {\n\t\t\tSSRDataCache.cleanupInterval = setInterval(() => {\n\t\t\t\tthis.cleanup();\n\t\t\t}, 60_000);\n\t\t}\n\t}\n\n\t/**\n\t * Get cached data if available and not expired\n\t */\n\tget<T>(key: string): T | undefined {\n\t\tconst entry = this.cache.get(key);\n\t\tif (!entry) return undefined;\n\n\t\tconst age = Date.now() - entry.timestamp;\n\t\tif (age > entry.maxAge) {\n\t\t\tthis.cache.delete(key);\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn entry.data as T;\n\t}\n\n\t/**\n\t * Set data in cache with maxAge (in milliseconds)\n\t */\n\tset<T>(key: string, data: T, maxAge: number): void {\n\t\tif (maxAge <= 0) return;\n\n\t\tthis.cache.set(key, {\n\t\t\tdata,\n\t\t\ttimestamp: Date.now(),\n\t\t\tmaxAge,\n\t\t});\n\t}\n\n\t/**\n\t * Check if key exists and is not expired\n\t */\n\thas(key: string): boolean {\n\t\treturn this.get(key) !== undefined;\n\t}\n\n\t/**\n\t * Clear all cached data\n\t */\n\tclear(): void {\n\t\tthis.cache.clear();\n\t}\n\n\t/**\n\t * Remove expired entries\n\t */\n\tprivate cleanup(): void {\n\t\tconst now = Date.now();\n\t\tfor (const [key, entry] of this.cache.entries()) {\n\t\t\tif (now - entry.timestamp > entry.maxAge) {\n\t\t\t\tthis.cache.delete(key);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Get cache stats (useful for debugging)\n\t */\n\tstats(): { size: number; keys: string[] } {\n\t\treturn {\n\t\t\tsize: this.cache.size,\n\t\t\tkeys: Array.from(this.cache.keys()),\n\t\t};\n\t}\n\n\t/**\n\t * Cleanup interval on shutdown\n\t */\n\tdestroy(): void {\n\t\tif (SSRDataCache.cleanupInterval) {\n\t\t\tclearInterval(SSRDataCache.cleanupInterval);\n\t\t\tSSRDataCache.cleanupInterval = null;\n\t\t}\n\t\tthis.clear();\n\t}\n}\n\n/**\n * Simple LRU Cache implementation.\n * Used for caching responses and data across requests.\n */\nexport class LRUCache<K, V> {\n\tprivate cache: Map<K, V> = new Map();\n\tprivate maxSize: number;\n\n\tconstructor(maxSize = 100) {\n\t\tthis.maxSize = maxSize;\n\t}\n\n\tget(key: K): V | undefined {\n\t\tconst value = this.cache.get(key);\n\t\tif (value !== undefined) {\n\t\t\t// Move to end (most recently used)\n\t\t\tthis.cache.delete(key);\n\t\t\tthis.cache.set(key, value);\n\t\t}\n\t\treturn value;\n\t}\n\n\tset(key: K, value: V): void {\n\t\tthis.cache.delete(key);\n\n\t\tif (this.cache.size >= this.maxSize) {\n\t\t\tconst firstKey = this.cache.keys().next().value;\n\t\t\tthis.cache.delete(firstKey as K);\n\t\t}\n\n\t\tthis.cache.set(key, value);\n\t}\n\n\thas(key: K): boolean {\n\t\treturn this.cache.has(key);\n\t}\n\n\tclear(): void {\n\t\tthis.cache.clear();\n\t}\n}\n\n// Global singleton instances using globalThis for hot reload survival\nconst getGlobalCache = (): SSRDataCache => {\n\tconst g = globalThis as typeof globalThis & {\n\t\t__REROUTE_SSR_CACHE__?: SSRDataCache;\n\t};\n\n\tif (!g.__REROUTE_SSR_CACHE__) {\n\t\tg.__REROUTE_SSR_CACHE__ = new SSRDataCache();\n\t}\n\n\treturn g.__REROUTE_SSR_CACHE__;\n};\n\nconst getGlobalStatusCache = (): SSRDataCache => {\n\tconst g = globalThis as typeof globalThis & {\n\t\t__REROUTE_STATUS_CACHE__?: SSRDataCache;\n\t};\n\n\tif (!g.__REROUTE_STATUS_CACHE__) {\n\t\tg.__REROUTE_STATUS_CACHE__ = new SSRDataCache();\n\t}\n\n\treturn g.__REROUTE_STATUS_CACHE__;\n};\n\nconst ssrCache = getGlobalCache();\nconst statusCache = getGlobalStatusCache();\n\nexport { ssrCache, statusCache, SSRDataCache };\n",
10
10
  "import { dynamicImport } from './imports';\nimport { join } from './path';\nimport type { Doc } from './types';\n\n/**\n * Load content collections for SSR rendering\n */\nexport async function loadCollections(\n\tcwd: string,\n\tisWatchMode: boolean,\n): Promise<Record<string, unknown[]>> {\n\ttry {\n\t\tconst p = join(cwd, '.reroute', 'content.ts');\n\t\tconst mod = await dynamicImport(p, isWatchMode);\n\t\treturn (mod?.byCollection || {}) as Record<string, unknown[]>;\n\t} catch {\n\t\treturn {};\n\t}\n}\n\n/**\n * Set global collections for SSR\n */\nexport function setGlobalCollections(\n\tbyCollectionForSSR: Record<string, unknown[]>,\n): void {\n\ttry {\n\t\t(globalThis as Doc).__REROUTE_COLLECTIONS__ = byCollectionForSSR;\n\t} catch {\n\t\t// Ignore errors in restricted environments\n\t}\n}\n",
@@ -36,11 +36,11 @@
36
36
  "export * from './bundler';\nexport * from './config';\nexport * from './content';\nexport * from './llms';\nexport * from './og';\nexport * from './robots';\nexport * from './rss';\nexport * from './sitemap';\nexport * from './ssr';\n",
37
37
  "export * from './src';\n",
38
38
  "import { promises as fs } from 'node:fs';\nimport { join } from 'node:path';\nimport { SourceMapConsumer } from 'source-map';\n\ninterface SourceMappedPosition {\n\tsource: string | null;\n\tline: number | null;\n\tcolumn: number | null;\n\tname: string | null;\n}\n\ninterface StackFrame {\n\traw: string;\n\tfunctionName?: string;\n\tfileName?: string;\n\tlineNumber?: number;\n\tcolumnNumber?: number;\n\tmapped?: SourceMappedPosition;\n}\n\n/**\n * Cache for loaded sourcemaps\n */\nconst sourcemapCache = new Map<string, SourceMapConsumer>();\n\n/**\n * Parse a stack trace line into a structured frame\n */\n// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Stack frame parsing requires many conditions\nfunction parseStackFrame(line: string): StackFrame {\n\t// Common stack trace patterns:\n\t// at functionName (file:line:column)\n\t// at file:line:column\n\t// at <anonymous>\n\n\tconst patterns = [\n\t\t// Chrome/V8: at functionName (file:line:column)\n\t\t/^\\s*at\\s+(.+?)\\s+\\((.+?):(\\d+):(\\d+)\\)/,\n\t\t// Chrome/V8: at file:line:column\n\t\t/^\\s*at\\s+(.+?):(\\d+):(\\d+)/,\n\t\t// Firefox: functionName@file:line:column\n\t\t/^(.+?)@(.+?):(\\d+):(\\d+)/,\n\t];\n\n\tfor (const pattern of patterns) {\n\t\tconst match = line.match(pattern);\n\t\tif (match) {\n\t\t\tif (match.length === 5 && match[2]) {\n\t\t\t\t// Pattern with function name\n\t\t\t\treturn {\n\t\t\t\t\traw: line,\n\t\t\t\t\tfunctionName: match[1].trim(),\n\t\t\t\t\tfileName: match[2],\n\t\t\t\t\tlineNumber: Number.parseInt(match[3], 10),\n\t\t\t\t\tcolumnNumber: Number.parseInt(match[4], 10),\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (match.length === 4 && match[1]) {\n\t\t\t\t// Pattern without function name or Firefox pattern\n\t\t\t\tconst hasAt = line.includes('@');\n\t\t\t\treturn {\n\t\t\t\t\traw: line,\n\t\t\t\t\tfunctionName: hasAt ? match[1] : undefined,\n\t\t\t\t\tfileName: hasAt ? match[2] : match[1],\n\t\t\t\t\tlineNumber: Number.parseInt(hasAt ? match[3] : match[2], 10),\n\t\t\t\t\tcolumnNumber: Number.parseInt(hasAt ? match[4] : match[3], 10),\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { raw: line };\n}\n\n/**\n * Find and load a sourcemap for a given file\n */\nasync function loadSourceMap(\n\tfileName: string,\n\trerouteDir?: string,\n): Promise<SourceMapConsumer | null> {\n\t// Check cache first\n\tif (sourcemapCache.has(fileName)) {\n\t\treturn sourcemapCache.get(fileName) || null;\n\t}\n\n\ttry {\n\t\t// Common locations to check for sourcemaps\n\t\tconst possiblePaths: string[] = [];\n\n\t\t// If we have a .reroute directory, look there\n\t\tif (rerouteDir) {\n\t\t\t// Extract just the filename from the path\n\t\t\tconst baseName = fileName.split('/').pop() || fileName;\n\t\t\tpossiblePaths.push(join(rerouteDir, 'bundles', `${baseName}.map`));\n\t\t}\n\n\t\t// Also try adjacent to the file\n\t\tpossiblePaths.push(`${fileName}.map`);\n\n\t\tfor (const mapPath of possiblePaths) {\n\t\t\ttry {\n\t\t\t\tconst mapContent = await fs.readFile(mapPath, 'utf-8');\n\t\t\t\tconst consumer = await new SourceMapConsumer(mapContent);\n\t\t\t\tsourcemapCache.set(fileName, consumer);\n\t\t\t\treturn consumer;\n\t\t\t} catch {}\n\t\t}\n\n\t\treturn null;\n\t} catch (error) {\n\t\tconsole.error(\n\t\t\t`[sourcemap] Failed to load sourcemap for ${fileName}:`,\n\t\t\terror,\n\t\t);\n\t\treturn null;\n\t}\n}\n\n/**\n * Map a position using a sourcemap consumer\n */\nfunction mapPosition(\n\tconsumer: SourceMapConsumer,\n\tline: number,\n\tcolumn: number,\n): SourceMappedPosition {\n\tconst pos = consumer.originalPositionFor({ line, column });\n\treturn {\n\t\tsource: pos.source,\n\t\tline: pos.line,\n\t\tcolumn: pos.column,\n\t\tname: pos.name,\n\t};\n}\n\n/**\n * Process a stack trace and resolve source positions\n */\nexport async function resolveStackTrace(\n\tstack: string,\n\toptions: {\n\t\trerouteDir?: string;\n\t\tcwd?: string;\n\t} = {},\n): Promise<{\n\toriginal: string;\n\tframes: StackFrame[];\n\tmapped: string;\n}> {\n\tconst lines = stack.split('\\n');\n\tconst frames: StackFrame[] = [];\n\n\tfor (const line of lines) {\n\t\tconst frame = parseStackFrame(line);\n\t\tif (frame?.fileName && frame.lineNumber && frame.columnNumber) {\n\t\t\ttry {\n\t\t\t\tconst consumer = await loadSourceMap(\n\t\t\t\t\tframe.fileName,\n\t\t\t\t\toptions.rerouteDir,\n\t\t\t\t);\n\t\t\t\tif (consumer) {\n\t\t\t\t\tframe.mapped = mapPosition(\n\t\t\t\t\t\tconsumer,\n\t\t\t\t\t\tframe.lineNumber,\n\t\t\t\t\t\tframe.columnNumber,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} catch (_error) {\n\t\t\t\t// Keep frame without mapping\n\t\t\t}\n\t\t}\n\t\tframes.push(frame);\n\t}\n\n\t// Generate mapped stack trace\n\tconst mappedLines = frames.map((frame) => {\n\t\tif (frame.mapped?.source && frame.mapped.line !== null) {\n\t\t\tconst location = `${frame.mapped.source}:${frame.mapped.line}:${frame.mapped.column ?? 0}`;\n\t\t\tif (frame.mapped.name || frame.functionName) {\n\t\t\t\treturn ` at ${frame.mapped.name || frame.functionName} (${location})`;\n\t\t\t}\n\t\t\treturn ` at ${location}`;\n\t\t}\n\t\treturn frame.raw;\n\t});\n\n\treturn {\n\t\toriginal: stack,\n\t\tframes,\n\t\tmapped: mappedLines.join('\\n'),\n\t};\n}\n\n/**\n * Enhance error with source-mapped stack trace\n * Adds a `sourceMappedStack` property to the error object\n */\nexport async function enhanceError(\n\terror: Error,\n\toptions: {\n\t\trerouteDir?: string;\n\t\tcwd?: string;\n\t} = {},\n): Promise<Error & { sourceMappedStack?: string; stackFrames?: StackFrame[] }> {\n\tif (!error.stack) return error;\n\n\ttry {\n\t\tconst result = await resolveStackTrace(error.stack, options);\n\t\t// Attach enhanced info to the error object\n\t\t(\n\t\t\terror as Error & {\n\t\t\t\tsourceMappedStack?: string;\n\t\t\t\tstackFrames?: StackFrame[];\n\t\t\t}\n\t\t).sourceMappedStack = result.mapped;\n\t\t(error as Error & { stackFrames?: StackFrame[] }).stackFrames =\n\t\t\tresult.frames;\n\t} catch {\n\t\t// Silently fail - source mapping is optional\n\t}\n\n\treturn error;\n}\n\n/**\n * Clear the sourcemap cache (useful for development)\n */\nexport function clearSourceMapCache(): void {\n\tfor (const consumer of sourcemapCache.values()) {\n\t\tconsumer.destroy();\n\t}\n\tsourcemapCache.clear();\n}\n\n/**\n * Format stack frames for display\n */\nexport function formatStackFrames(frames: StackFrame[]): string {\n\treturn frames\n\t\t.map((frame) => {\n\t\t\tif (frame.mapped?.source && frame.mapped.line !== null) {\n\t\t\t\tconst location = `${frame.mapped.source}:${frame.mapped.line}:${frame.mapped.column ?? 0}`;\n\t\t\t\tif (frame.mapped.name || frame.functionName) {\n\t\t\t\t\treturn ` at ${frame.mapped.name || frame.functionName} (${location})`;\n\t\t\t\t}\n\t\t\t\treturn ` at ${location}`;\n\t\t\t}\n\t\t\treturn frame.raw;\n\t\t})\n\t\t.join('\\n');\n}\n",
39
- "import os from 'node:os';\nimport {\n\ttype Counter,\n\tcontext,\n\ttype Histogram,\n\tmetrics,\n\ttype Span,\n\tSpanStatusCode,\n\ttrace,\n\ttype UpDownCounter,\n} from '@opentelemetry/api';\nimport { logs, SeverityNumber } from '@opentelemetry/api-logs';\nimport { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-proto';\nimport { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-proto';\nimport { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto';\nimport { resourceFromAttributes } from '@opentelemetry/resources';\nimport {\n\tBatchLogRecordProcessor,\n\tLoggerProvider,\n} from '@opentelemetry/sdk-logs';\nimport {\n\tMeterProvider,\n\tPeriodicExportingMetricReader,\n} from '@opentelemetry/sdk-metrics';\nimport {\n\tBatchSpanProcessor,\n\tNodeTracerProvider,\n} from '@opentelemetry/sdk-trace-node';\nimport {\n\tATTR_SERVICE_NAME,\n\tATTR_SERVICE_VERSION,\n} from '@opentelemetry/semantic-conventions';\nimport { ATTR_HOST_NAME } from '@opentelemetry/semantic-conventions/incubating';\nimport type { Elysia } from 'elysia';\nimport { loadConfig, type TelemetryOptions } from 'reroute-js/core';\nimport { getContextAttributesForTelemetry } from './context';\nimport { extractTraceContext } from './instrumentation';\nimport { enhanceError } from './sourcemap';\n\n/**\n * Server telemetry options\n * Extends TelemetryOptions from config - all options can be set in reroute.config.ts\n * or passed directly here (direct options override config values)\n */\nexport interface ServerTelemetryOptions extends TelemetryOptions {}\n\n// Helper to extract error details\nfunction getErrorDetails(error: unknown): {\n\tname: string;\n\tmessage: string;\n\tstack: string;\n} {\n\tif (error instanceof Error) {\n\t\treturn {\n\t\t\tname: error.name,\n\t\t\tmessage: error.message,\n\t\t\tstack: error.stack || '',\n\t\t};\n\t}\n\n\tif (typeof error === 'object' && error !== null) {\n\t\tconst err = error as Record<string, unknown>;\n\t\treturn {\n\t\t\tname: String(err.name || err.code || 'UnknownError'),\n\t\t\tmessage: String(err.message || err.error || JSON.stringify(error)),\n\t\t\tstack: String(err.stack || ''),\n\t\t};\n\t}\n\n\treturn {\n\t\tname: 'UnknownError',\n\t\tmessage: String(error),\n\t\tstack: '',\n\t};\n}\n\n/**\n * Check if a route should be ignored based on ignore patterns\n * Supports strings, RegExp, and custom functions\n */\nfunction shouldIgnoreRoute(\n\tpatterns: (\n\t\t| string\n\t\t| RegExp\n\t\t| ((pathname: string, method: string) => boolean)\n\t)[],\n\tpathname: string,\n\tmethod: string,\n): boolean {\n\treturn patterns.some((pattern) => {\n\t\tif (typeof pattern === 'string') {\n\t\t\treturn pathname.includes(pattern);\n\t\t}\n\t\tif (pattern instanceof RegExp) {\n\t\t\treturn pattern.test(pathname);\n\t\t}\n\t\tif (typeof pattern === 'function') {\n\t\t\treturn pattern(pathname, method);\n\t\t}\n\t\treturn false;\n\t});\n}\n\n/**\n * Determine if a request should be sampled based on sample rate\n * @param rate - Sample rate between 0.0 and 1.0\n * @returns true if request should be sampled\n */\nfunction shouldSample(rate: number): boolean {\n\treturn Math.random() < rate;\n}\n\n/**\n * Server-side telemetry plugin for Elysia\n *\n * Automatically captures:\n * - HTTP requests and responses\n * - Errors with full stack traces\n * - System metrics (CPU, memory)\n * - Request/response sizes\n * - Active connections\n *\n * Configuration is loaded from reroute.config.ts automatically.\n * Direct options override config values.\n *\n * @example\n * ```typescript\n * import { Elysia } from 'elysia';\n * import { telemetry } from 'reroute-js/telemetry/server';\n *\n * new Elysia()\n * .use(telemetry({\n * serviceName: 'My App',\n * }))\n * .listen(3000);\n * ```\n */\nexport function telemetry(options: ServerTelemetryOptions = {}) {\n\t// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Telemetry initialization with config loading and feature toggles\n\treturn async (app: Elysia) => {\n\t\t// Load reroute.config.ts automatically\n\t\tconst cwd =\n\t\t\ttypeof process !== 'undefined' && typeof process.cwd === 'function'\n\t\t\t\t? process.cwd()\n\t\t\t\t: '/';\n\t\tconst config = await loadConfig(cwd);\n\n\t\t// Merge config with direct options (direct options take precedence)\n\t\tconst merged = {\n\t\t\t...config.telemetry,\n\t\t\t...options,\n\t\t};\n\n\t\t// Check if telemetry is enabled (default: false)\n\t\tconst TELEMETRY_ENABLED = merged.enabled ?? false;\n\t\tif (!TELEMETRY_ENABLED) {\n\t\t\tconsole.log(\n\t\t\t\t'[telemetry] Disabled - set enabled: true in config or options to enable',\n\t\t\t);\n\t\t\t// Return app unchanged when disabled\n\t\t\treturn app;\n\t\t}\n\n\t\t// Extract configuration values\n\t\tconst SERVICE_NAME = merged.serviceName || 'reroute-app';\n\t\tconst SERVICE_VERSION =\n\t\t\tmerged.serviceVersion || process.env.npm_package_version || '1.0.0';\n\t\tconst OTLP_ENDPOINT =\n\t\t\tmerged.otlpEndpoint ||\n\t\t\tprocess.env.OTEL_EXPORTER_OTLP_ENDPOINT ||\n\t\t\t'http://localhost:4318';\n\t\tconst METRICS_INTERVAL = merged.metricsInterval ?? 5000;\n\n\t\t// Handle proxy configuration\n\t\tconst proxyConfig = merged.proxy;\n\t\tconst ENABLE_PROXY = proxyConfig?.enabled ?? !!proxyConfig;\n\t\tconst PROXY_PATHNAME = proxyConfig?.pathname ?? '/__reroute_telemetry';\n\t\tconst PROXY_VERBOSE = proxyConfig?.verbose ?? false;\n\t\tconst PROXY_HANDLER = proxyConfig?.handler;\n\n\t\t// Feature toggles (default: true when telemetry is enabled)\n\t\tconst ENABLE_TRACES = merged.enableTraces ?? true;\n\t\tconst ENABLE_METRICS = merged.enableMetrics ?? true;\n\t\tconst ENABLE_LOGS = merged.enableLogs ?? true;\n\t\tconst ENABLE_SYSTEM_METRICS = merged.enableSystemMetrics ?? true;\n\n\t\t// Sampling configuration\n\t\tconst SAMPLE_RATE = merged.sampleRate ?? 1.0;\n\t\tconst ERROR_SAMPLE_RATE = merged.errorSampleRate ?? 1.0;\n\n\t\t// Route filtering\n\t\tconst IGNORE_ROUTES = merged.ignoreRoutes || [];\n\n\t\t// Header capture and custom attributes\n\t\tconst CAPTURE_HEADERS = merged.captureHeaders || [];\n\t\tconst CUSTOM_ATTRIBUTES = merged.customAttributes || {};\n\n\t\tconsole.log(`[telemetry] Initializing with endpoint: ${OTLP_ENDPOINT}`);\n\t\tconsole.log(\n\t\t\t`[telemetry] Features - Traces: ${ENABLE_TRACES}, Metrics: ${ENABLE_METRICS}, Logs: ${ENABLE_LOGS}`,\n\t\t);\n\t\tif (SAMPLE_RATE < 1.0) {\n\t\t\tconsole.log(\n\t\t\t\t`[telemetry] Sampling - Requests: ${SAMPLE_RATE * 100}%, Errors: ${ERROR_SAMPLE_RATE * 100}%`,\n\t\t\t);\n\t\t}\n\t\tif (ENABLE_PROXY) {\n\t\t\tconsole.log(\n\t\t\t\t`[telemetry] Browser telemetry proxy enabled at ${PROXY_PATHNAME}/*`,\n\t\t\t);\n\t\t}\n\n\t\t// Secure headers for API authentication (optional)\n\t\tconst otlpHeaders: Record<string, string> = {};\n\t\tif (merged.apiKey || process.env.SIGNOZ_API_KEY) {\n\t\t\totlpHeaders.Authorization = `Bearer ${merged.apiKey || process.env.SIGNOZ_API_KEY}`;\n\t\t}\n\n\t\t// Configure OTLP exporters with timeouts (conditionally based on feature toggles)\n\t\tconst traceExporter = ENABLE_TRACES\n\t\t\t? new OTLPTraceExporter({\n\t\t\t\t\turl: `${OTLP_ENDPOINT}/v1/traces`,\n\t\t\t\t\theaders:\n\t\t\t\t\t\tObject.keys(otlpHeaders).length > 0 ? otlpHeaders : undefined,\n\t\t\t\t\ttimeoutMillis: 5000, // 5 second timeout\n\t\t\t\t})\n\t\t\t: null;\n\n\t\tconst logExporter = ENABLE_LOGS\n\t\t\t? new OTLPLogExporter({\n\t\t\t\t\turl: `${OTLP_ENDPOINT}/v1/logs`,\n\t\t\t\t\theaders:\n\t\t\t\t\t\tObject.keys(otlpHeaders).length > 0 ? otlpHeaders : undefined,\n\t\t\t\t\ttimeoutMillis: 5000, // 5 second timeout\n\t\t\t\t})\n\t\t\t: null;\n\n\t\tconst metricExporter = ENABLE_METRICS\n\t\t\t? new OTLPMetricExporter({\n\t\t\t\t\turl: `${OTLP_ENDPOINT}/v1/metrics`,\n\t\t\t\t\theaders:\n\t\t\t\t\t\tObject.keys(otlpHeaders).length > 0 ? otlpHeaders : undefined,\n\t\t\t\t\ttimeoutMillis: 5000, // 5 second timeout\n\t\t\t\t})\n\t\t\t: null;\n\n\t\t// Create resource with service information\n\t\t// In Docker, prefer env var over os.hostname() (which returns container ID)\n\t\tconst HOSTNAME =\n\t\t\tprocess.env.OTEL_RESOURCE_ATTRIBUTES?.match(/host\\.name=([^,]+)/)?.[1] ||\n\t\t\tprocess.env.HOSTNAME ||\n\t\t\tos.hostname();\n\n\t\tconst resource = resourceFromAttributes({\n\t\t\t[ATTR_SERVICE_NAME]: SERVICE_NAME,\n\t\t\t[ATTR_SERVICE_VERSION]: SERVICE_VERSION,\n\t\t\t[ATTR_HOST_NAME]: HOSTNAME,\n\t\t});\n\n\t\t// Set up Traces with error handling (only if enabled)\n\t\tif (ENABLE_TRACES && traceExporter) {\n\t\t\ttry {\n\t\t\t\tconst tracerProvider = new NodeTracerProvider({\n\t\t\t\t\tresource,\n\t\t\t\t\tspanProcessors: [new BatchSpanProcessor(traceExporter)],\n\t\t\t\t});\n\t\t\t\ttracerProvider.register();\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('[telemetry] Failed to initialize tracer:', error);\n\t\t\t}\n\t\t}\n\n\t\t// Set up Logs with error handling (only if enabled)\n\t\tlet logger: ReturnType<LoggerProvider['getLogger']> | null = null;\n\t\tif (ENABLE_LOGS && logExporter) {\n\t\t\ttry {\n\t\t\t\tconst loggerProvider = new LoggerProvider({\n\t\t\t\t\tresource,\n\t\t\t\t\tprocessors: [new BatchLogRecordProcessor(logExporter)],\n\t\t\t\t});\n\t\t\t\tlogs.setGlobalLoggerProvider(loggerProvider);\n\t\t\t\tlogger = loggerProvider.getLogger(SERVICE_NAME, SERVICE_VERSION);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('[telemetry] Failed to initialize logger:', error);\n\t\t\t}\n\t\t}\n\n\t\t// Set up Metrics with error handling (only if enabled)\n\t\tlet meter: ReturnType<MeterProvider['getMeter']> | null = null;\n\t\tif (ENABLE_METRICS && metricExporter) {\n\t\t\ttry {\n\t\t\t\tconst meterProvider = new MeterProvider({\n\t\t\t\t\tresource,\n\t\t\t\t\treaders: [\n\t\t\t\t\t\tnew PeriodicExportingMetricReader({\n\t\t\t\t\t\t\texporter: metricExporter,\n\t\t\t\t\t\t\texportIntervalMillis: METRICS_INTERVAL,\n\t\t\t\t\t\t}),\n\t\t\t\t\t],\n\t\t\t\t});\n\t\t\t\tmetrics.setGlobalMeterProvider(meterProvider);\n\t\t\t\tmeter = meterProvider.getMeter(SERVICE_NAME, SERVICE_VERSION);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('[telemetry] Failed to initialize meter:', error);\n\t\t\t}\n\t\t}\n\n\t\t// Create HTTP metrics with null checks\n\t\tlet httpRequestCounter: Counter | null = null;\n\t\tlet httpRequestDuration: Histogram | null = null;\n\t\tlet httpErrorCounter: Counter | null = null;\n\t\tlet httpActiveRequests: UpDownCounter | null = null;\n\t\tlet activeConnections: UpDownCounter | null = null;\n\n\t\tif (meter) {\n\t\t\ttry {\n\t\t\t\thttpRequestCounter = meter.createCounter('http.server.request.count', {\n\t\t\t\t\tdescription: 'Total HTTP requests',\n\t\t\t\t\tunit: 'requests',\n\t\t\t\t});\n\n\t\t\t\thttpRequestDuration = meter.createHistogram(\n\t\t\t\t\t'http.server.request.duration',\n\t\t\t\t\t{\n\t\t\t\t\t\tdescription: 'HTTP request duration',\n\t\t\t\t\t\tunit: 'milliseconds',\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\thttpErrorCounter = meter.createCounter('http.server.error.count', {\n\t\t\t\t\tdescription: 'Total HTTP errors',\n\t\t\t\t\tunit: 'errors',\n\t\t\t\t});\n\n\t\t\t\thttpActiveRequests = meter.createUpDownCounter(\n\t\t\t\t\t'http.server.active_requests',\n\t\t\t\t\t{\n\t\t\t\t\t\tdescription: 'Active HTTP requests',\n\t\t\t\t\t\tunit: 'requests',\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tactiveConnections = meter.createUpDownCounter(\n\t\t\t\t\t'app.connections.active',\n\t\t\t\t\t{\n\t\t\t\t\t\tdescription: 'Active connections',\n\t\t\t\t\t\tunit: 'connections',\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('[telemetry] Failed to create HTTP metrics:', error);\n\t\t\t}\n\t\t}\n\n\t\t// Create system metrics (optional) with error handling\n\t\tif (ENABLE_SYSTEM_METRICS && meter) {\n\t\t\ttry {\n\t\t\t\t// Reuse HOSTNAME from resource (already computed above)\n\n\t\t\t\tconst memoryUsage = meter.createObservableGauge('app.memory.usage', {\n\t\t\t\t\tdescription: 'Process memory usage',\n\t\t\t\t\tunit: 'bytes',\n\t\t\t\t});\n\n\t\t\t\tmemoryUsage.addCallback((result) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst usage = process.memoryUsage();\n\t\t\t\t\t\tresult.observe(usage.heapUsed, {\n\t\t\t\t\t\t\ttype: 'heap',\n\t\t\t\t\t\t\t'host.name': HOSTNAME,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tresult.observe(usage.rss, { type: 'rss', 'host.name': HOSTNAME });\n\t\t\t\t\t\tresult.observe(usage.external, {\n\t\t\t\t\t\t\ttype: 'external',\n\t\t\t\t\t\t\t'host.name': HOSTNAME,\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.error('[telemetry] Memory usage callback failed:', error);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tconst systemCpuUsage = meter.createObservableGauge(\n\t\t\t\t\t'system.cpu.utilization',\n\t\t\t\t\t{\n\t\t\t\t\t\tdescription: 'System CPU utilization',\n\t\t\t\t\t\tunit: '1',\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tsystemCpuUsage.addCallback((result) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst cpus = os.cpus();\n\t\t\t\t\t\tlet totalIdle = 0;\n\t\t\t\t\t\tlet totalTick = 0;\n\n\t\t\t\t\t\tcpus.forEach((cpu) => {\n\t\t\t\t\t\t\tconst times = cpu.times;\n\t\t\t\t\t\t\ttotalIdle += times.idle;\n\t\t\t\t\t\t\ttotalTick +=\n\t\t\t\t\t\t\t\ttimes.user + times.nice + times.sys + times.idle + times.irq;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tconst usage = 1 - totalIdle / totalTick;\n\t\t\t\t\t\tresult.observe(usage, {\n\t\t\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t\t\t'host.name': HOSTNAME,\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.error('[telemetry] CPU usage callback failed:', error);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tconst systemMemoryUsage = meter.createObservableGauge(\n\t\t\t\t\t'system.memory.utilization',\n\t\t\t\t\t{\n\t\t\t\t\t\tdescription: 'System memory utilization',\n\t\t\t\t\t\tunit: '1',\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tsystemMemoryUsage.addCallback((result) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst totalMem = os.totalmem();\n\t\t\t\t\t\tconst freeMem = os.freemem();\n\t\t\t\t\t\tconst usage = (totalMem - freeMem) / totalMem;\n\n\t\t\t\t\t\tresult.observe(usage, {\n\t\t\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t\t\t'host.name': HOSTNAME,\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.error('[telemetry] System memory callback failed:', error);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('[telemetry] Failed to create system metrics:', error);\n\t\t\t}\n\t\t}\n\n\t\t// Graceful shutdown with error handling\n\t\tconst shutdown = async () => {\n\t\t\tconsole.log('[telemetry] Shutting down...');\n\t\t\ttry {\n\t\t\t\t// Note: We can't reference loggerProvider/meterProvider here since they're in try blocks\n\t\t\t\t// The providers will be cleaned up automatically\n\t\t\t\tawait logs.disable();\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('[telemetry] Shutdown error:', error);\n\t\t\t}\n\t\t};\n\n\t\tprocess.on('SIGTERM', async () => {\n\t\t\tawait shutdown();\n\t\t\tprocess.exit(0);\n\t\t});\n\n\t\t// Initialize tracer for manual span creation\n\t\tlet tracer: ReturnType<typeof trace.getTracer> | null = null;\n\t\tif (ENABLE_TRACES && traceExporter) {\n\t\t\ttracer = trace.getTracer(SERVICE_NAME, SERVICE_VERSION);\n\t\t}\n\n\t\tapp = app\n\t\t\t// Track incoming requests\n\t\t\t// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Request tracking with filtering and sampling\n\t\t\t.onBeforeHandle(({ request, store }) => {\n\t\t\t\tconst startTime = Date.now();\n\t\t\t\tconst url = new URL(request.url);\n\t\t\t\tconst route = url.pathname;\n\t\t\t\tconst method = request.method;\n\n\t\t\t\t(store as Record<string, unknown>).startTime = startTime;\n\t\t\t\t(store as Record<string, unknown>).route = route;\n\n\t\t\t\t// Check if route should be ignored\n\t\t\t\tconst shouldIgnore =\n\t\t\t\t\tIGNORE_ROUTES.length > 0 &&\n\t\t\t\t\tshouldIgnoreRoute(IGNORE_ROUTES, route, method);\n\t\t\t\t(store as Record<string, unknown>).shouldIgnoreTelemetry = shouldIgnore;\n\n\t\t\t\t// Apply sampling (skip if ignored or not sampled)\n\t\t\t\tif (!shouldIgnore) {\n\t\t\t\t\tconst sampled = shouldSample(SAMPLE_RATE);\n\t\t\t\t\t(store as Record<string, unknown>).isSampled = sampled;\n\t\t\t\t\tif (!sampled) {\n\t\t\t\t\t\t(store as Record<string, unknown>).shouldIgnoreTelemetry = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Extract incoming trace context from browser (if present)\n\t\t\t\t// This allows browser spans to link to server spans\n\t\t\t\tconst incomingContext = extractTraceContext(request.headers);\n\n\t\t\t\t// Create manual span for request if traces enabled and not ignored\n\t\t\t\tif (\n\t\t\t\t\ttracer &&\n\t\t\t\t\t!(store as Record<string, unknown>).shouldIgnoreTelemetry\n\t\t\t\t) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Create span within extracted context (if available)\n\t\t\t\t\t\tconst createSpan = () => {\n\t\t\t\t\t\t\treturn tracer.startSpan(`${method} ${route}`, {\n\t\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\t\t\t\t'http.route': route,\n\t\t\t\t\t\t\t\t\t'url.full': request.url,\n\t\t\t\t\t\t\t\t\t'url.scheme': url.protocol.replace(':', ''),\n\t\t\t\t\t\t\t\t\t'server.address': url.host,\n\t\t\t\t\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tconst span = incomingContext\n\t\t\t\t\t\t\t? context.with(incomingContext, createSpan)\n\t\t\t\t\t\t\t: createSpan();\n\n\t\t\t\t\t\t// Add session attributes if any\n\t\t\t\t\t\tconst sessionAttrs = getContextAttributesForTelemetry();\n\t\t\t\t\t\tif (Object.keys(sessionAttrs).length > 0) {\n\t\t\t\t\t\t\tspan.setAttributes(sessionAttrs);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t(store as Record<string, unknown>).telemetrySpan = span;\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.error('[telemetry] Failed to create span:', error);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Always track active connections for metrics accuracy\n\t\t\t\ttry {\n\t\t\t\t\tactiveConnections?.add(1);\n\t\t\t\t\thttpActiveRequests?.add(1, {\n\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\troute,\n\t\t\t\t\t});\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error('[telemetry] Failed to track active requests:', error);\n\t\t\t\t}\n\n\t\t\t\t// Skip detailed telemetry if ignored or not sampled\n\t\t\t\tif ((store as Record<string, unknown>).shouldIgnoreTelemetry) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Capture request headers if configured\n\t\t\t\tconst capturedHeaders: Record<string, string> = {};\n\t\t\t\tfor (const headerName of CAPTURE_HEADERS) {\n\t\t\t\t\tconst headerValue = request.headers.get(headerName);\n\t\t\t\t\tif (headerValue) {\n\t\t\t\t\t\tcapturedHeaders[`http.request.header.${headerName}`] = headerValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Build attributes with custom attributes and captured headers\n\t\t\t\tconst baseAttributes = {\n\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t'url.full': request.url,\n\t\t\t\t\t'http.route': route,\n\t\t\t\t\t'url.scheme': url.protocol.replace(':', ''),\n\t\t\t\t\t'server.address': url.host,\n\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t...capturedHeaders,\n\t\t\t\t};\n\n\t\t\t\t// Log incoming request - wrapped in try/catch to prevent blocking\n\t\t\t\ttry {\n\t\t\t\t\tlogger?.emit({\n\t\t\t\t\t\tseverityNumber: SeverityNumber.INFO,\n\t\t\t\t\t\tseverityText: 'INFO',\n\t\t\t\t\t\tbody: `→ ${method} ${route}`,\n\t\t\t\t\t\tattributes: baseAttributes,\n\t\t\t\t\t});\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error('[telemetry] Failed to log incoming request:', error);\n\t\t\t\t}\n\n\t\t\t\t// Increment request counter - wrapped in try/catch to prevent blocking\n\t\t\t\ttry {\n\t\t\t\t\thttpRequestCounter?.add(1, {\n\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\t'http.route': route,\n\t\t\t\t\t\t'url.scheme': url.protocol.replace(':', ''),\n\t\t\t\t\t});\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'[telemetry] Failed to increment request counter:',\n\t\t\t\t\t\terror,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t})\n\t\t\t// Handle errors with full context\n\t\t\t// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Error handling with context\n\t\t\t.onError(async ({ error, request, set, store }) => {\n\t\t\t\tconst errorDetails = getErrorDetails(error);\n\t\t\t\tconst duration =\n\t\t\t\t\tDate.now() -\n\t\t\t\t\t(((store as Record<string, unknown>).startTime as number) ||\n\t\t\t\t\t\tDate.now());\n\n\t\t\t\t// Check if this error should be sampled (errors have their own sample rate)\n\t\t\t\tconst url = new URL(request.url);\n\t\t\t\tconst route = url.pathname;\n\t\t\t\tconst method = request.method;\n\t\t\t\tconst shouldIgnore =\n\t\t\t\t\tIGNORE_ROUTES.length > 0 &&\n\t\t\t\t\tshouldIgnoreRoute(IGNORE_ROUTES, route, method);\n\n\t\t\t\t// Apply error sampling (separate from regular request sampling)\n\t\t\t\tconst errorSampled = shouldSample(ERROR_SAMPLE_RATE);\n\t\t\t\tconst skipTelemetry = shouldIgnore || !errorSampled;\n\n\t\t\t\t// Record exception in manual span - wrapped in try/catch to prevent blocking\n\t\t\t\tif (!skipTelemetry) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst span = (store as Record<string, unknown>).telemetrySpan as\n\t\t\t\t\t\t\t| Span\n\t\t\t\t\t\t\t| undefined;\n\t\t\t\t\t\tif (span) {\n\t\t\t\t\t\t\tconst errorObj =\n\t\t\t\t\t\t\t\terror instanceof Error\n\t\t\t\t\t\t\t\t\t? error\n\t\t\t\t\t\t\t\t\t: new Error(errorDetails.message);\n\n\t\t\t\t\t\t\t// Enhance error with source maps if available\n\t\t\t\t\t\t\tconst rerouteDir = '.reroute';\n\t\t\t\t\t\t\tif (rerouteDir && errorObj.stack) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tawait enhanceError(errorObj, { rerouteDir });\n\t\t\t\t\t\t\t\t} catch (smError) {\n\t\t\t\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t\t\t\t'[telemetry] Sourcemap enhancement failed:',\n\t\t\t\t\t\t\t\t\t\tsmError,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tspan.recordException(errorObj);\n\t\t\t\t\t\t\tspan.setStatus({\n\t\t\t\t\t\t\t\tcode: SpanStatusCode.ERROR,\n\t\t\t\t\t\t\t\tmessage: `${errorDetails.name}: ${errorDetails.message}`,\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tconst enhancedError = errorObj as Error & {\n\t\t\t\t\t\t\t\tsourceMappedStack?: string;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tconst stackToUse =\n\t\t\t\t\t\t\t\tenhancedError.sourceMappedStack || errorDetails.stack;\n\n\t\t\t\t\t\t\tspan.setAttributes({\n\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\t'error.type': errorDetails.name,\n\t\t\t\t\t\t\t\t'error.message': errorDetails.message,\n\t\t\t\t\t\t\t\t'error.stack': errorDetails.stack,\n\t\t\t\t\t\t\t\t...(enhancedError.sourceMappedStack\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t'error.stack.decoded': enhancedError.sourceMappedStack,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t'http.response.status_code':\n\t\t\t\t\t\t\t\t\ttypeof set.status === 'number' ? set.status : 500,\n\t\t\t\t\t\t\t\t'http.duration_ms': duration,\n\t\t\t\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t\t\t\t...getContextAttributesForTelemetry(),\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tspan.addEvent('exception', {\n\t\t\t\t\t\t\t\t'exception.type': errorDetails.name,\n\t\t\t\t\t\t\t\t'exception.message': errorDetails.message,\n\t\t\t\t\t\t\t\t'exception.stacktrace': stackToUse,\n\t\t\t\t\t\t\t\t'exception.escaped': 'false',\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// End the span here since onAfterResponse won't handle errors\n\t\t\t\t\t\t\tspan.end();\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (spanError) {\n\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t'[telemetry] Failed to record exception in span:',\n\t\t\t\t\t\t\tspanError,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Log error - wrapped in try/catch to prevent blocking\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlogger?.emit({\n\t\t\t\t\t\t\tseverityNumber: SeverityNumber.ERROR,\n\t\t\t\t\t\t\tseverityText: 'ERROR',\n\t\t\t\t\t\t\tbody: `${errorDetails.name}: ${errorDetails.message}`,\n\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t'error.type': errorDetails.name,\n\t\t\t\t\t\t\t\t'error.message': errorDetails.message,\n\t\t\t\t\t\t\t\t'error.stack': errorDetails.stack,\n\t\t\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\t\t\t'url.full': request.url,\n\t\t\t\t\t\t\t\t'http.response.status_code':\n\t\t\t\t\t\t\t\t\ttypeof set.status === 'number' ? set.status : 500,\n\t\t\t\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (logError) {\n\t\t\t\t\t\tconsole.error('[telemetry] Failed to log error:', logError);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Increment error counter - wrapped in try/catch to prevent blocking\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst statusCode =\n\t\t\t\t\t\t\ttypeof set.status === 'number' ? set.status : 500;\n\t\t\t\t\t\thttpErrorCounter?.add(1, {\n\t\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\t\t'http.response.status_code': statusCode,\n\t\t\t\t\t\t\t'error.type': errorDetails.name,\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\thttpRequestDuration?.record(duration, {\n\t\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\t\t'http.response.status_code': statusCode,\n\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (metricsError) {\n\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t'[telemetry] Failed to record error metrics:',\n\t\t\t\t\t\t\tmetricsError,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\t// Record response metrics\n\t\t\t// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Response metrics recording\n\t\t\t.onAfterResponse(({ request, set, store }) => {\n\t\t\t\tconst url = new URL(request.url);\n\t\t\t\tconst pathname = url.pathname;\n\t\t\t\tconst method = request.method;\n\t\t\t\tconst statusCode = typeof set.status === 'number' ? set.status : 200;\n\t\t\t\tconst duration =\n\t\t\t\t\tDate.now() -\n\t\t\t\t\t(((store as Record<string, unknown>).startTime as number) ||\n\t\t\t\t\t\tDate.now());\n\t\t\t\tconst route =\n\t\t\t\t\t((store as Record<string, unknown>).route as string) || pathname;\n\n\t\t\t\t// Always decrement active connections for metrics accuracy\n\t\t\t\ttry {\n\t\t\t\t\tactiveConnections?.add(-1);\n\t\t\t\t\thttpActiveRequests?.add(-1, {\n\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\troute,\n\t\t\t\t\t});\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'[telemetry] Failed to decrement active requests:',\n\t\t\t\t\t\terror,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Skip detailed telemetry if ignored or not sampled (set in onBeforeHandle)\n\t\t\t\tconst shouldIgnoreTelemetry = (store as Record<string, unknown>)\n\t\t\t\t\t.shouldIgnoreTelemetry;\n\t\t\t\tif (shouldIgnoreTelemetry) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// End manual span with final attributes\n\t\t\t\ttry {\n\t\t\t\t\tconst span = (store as Record<string, unknown>).telemetrySpan as\n\t\t\t\t\t\t| Span\n\t\t\t\t\t\t| undefined;\n\t\t\t\t\tif (span) {\n\t\t\t\t\t\tspan.setAttributes({\n\t\t\t\t\t\t\t'http.response.status_code': statusCode,\n\t\t\t\t\t\t\t'http.duration_ms': duration,\n\t\t\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif (statusCode >= 400) {\n\t\t\t\t\t\t\tspan.setStatus({\n\t\t\t\t\t\t\t\tcode: SpanStatusCode.ERROR,\n\t\t\t\t\t\t\t\tmessage: `HTTP ${statusCode}`,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tspan.setAttribute('error', true);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tspan.end();\n\t\t\t\t\t}\n\t\t\t\t} catch (spanError) {\n\t\t\t\t\tconsole.error('[telemetry] Failed to end span:', spanError);\n\t\t\t\t}\n\n\t\t\t\t// Log response - wrapped in try/catch to prevent blocking\n\t\t\t\ttry {\n\t\t\t\t\tconst isError = statusCode >= 400;\n\t\t\t\t\tlogger?.emit({\n\t\t\t\t\t\tseverityNumber: isError\n\t\t\t\t\t\t\t? SeverityNumber.ERROR\n\t\t\t\t\t\t\t: SeverityNumber.INFO,\n\t\t\t\t\t\tseverityText: isError ? 'ERROR' : 'INFO',\n\t\t\t\t\t\tbody: `← ${method} ${route} → ${statusCode} (${duration}ms)`,\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\t\t'url.full': request.url,\n\t\t\t\t\t\t\t'http.route': route,\n\t\t\t\t\t\t\t'http.response.status_code': statusCode,\n\t\t\t\t\t\t\t'http.duration_ms': duration,\n\t\t\t\t\t\t\t'url.scheme': url.protocol.replace(':', ''),\n\t\t\t\t\t\t\t'server.address': url.host,\n\t\t\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t} catch (logError) {\n\t\t\t\t\tconsole.error('[telemetry] Failed to log response:', logError);\n\t\t\t\t}\n\n\t\t\t\t// Record metrics - wrapped in try/catch to prevent blocking\n\t\t\t\ttry {\n\t\t\t\t\thttpRequestDuration?.record(duration, {\n\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\t'http.route': route,\n\t\t\t\t\t\t'http.response.status_code': statusCode,\n\t\t\t\t\t\t'url.scheme': url.protocol.replace(':', ''),\n\t\t\t\t\t});\n\t\t\t\t} catch (metricsError) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'[telemetry] Failed to record request duration:',\n\t\t\t\t\t\tmetricsError,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\n\t\t// Optionally add error inspector endpoint for source-mapped stack traces\n\t\tif (merged.sourcemaps?.enabled !== false) {\n\t\t\tconst rerouteDir = '.reroute';\n\n\t\t\tapp.post('/__reroute_telemetry/inspect', async ({ body }) => {\n\t\t\t\ttry {\n\t\t\t\t\tconst { stack } = body as { stack?: string };\n\t\t\t\t\tif (!stack) {\n\t\t\t\t\t\treturn { error: 'Missing stack trace' };\n\t\t\t\t\t}\n\n\t\t\t\t\tconst { resolveStackTrace } = await import('./sourcemap');\n\t\t\t\t\tconst result = await resolveStackTrace(stack, { rerouteDir });\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\toriginal: result.original,\n\t\t\t\t\t\tmapped: result.mapped,\n\t\t\t\t\t\tframes: result.frames,\n\t\t\t\t\t};\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error('[telemetry] Error inspection failed:', error);\n\t\t\t\t\treturn {\n\t\t\t\t\t\terror: error instanceof Error ? error.message : 'Unknown error',\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Optionally add browser telemetry proxy\n\t\tif (ENABLE_PROXY) {\n\t\t\tconst API_KEY = merged.apiKey || process.env.SIGNOZ_API_KEY;\n\n\t\t\t// Proxy handler function\n\t\t\tconst handleProxy = async (\n\t\t\t\tendpoint: string,\n\t\t\t\trequestBody: unknown,\n\t\t\t\t// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Proxy forwarding with error handling\n\t\t\t): Promise<{ status: number }> => {\n\t\t\t\tconst headers: Record<string, string> = {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t};\n\n\t\t\t\tif (API_KEY) {\n\t\t\t\t\theaders.Authorization = `Bearer ${API_KEY}`;\n\t\t\t\t}\n\n\t\t\t\t// Use custom handler if provided\n\t\t\t\tif (PROXY_HANDLER) {\n\t\t\t\t\treturn await PROXY_HANDLER({\n\t\t\t\t\t\tbody: requestBody,\n\t\t\t\t\t\tendpoint,\n\t\t\t\t\t\theaders,\n\t\t\t\t\t\totlpEndpoint: OTLP_ENDPOINT,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Default handler: forward to OTLP endpoint\n\t\t\t\ttry {\n\t\t\t\t\tconst controller = new AbortController();\n\t\t\t\t\tconst timeoutId = setTimeout(() => controller.abort(), 5000);\n\n\t\t\t\t\tconst response = await fetch(`${OTLP_ENDPOINT}${endpoint}`, {\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\theaders,\n\t\t\t\t\t\tbody: JSON.stringify(requestBody),\n\t\t\t\t\t\tsignal: controller.signal,\n\t\t\t\t\t});\n\n\t\t\t\t\tclearTimeout(timeoutId);\n\n\t\t\t\t\tif (PROXY_VERBOSE) {\n\t\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t\t`[telemetry-proxy]${endpoint} forwarded: ${response.status}`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!response.ok && PROXY_VERBOSE) {\n\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t`[telemetry-proxy] OTLP error: ${response.status} ${response.statusText}`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn { status: 200 };\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (PROXY_VERBOSE) {\n\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t`[telemetry-proxy] Failed to forward${endpoint}:`,\n\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn { status: 200 };\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tapp\n\t\t\t\t.post(\n\t\t\t\t\t`${PROXY_PATHNAME}/v1/traces`,\n\t\t\t\t\tasync function forwardBrowserTraces({ body }) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst result = await handleProxy('/v1/traces', body);\n\t\t\t\t\t\t\treturn new Response(null, { status: result.status });\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tconsole.error('[telemetry-proxy] Handler error:', error);\n\t\t\t\t\t\t\treturn new Response(null, { status: 200 });\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t\t.post(\n\t\t\t\t\t`${PROXY_PATHNAME}/v1/metrics`,\n\t\t\t\t\tasync function forwardBrowserMetrics({ body }) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst result = await handleProxy('/v1/metrics', body);\n\t\t\t\t\t\t\treturn new Response(null, { status: result.status });\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tconsole.error('[telemetry-proxy] Handler error:', error);\n\t\t\t\t\t\t\treturn new Response(null, { status: 200 });\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t\t.post(\n\t\t\t\t\t`${PROXY_PATHNAME}/v1/logs`,\n\t\t\t\t\tasync function forwardBrowserLogs({ body }) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst result = await handleProxy('/v1/logs', body);\n\t\t\t\t\t\t\treturn new Response(null, { status: result.status });\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tconsole.error('[telemetry-proxy] Handler error:', error);\n\t\t\t\t\t\t\treturn new Response(null, { status: 200 });\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t\t.get(`${PROXY_PATHNAME}/health`, () => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstatus: 'ok',\n\t\t\t\t\t\totlpEndpoint: OTLP_ENDPOINT,\n\t\t\t\t\t\ttimestamp: new Date().toISOString(),\n\t\t\t\t\t};\n\t\t\t\t});\n\t\t}\n\n\t\treturn app;\n\t};\n}\n",
39
+ "import os from 'node:os';\nimport {\n\ttype Counter,\n\tcontext,\n\ttype Histogram,\n\tmetrics,\n\ttype Span,\n\tSpanStatusCode,\n\ttrace,\n\ttype UpDownCounter,\n} from '@opentelemetry/api';\nimport { logs, SeverityNumber } from '@opentelemetry/api-logs';\nimport { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-proto';\nimport { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-proto';\nimport { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto';\nimport { resourceFromAttributes } from '@opentelemetry/resources';\nimport {\n\tBatchLogRecordProcessor,\n\tLoggerProvider,\n} from '@opentelemetry/sdk-logs';\nimport {\n\tMeterProvider,\n\tPeriodicExportingMetricReader,\n} from '@opentelemetry/sdk-metrics';\nimport {\n\tBatchSpanProcessor,\n\tNodeTracerProvider,\n} from '@opentelemetry/sdk-trace-node';\nimport {\n\tATTR_SERVICE_NAME,\n\tATTR_SERVICE_VERSION,\n} from '@opentelemetry/semantic-conventions';\nimport { ATTR_HOST_NAME } from '@opentelemetry/semantic-conventions/incubating';\nimport type { Elysia } from 'elysia';\nimport { loadConfig, type TelemetryOptions } from 'reroute-js/core';\nimport { getContextAttributesForTelemetry } from './context';\nimport { extractTraceContext } from './instrumentation';\nimport { enhanceError } from './sourcemap';\n\n/**\n * Server telemetry options\n * Extends TelemetryOptions from config - all options can be set in reroute.config.ts\n * or passed directly here (direct options override config values)\n */\nexport interface ServerTelemetryOptions extends TelemetryOptions {}\n\n// Helper to extract error details\nfunction getErrorDetails(error: unknown): {\n\tname: string;\n\tmessage: string;\n\tstack: string;\n} {\n\tif (error instanceof Error) {\n\t\treturn {\n\t\t\tname: error.name,\n\t\t\tmessage: error.message,\n\t\t\tstack: error.stack || '',\n\t\t};\n\t}\n\n\tif (typeof error === 'object' && error !== null) {\n\t\tconst err = error as Record<string, unknown>;\n\t\treturn {\n\t\t\tname: String(err.name || err.code || 'UnknownError'),\n\t\t\tmessage: String(err.message || err.error || JSON.stringify(error)),\n\t\t\tstack: String(err.stack || ''),\n\t\t};\n\t}\n\n\treturn {\n\t\tname: 'UnknownError',\n\t\tmessage: String(error),\n\t\tstack: '',\n\t};\n}\n\n/**\n * Check if a route should be ignored based on ignore patterns\n * Supports strings, RegExp, and custom functions\n */\nfunction shouldIgnoreRoute(\n\tpatterns: (\n\t\t| string\n\t\t| RegExp\n\t\t| ((pathname: string, method: string) => boolean)\n\t)[],\n\tpathname: string,\n\tmethod: string,\n): boolean {\n\treturn patterns.some((pattern) => {\n\t\tif (typeof pattern === 'string') {\n\t\t\treturn pathname.includes(pattern);\n\t\t}\n\t\tif (pattern instanceof RegExp) {\n\t\t\treturn pattern.test(pathname);\n\t\t}\n\t\tif (typeof pattern === 'function') {\n\t\t\treturn pattern(pathname, method);\n\t\t}\n\t\treturn false;\n\t});\n}\n\n/**\n * Determine if a request should be sampled based on sample rate\n * @param rate - Sample rate between 0.0 and 1.0\n * @returns true if request should be sampled\n */\nfunction shouldSample(rate: number): boolean {\n\treturn Math.random() < rate;\n}\n\n/**\n * Server-side telemetry plugin for Elysia\n *\n * Automatically captures:\n * - HTTP requests and responses\n * - Errors with full stack traces\n * - System metrics (CPU, memory)\n * - Request/response sizes\n * - Active connections\n *\n * Configuration is loaded from reroute.config.ts automatically.\n * Direct options override config values.\n *\n * @example\n * ```typescript\n * import { Elysia } from 'elysia';\n * import { telemetry } from 'reroute-js/telemetry/server';\n *\n * new Elysia()\n * .use(telemetry({\n * serviceName: 'My App',\n * }))\n * .listen(3000);\n * ```\n */\nexport function telemetry(options: ServerTelemetryOptions = {}) {\n\t// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Telemetry initialization with config loading and feature toggles\n\treturn async (app: Elysia) => {\n\t\t// Load reroute.config.ts automatically\n\t\tconst cwd =\n\t\t\ttypeof process !== 'undefined' && typeof process.cwd === 'function'\n\t\t\t\t? process.cwd()\n\t\t\t\t: '/';\n\t\tconst config = await loadConfig(cwd);\n\n\t\t// Merge config with direct options (direct options take precedence)\n\t\tconst merged = {\n\t\t\t...config.telemetry,\n\t\t\t...options,\n\t\t};\n\n\t\t// Check if telemetry is enabled (default: false)\n\t\tconst TELEMETRY_ENABLED = merged.enabled ?? false;\n\t\tif (!TELEMETRY_ENABLED) {\n\t\t\tconsole.log(\n\t\t\t\t'[telemetry] Disabled - set enabled: true in config or options to enable',\n\t\t\t);\n\t\t\t// Return app unchanged when disabled\n\t\t\treturn app;\n\t\t}\n\n\t\t// Extract configuration values\n\t\tconst SERVICE_NAME = merged.serviceName || 'reroute-app';\n\t\tconst SERVICE_VERSION =\n\t\t\tmerged.serviceVersion || process.env.npm_package_version || '1.0.0';\n\t\tconst OTLP_ENDPOINT =\n\t\t\tmerged.otlpEndpoint ||\n\t\t\tprocess.env.OTEL_EXPORTER_OTLP_ENDPOINT ||\n\t\t\t'http://localhost:4318';\n\t\tconst METRICS_INTERVAL = merged.metricsInterval ?? 5000;\n\n\t\t// Handle proxy configuration\n\t\tconst proxyConfig = merged.proxy;\n\t\tconst ENABLE_PROXY = proxyConfig?.enabled ?? !!proxyConfig;\n\t\tconst PROXY_PATHNAME = proxyConfig?.pathname ?? '/__reroute_telemetry';\n\t\tconst PROXY_VERBOSE = proxyConfig?.verbose ?? false;\n\t\tconst PROXY_HANDLER = proxyConfig?.handler;\n\n\t\t// Feature toggles (default: true when telemetry is enabled)\n\t\tconst ENABLE_TRACES = merged.enableTraces ?? true;\n\t\tconst ENABLE_METRICS = merged.enableMetrics ?? true;\n\t\tconst ENABLE_LOGS = merged.enableLogs ?? true;\n\t\tconst ENABLE_SYSTEM_METRICS = merged.enableSystemMetrics ?? true;\n\n\t\t// Sampling configuration\n\t\tconst SAMPLE_RATE = merged.sampleRate ?? 1.0;\n\t\tconst ERROR_SAMPLE_RATE = merged.errorSampleRate ?? 1.0;\n\n\t\t// Route filtering\n\t\tconst IGNORE_ROUTES = merged.ignoreRoutes || [];\n\n\t\t// Header capture and custom attributes\n\t\tconst CAPTURE_HEADERS = merged.captureHeaders || [];\n\t\tconst CUSTOM_ATTRIBUTES = merged.customAttributes || {};\n\n\t\tconsole.log(`[telemetry] Initializing with endpoint: ${OTLP_ENDPOINT}`);\n\t\tconsole.log(\n\t\t\t`[telemetry] Features - Traces: ${ENABLE_TRACES}, Metrics: ${ENABLE_METRICS}, Logs: ${ENABLE_LOGS}`,\n\t\t);\n\t\tif (SAMPLE_RATE < 1.0) {\n\t\t\tconsole.log(\n\t\t\t\t`[telemetry] Sampling - Requests: ${SAMPLE_RATE * 100}%, Errors: ${ERROR_SAMPLE_RATE * 100}%`,\n\t\t\t);\n\t\t}\n\t\tif (ENABLE_PROXY) {\n\t\t\tconsole.log(\n\t\t\t\t`[telemetry] Browser telemetry proxy enabled at ${PROXY_PATHNAME}/*`,\n\t\t\t);\n\t\t}\n\n\t\t// Secure headers for API authentication (optional)\n\t\tconst otlpHeaders: Record<string, string> = {};\n\t\tif (merged.apiKey || process.env.SIGNOZ_API_KEY) {\n\t\t\totlpHeaders.Authorization = `Bearer ${merged.apiKey || process.env.SIGNOZ_API_KEY}`;\n\t\t}\n\n\t\t// Configure OTLP exporters with timeouts (conditionally based on feature toggles)\n\t\tconst traceExporter = ENABLE_TRACES\n\t\t\t? new OTLPTraceExporter({\n\t\t\t\t\turl: `${OTLP_ENDPOINT}/v1/traces`,\n\t\t\t\t\theaders:\n\t\t\t\t\t\tObject.keys(otlpHeaders).length > 0 ? otlpHeaders : undefined,\n\t\t\t\t\ttimeoutMillis: 5000, // 5 second timeout\n\t\t\t\t})\n\t\t\t: null;\n\n\t\tconst logExporter = ENABLE_LOGS\n\t\t\t? new OTLPLogExporter({\n\t\t\t\t\turl: `${OTLP_ENDPOINT}/v1/logs`,\n\t\t\t\t\theaders:\n\t\t\t\t\t\tObject.keys(otlpHeaders).length > 0 ? otlpHeaders : undefined,\n\t\t\t\t\ttimeoutMillis: 5000, // 5 second timeout\n\t\t\t\t})\n\t\t\t: null;\n\n\t\tconst metricExporter = ENABLE_METRICS\n\t\t\t? new OTLPMetricExporter({\n\t\t\t\t\turl: `${OTLP_ENDPOINT}/v1/metrics`,\n\t\t\t\t\theaders:\n\t\t\t\t\t\tObject.keys(otlpHeaders).length > 0 ? otlpHeaders : undefined,\n\t\t\t\t\ttimeoutMillis: 5000, // 5 second timeout\n\t\t\t\t})\n\t\t\t: null;\n\n\t\t// Create resource with service information\n\t\t// In Docker, prefer env var over os.hostname() (which returns container ID)\n\t\tconst HOSTNAME =\n\t\t\tprocess.env.OTEL_RESOURCE_ATTRIBUTES?.match(/host\\.name=([^,]+)/)?.[1] ||\n\t\t\tprocess.env.HOSTNAME ||\n\t\t\tos.hostname();\n\n\t\tconst resource = resourceFromAttributes({\n\t\t\t[ATTR_SERVICE_NAME]: SERVICE_NAME,\n\t\t\t[ATTR_SERVICE_VERSION]: SERVICE_VERSION,\n\t\t\t[ATTR_HOST_NAME]: HOSTNAME,\n\t\t});\n\n\t\t// Set up Traces with error handling (only if enabled)\n\t\tif (ENABLE_TRACES && traceExporter) {\n\t\t\ttry {\n\t\t\t\tconst tracerProvider = new NodeTracerProvider({\n\t\t\t\t\tresource,\n\t\t\t\t\tspanProcessors: [new BatchSpanProcessor(traceExporter)],\n\t\t\t\t});\n\t\t\t\ttracerProvider.register();\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('[telemetry] Failed to initialize tracer:', error);\n\t\t\t}\n\t\t}\n\n\t\t// Set up Logs with error handling (only if enabled)\n\t\tlet logger: ReturnType<LoggerProvider['getLogger']> | null = null;\n\t\tif (ENABLE_LOGS && logExporter) {\n\t\t\ttry {\n\t\t\t\tconst loggerProvider = new LoggerProvider({\n\t\t\t\t\tresource,\n\t\t\t\t\tprocessors: [new BatchLogRecordProcessor(logExporter)],\n\t\t\t\t});\n\t\t\t\tlogs.setGlobalLoggerProvider(loggerProvider);\n\t\t\t\tlogger = loggerProvider.getLogger(SERVICE_NAME, SERVICE_VERSION);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('[telemetry] Failed to initialize logger:', error);\n\t\t\t}\n\t\t}\n\n\t\t// Set up Metrics with error handling (only if enabled)\n\t\tlet meter: ReturnType<MeterProvider['getMeter']> | null = null;\n\t\tif (ENABLE_METRICS && metricExporter) {\n\t\t\ttry {\n\t\t\t\tconst meterProvider = new MeterProvider({\n\t\t\t\t\tresource,\n\t\t\t\t\treaders: [\n\t\t\t\t\t\tnew PeriodicExportingMetricReader({\n\t\t\t\t\t\t\texporter: metricExporter,\n\t\t\t\t\t\t\texportIntervalMillis: METRICS_INTERVAL,\n\t\t\t\t\t\t}),\n\t\t\t\t\t],\n\t\t\t\t});\n\t\t\t\tmetrics.setGlobalMeterProvider(meterProvider);\n\t\t\t\tmeter = meterProvider.getMeter(SERVICE_NAME, SERVICE_VERSION);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('[telemetry] Failed to initialize meter:', error);\n\t\t\t}\n\t\t}\n\n\t\t// Create HTTP metrics with null checks\n\t\tlet httpRequestCounter: Counter | null = null;\n\t\tlet httpRequestDuration: Histogram | null = null;\n\t\tlet httpErrorCounter: Counter | null = null;\n\t\tlet httpActiveRequests: UpDownCounter | null = null;\n\t\tlet activeConnections: UpDownCounter | null = null;\n\n\t\tif (meter) {\n\t\t\ttry {\n\t\t\t\thttpRequestCounter = meter.createCounter('http.server.request.count', {\n\t\t\t\t\tdescription: 'Total HTTP requests',\n\t\t\t\t\tunit: 'requests',\n\t\t\t\t});\n\n\t\t\t\thttpRequestDuration = meter.createHistogram(\n\t\t\t\t\t'http.server.request.duration',\n\t\t\t\t\t{\n\t\t\t\t\t\tdescription: 'HTTP request duration',\n\t\t\t\t\t\tunit: 'milliseconds',\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\thttpErrorCounter = meter.createCounter('http.server.error.count', {\n\t\t\t\t\tdescription: 'Total HTTP errors',\n\t\t\t\t\tunit: 'errors',\n\t\t\t\t});\n\n\t\t\t\thttpActiveRequests = meter.createUpDownCounter(\n\t\t\t\t\t'http.server.active_requests',\n\t\t\t\t\t{\n\t\t\t\t\t\tdescription: 'Active HTTP requests',\n\t\t\t\t\t\tunit: 'requests',\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tactiveConnections = meter.createUpDownCounter(\n\t\t\t\t\t'app.connections.active',\n\t\t\t\t\t{\n\t\t\t\t\t\tdescription: 'Active connections',\n\t\t\t\t\t\tunit: 'connections',\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('[telemetry] Failed to create HTTP metrics:', error);\n\t\t\t}\n\t\t}\n\n\t\t// Create system metrics (optional) with error handling\n\t\tif (ENABLE_SYSTEM_METRICS && meter) {\n\t\t\ttry {\n\t\t\t\t// Reuse HOSTNAME from resource (already computed above)\n\n\t\t\t\tconst memoryUsage = meter.createObservableGauge('app.memory.usage', {\n\t\t\t\t\tdescription: 'Process memory usage',\n\t\t\t\t\tunit: 'bytes',\n\t\t\t\t});\n\n\t\t\t\tmemoryUsage.addCallback((result) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst usage = process.memoryUsage();\n\t\t\t\t\t\tresult.observe(usage.heapUsed, {\n\t\t\t\t\t\t\ttype: 'heap',\n\t\t\t\t\t\t\t'host.name': HOSTNAME,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tresult.observe(usage.rss, { type: 'rss', 'host.name': HOSTNAME });\n\t\t\t\t\t\tresult.observe(usage.external, {\n\t\t\t\t\t\t\ttype: 'external',\n\t\t\t\t\t\t\t'host.name': HOSTNAME,\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.error('[telemetry] Memory usage callback failed:', error);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tconst systemCpuUsage = meter.createObservableGauge(\n\t\t\t\t\t'system.cpu.utilization',\n\t\t\t\t\t{\n\t\t\t\t\t\tdescription: 'System CPU utilization',\n\t\t\t\t\t\tunit: '1',\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tsystemCpuUsage.addCallback((result) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst cpus = os.cpus();\n\t\t\t\t\t\tlet totalIdle = 0;\n\t\t\t\t\t\tlet totalTick = 0;\n\n\t\t\t\t\t\tcpus.forEach((cpu) => {\n\t\t\t\t\t\t\tconst times = cpu.times;\n\t\t\t\t\t\t\ttotalIdle += times.idle;\n\t\t\t\t\t\t\ttotalTick +=\n\t\t\t\t\t\t\t\ttimes.user + times.nice + times.sys + times.idle + times.irq;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tconst usage = 1 - totalIdle / totalTick;\n\t\t\t\t\t\tresult.observe(usage, {\n\t\t\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t\t\t'host.name': HOSTNAME,\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.error('[telemetry] CPU usage callback failed:', error);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tconst systemMemoryUsage = meter.createObservableGauge(\n\t\t\t\t\t'system.memory.utilization',\n\t\t\t\t\t{\n\t\t\t\t\t\tdescription: 'System memory utilization',\n\t\t\t\t\t\tunit: '1',\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tsystemMemoryUsage.addCallback((result) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst totalMem = os.totalmem();\n\t\t\t\t\t\tconst freeMem = os.freemem();\n\t\t\t\t\t\tconst usage = (totalMem - freeMem) / totalMem;\n\n\t\t\t\t\t\tresult.observe(usage, {\n\t\t\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t\t\t'host.name': HOSTNAME,\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.error('[telemetry] System memory callback failed:', error);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('[telemetry] Failed to create system metrics:', error);\n\t\t\t}\n\t\t}\n\n\t\t// Graceful shutdown with error handling\n\t\tconst shutdown = async () => {\n\t\t\tconsole.log('[telemetry] Shutting down...');\n\t\t\ttry {\n\t\t\t\t// Note: We can't reference loggerProvider/meterProvider here since they're in try blocks\n\t\t\t\t// The providers will be cleaned up automatically\n\t\t\t\tawait logs.disable();\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('[telemetry] Shutdown error:', error);\n\t\t\t}\n\t\t};\n\n\t\tprocess.on('SIGTERM', async () => {\n\t\t\tawait shutdown();\n\t\t\tprocess.exit(0);\n\t\t});\n\n\t\t// Initialize tracer for manual span creation\n\t\tlet tracer: ReturnType<typeof trace.getTracer> | null = null;\n\t\tif (ENABLE_TRACES && traceExporter) {\n\t\t\ttracer = trace.getTracer(SERVICE_NAME, SERVICE_VERSION);\n\t\t}\n\n\t\t// Setup global console.error capture for automatic error telemetry\n\t\t// This captures errors that are caught and logged but not thrown\n\t\tconst ENABLE_CONSOLE_CAPTURE = merged.enableConsoleCapture ?? true;\n\t\tif (ENABLE_CONSOLE_CAPTURE && tracer) {\n\t\t\tconst originalError = console.error;\n\t\t\tconst originalWarn = console.warn;\n\n\t\t\t// Don't override if already captured (e.g., in tests)\n\t\t\t// biome-ignore lint/suspicious/noExplicitAny: Console capture\n\t\t\tif (!(originalError as any).__telemetry_captured__) {\n\t\t\t\tconst errorTracer = trace.getTracer('console-error');\n\n\t\t\t\t/** biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Console error capture */\n\t\t\t\tconsole.error = (...args: unknown[]) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Create a span for this console.error\n\t\t\t\t\t\tconst span = errorTracer.startSpan('server.console.error');\n\n\t\t\t\t\t\t// Try to extract error information\n\t\t\t\t\t\tconst firstArg = args[0];\n\t\t\t\t\t\tlet errorMessage = args.map(String).join(' ');\n\t\t\t\t\t\tlet errorStack = '';\n\t\t\t\t\t\tlet errorType = 'ConsoleError';\n\n\t\t\t\t\t\tif (firstArg instanceof Error) {\n\t\t\t\t\t\t\terrorMessage = firstArg.message;\n\t\t\t\t\t\t\terrorStack = firstArg.stack || '';\n\t\t\t\t\t\t\terrorType = firstArg.name;\n\n\t\t\t\t\t\t\t// Enhance error with source maps if available\n\t\t\t\t\t\t\tconst rerouteDir = '.reroute';\n\t\t\t\t\t\t\tif (rerouteDir && firstArg.stack) {\n\t\t\t\t\t\t\t\tenhanceError(firstArg, { rerouteDir })\n\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\tconst enhancedError = firstArg as Error & {\n\t\t\t\t\t\t\t\t\t\t\tsourceMappedStack?: string;\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\tif (enhancedError.sourceMappedStack) {\n\t\t\t\t\t\t\t\t\t\t\terrorStack = enhancedError.sourceMappedStack;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\t\t\t// Silently fail sourcemap enhancement\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tspan.setStatus({\n\t\t\t\t\t\t\tcode: SpanStatusCode.ERROR,\n\t\t\t\t\t\t\tmessage: errorMessage,\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tspan.setAttributes({\n\t\t\t\t\t\t\t'log.level': 'error',\n\t\t\t\t\t\t\t'log.message': errorMessage,\n\t\t\t\t\t\t\t'error.type': errorType,\n\t\t\t\t\t\t\t...(errorStack ? { 'error.stack': errorStack } : {}),\n\t\t\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t\t\t...getContextAttributesForTelemetry(),\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif (firstArg instanceof Error) {\n\t\t\t\t\t\t\tspan.recordException(firstArg);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tspan.end();\n\n\t\t\t\t\t\t// Also emit as log if logger is available\n\t\t\t\t\t\tif (logger) {\n\t\t\t\t\t\t\tlogger.emit({\n\t\t\t\t\t\t\t\tseverityNumber: SeverityNumber.ERROR,\n\t\t\t\t\t\t\t\tseverityText: 'ERROR',\n\t\t\t\t\t\t\t\tbody: errorMessage,\n\t\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t\t'log.level': 'error',\n\t\t\t\t\t\t\t\t\t'error.type': errorType,\n\t\t\t\t\t\t\t\t\t...(errorStack ? { 'error.stack': errorStack } : {}),\n\t\t\t\t\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Silently fail - don't break console.error\n\t\t\t\t\t}\n\n\t\t\t\t\t// Call original console.error\n\t\t\t\t\toriginalError.apply(console, args);\n\t\t\t\t};\n\n\t\t\t\t// Mark as captured to prevent double-wrapping\n\t\t\t\t// biome-ignore lint/suspicious/noExplicitAny: Console capture\n\t\t\t\t(console.error as any).__telemetry_captured__ = true;\n\n\t\t\t\tconsole.log('[telemetry] Console error capture enabled');\n\t\t\t}\n\n\t\t\t// Also capture console.warn for completeness\n\t\t\t// biome-ignore lint/suspicious/noExplicitAny: Console capture\n\t\t\tif (!(originalWarn as any).__telemetry_captured__) {\n\t\t\t\tconst warnTracer = trace.getTracer('console-warn');\n\n\t\t\t\tconsole.warn = (...args: unknown[]) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst span = warnTracer.startSpan('server.console.warn');\n\t\t\t\t\t\tconst message = args.map(String).join(' ');\n\n\t\t\t\t\t\tspan.setAttributes({\n\t\t\t\t\t\t\t'log.level': 'warn',\n\t\t\t\t\t\t\t'log.message': message,\n\t\t\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t\t\t...getContextAttributesForTelemetry(),\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tspan.end();\n\n\t\t\t\t\t\tif (logger) {\n\t\t\t\t\t\t\tlogger.emit({\n\t\t\t\t\t\t\t\tseverityNumber: SeverityNumber.WARN,\n\t\t\t\t\t\t\t\tseverityText: 'WARN',\n\t\t\t\t\t\t\t\tbody: message,\n\t\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t\t'log.level': 'warn',\n\t\t\t\t\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Silently fail\n\t\t\t\t\t}\n\n\t\t\t\t\toriginalWarn.apply(console, args);\n\t\t\t\t};\n\t\t\t\t// biome-ignore lint/suspicious/noExplicitAny: Console capture\n\t\t\t\t(console.warn as any).__telemetry_captured__ = true;\n\t\t\t}\n\t\t}\n\n\t\tapp = app\n\t\t\t// Track incoming requests\n\t\t\t// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Request tracking with filtering and sampling\n\t\t\t.onBeforeHandle(({ request, store }) => {\n\t\t\t\tconst startTime = Date.now();\n\t\t\t\tconst url = new URL(request.url);\n\t\t\t\tconst route = url.pathname;\n\t\t\t\tconst method = request.method;\n\n\t\t\t\t(store as Record<string, unknown>).startTime = startTime;\n\t\t\t\t(store as Record<string, unknown>).route = route;\n\n\t\t\t\t// Check if route should be ignored\n\t\t\t\tconst shouldIgnore =\n\t\t\t\t\tIGNORE_ROUTES.length > 0 &&\n\t\t\t\t\tshouldIgnoreRoute(IGNORE_ROUTES, route, method);\n\t\t\t\t(store as Record<string, unknown>).shouldIgnoreTelemetry = shouldIgnore;\n\n\t\t\t\t// Apply sampling (skip if ignored or not sampled)\n\t\t\t\tif (!shouldIgnore) {\n\t\t\t\t\tconst sampled = shouldSample(SAMPLE_RATE);\n\t\t\t\t\t(store as Record<string, unknown>).isSampled = sampled;\n\t\t\t\t\tif (!sampled) {\n\t\t\t\t\t\t(store as Record<string, unknown>).shouldIgnoreTelemetry = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Extract incoming trace context from browser (if present)\n\t\t\t\t// This allows browser spans to link to server spans\n\t\t\t\tconst incomingContext = extractTraceContext(request.headers);\n\n\t\t\t\t// Create manual span for request if traces enabled and not ignored\n\t\t\t\tif (\n\t\t\t\t\ttracer &&\n\t\t\t\t\t!(store as Record<string, unknown>).shouldIgnoreTelemetry\n\t\t\t\t) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Create span within extracted context (if available)\n\t\t\t\t\t\tconst createSpan = () => {\n\t\t\t\t\t\t\treturn tracer.startSpan(`${method} ${route}`, {\n\t\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\t\t\t\t'http.route': route,\n\t\t\t\t\t\t\t\t\t'url.full': request.url,\n\t\t\t\t\t\t\t\t\t'url.scheme': url.protocol.replace(':', ''),\n\t\t\t\t\t\t\t\t\t'server.address': url.host,\n\t\t\t\t\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tconst span = incomingContext\n\t\t\t\t\t\t\t? context.with(incomingContext, createSpan)\n\t\t\t\t\t\t\t: createSpan();\n\n\t\t\t\t\t\t// Add session attributes if any\n\t\t\t\t\t\tconst sessionAttrs = getContextAttributesForTelemetry();\n\t\t\t\t\t\tif (Object.keys(sessionAttrs).length > 0) {\n\t\t\t\t\t\t\tspan.setAttributes(sessionAttrs);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t(store as Record<string, unknown>).telemetrySpan = span;\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.error('[telemetry] Failed to create span:', error);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Always track active connections for metrics accuracy\n\t\t\t\ttry {\n\t\t\t\t\tactiveConnections?.add(1);\n\t\t\t\t\thttpActiveRequests?.add(1, {\n\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\troute,\n\t\t\t\t\t});\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error('[telemetry] Failed to track active requests:', error);\n\t\t\t\t}\n\n\t\t\t\t// Skip detailed telemetry if ignored or not sampled\n\t\t\t\tif ((store as Record<string, unknown>).shouldIgnoreTelemetry) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Capture request headers if configured\n\t\t\t\tconst capturedHeaders: Record<string, string> = {};\n\t\t\t\tfor (const headerName of CAPTURE_HEADERS) {\n\t\t\t\t\tconst headerValue = request.headers.get(headerName);\n\t\t\t\t\tif (headerValue) {\n\t\t\t\t\t\tcapturedHeaders[`http.request.header.${headerName}`] = headerValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Build attributes with custom attributes and captured headers\n\t\t\t\tconst baseAttributes = {\n\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t'url.full': request.url,\n\t\t\t\t\t'http.route': route,\n\t\t\t\t\t'url.scheme': url.protocol.replace(':', ''),\n\t\t\t\t\t'server.address': url.host,\n\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t...capturedHeaders,\n\t\t\t\t};\n\n\t\t\t\t// Log incoming request - wrapped in try/catch to prevent blocking\n\t\t\t\ttry {\n\t\t\t\t\tlogger?.emit({\n\t\t\t\t\t\tseverityNumber: SeverityNumber.INFO,\n\t\t\t\t\t\tseverityText: 'INFO',\n\t\t\t\t\t\tbody: `→ ${method} ${route}`,\n\t\t\t\t\t\tattributes: baseAttributes,\n\t\t\t\t\t});\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error('[telemetry] Failed to log incoming request:', error);\n\t\t\t\t}\n\n\t\t\t\t// Increment request counter - wrapped in try/catch to prevent blocking\n\t\t\t\ttry {\n\t\t\t\t\thttpRequestCounter?.add(1, {\n\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\t'http.route': route,\n\t\t\t\t\t\t'url.scheme': url.protocol.replace(':', ''),\n\t\t\t\t\t});\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'[telemetry] Failed to increment request counter:',\n\t\t\t\t\t\terror,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t})\n\t\t\t// Handle errors with full context\n\t\t\t// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Error handling with context\n\t\t\t.onError(async ({ error, request, set, store }) => {\n\t\t\t\tconst errorDetails = getErrorDetails(error);\n\t\t\t\tconst duration =\n\t\t\t\t\tDate.now() -\n\t\t\t\t\t(((store as Record<string, unknown>).startTime as number) ||\n\t\t\t\t\t\tDate.now());\n\n\t\t\t\t// Check if this error should be sampled (errors have their own sample rate)\n\t\t\t\tconst url = new URL(request.url);\n\t\t\t\tconst route = url.pathname;\n\t\t\t\tconst method = request.method;\n\t\t\t\tconst shouldIgnore =\n\t\t\t\t\tIGNORE_ROUTES.length > 0 &&\n\t\t\t\t\tshouldIgnoreRoute(IGNORE_ROUTES, route, method);\n\n\t\t\t\t// Apply error sampling (separate from regular request sampling)\n\t\t\t\tconst errorSampled = shouldSample(ERROR_SAMPLE_RATE);\n\t\t\t\tconst skipTelemetry = shouldIgnore || !errorSampled;\n\n\t\t\t\t// Record exception in manual span - wrapped in try/catch to prevent blocking\n\t\t\t\tif (!skipTelemetry) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst span = (store as Record<string, unknown>).telemetrySpan as\n\t\t\t\t\t\t\t| Span\n\t\t\t\t\t\t\t| undefined;\n\t\t\t\t\t\tif (span) {\n\t\t\t\t\t\t\tconst errorObj =\n\t\t\t\t\t\t\t\terror instanceof Error\n\t\t\t\t\t\t\t\t\t? error\n\t\t\t\t\t\t\t\t\t: new Error(errorDetails.message);\n\n\t\t\t\t\t\t\t// Enhance error with source maps if available\n\t\t\t\t\t\t\tconst rerouteDir = '.reroute';\n\t\t\t\t\t\t\tif (rerouteDir && errorObj.stack) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tawait enhanceError(errorObj, { rerouteDir });\n\t\t\t\t\t\t\t\t} catch (smError) {\n\t\t\t\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t\t\t\t'[telemetry] Sourcemap enhancement failed:',\n\t\t\t\t\t\t\t\t\t\tsmError,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tspan.recordException(errorObj);\n\t\t\t\t\t\t\tspan.setStatus({\n\t\t\t\t\t\t\t\tcode: SpanStatusCode.ERROR,\n\t\t\t\t\t\t\t\tmessage: `${errorDetails.name}: ${errorDetails.message}`,\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tconst enhancedError = errorObj as Error & {\n\t\t\t\t\t\t\t\tsourceMappedStack?: string;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tconst stackToUse =\n\t\t\t\t\t\t\t\tenhancedError.sourceMappedStack || errorDetails.stack;\n\n\t\t\t\t\t\t\tspan.setAttributes({\n\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\t'error.type': errorDetails.name,\n\t\t\t\t\t\t\t\t'error.message': errorDetails.message,\n\t\t\t\t\t\t\t\t'error.stack': errorDetails.stack,\n\t\t\t\t\t\t\t\t...(enhancedError.sourceMappedStack\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t'error.stack.decoded': enhancedError.sourceMappedStack,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t'http.response.status_code':\n\t\t\t\t\t\t\t\t\ttypeof set.status === 'number' ? set.status : 500,\n\t\t\t\t\t\t\t\t'http.duration_ms': duration,\n\t\t\t\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t\t\t\t...getContextAttributesForTelemetry(),\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tspan.addEvent('exception', {\n\t\t\t\t\t\t\t\t'exception.type': errorDetails.name,\n\t\t\t\t\t\t\t\t'exception.message': errorDetails.message,\n\t\t\t\t\t\t\t\t'exception.stacktrace': stackToUse,\n\t\t\t\t\t\t\t\t'exception.escaped': 'false',\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// End the span here since onAfterResponse won't handle errors\n\t\t\t\t\t\t\tspan.end();\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (spanError) {\n\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t'[telemetry] Failed to record exception in span:',\n\t\t\t\t\t\t\tspanError,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Log error - wrapped in try/catch to prevent blocking\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlogger?.emit({\n\t\t\t\t\t\t\tseverityNumber: SeverityNumber.ERROR,\n\t\t\t\t\t\t\tseverityText: 'ERROR',\n\t\t\t\t\t\t\tbody: `${errorDetails.name}: ${errorDetails.message}`,\n\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t'error.type': errorDetails.name,\n\t\t\t\t\t\t\t\t'error.message': errorDetails.message,\n\t\t\t\t\t\t\t\t'error.stack': errorDetails.stack,\n\t\t\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\t\t\t'url.full': request.url,\n\t\t\t\t\t\t\t\t'http.response.status_code':\n\t\t\t\t\t\t\t\t\ttypeof set.status === 'number' ? set.status : 500,\n\t\t\t\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (logError) {\n\t\t\t\t\t\tconsole.error('[telemetry] Failed to log error:', logError);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Increment error counter - wrapped in try/catch to prevent blocking\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst statusCode =\n\t\t\t\t\t\t\ttypeof set.status === 'number' ? set.status : 500;\n\t\t\t\t\t\thttpErrorCounter?.add(1, {\n\t\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\t\t'http.response.status_code': statusCode,\n\t\t\t\t\t\t\t'error.type': errorDetails.name,\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\thttpRequestDuration?.record(duration, {\n\t\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\t\t'http.response.status_code': statusCode,\n\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (metricsError) {\n\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t'[telemetry] Failed to record error metrics:',\n\t\t\t\t\t\t\tmetricsError,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\t// Record response metrics\n\t\t\t// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Response metrics recording\n\t\t\t.onAfterResponse(({ request, set, store }) => {\n\t\t\t\tconst url = new URL(request.url);\n\t\t\t\tconst pathname = url.pathname;\n\t\t\t\tconst method = request.method;\n\t\t\t\tconst statusCode = typeof set.status === 'number' ? set.status : 200;\n\t\t\t\tconst duration =\n\t\t\t\t\tDate.now() -\n\t\t\t\t\t(((store as Record<string, unknown>).startTime as number) ||\n\t\t\t\t\t\tDate.now());\n\t\t\t\tconst route =\n\t\t\t\t\t((store as Record<string, unknown>).route as string) || pathname;\n\n\t\t\t\t// Always decrement active connections for metrics accuracy\n\t\t\t\ttry {\n\t\t\t\t\tactiveConnections?.add(-1);\n\t\t\t\t\thttpActiveRequests?.add(-1, {\n\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\troute,\n\t\t\t\t\t});\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'[telemetry] Failed to decrement active requests:',\n\t\t\t\t\t\terror,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Skip detailed telemetry if ignored or not sampled (set in onBeforeHandle)\n\t\t\t\tconst shouldIgnoreTelemetry = (store as Record<string, unknown>)\n\t\t\t\t\t.shouldIgnoreTelemetry;\n\t\t\t\tif (shouldIgnoreTelemetry) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// End manual span with final attributes\n\t\t\t\ttry {\n\t\t\t\t\tconst span = (store as Record<string, unknown>).telemetrySpan as\n\t\t\t\t\t\t| Span\n\t\t\t\t\t\t| undefined;\n\t\t\t\t\tif (span) {\n\t\t\t\t\t\tspan.setAttributes({\n\t\t\t\t\t\t\t'http.response.status_code': statusCode,\n\t\t\t\t\t\t\t'http.duration_ms': duration,\n\t\t\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif (statusCode >= 400) {\n\t\t\t\t\t\t\tspan.setStatus({\n\t\t\t\t\t\t\t\tcode: SpanStatusCode.ERROR,\n\t\t\t\t\t\t\t\tmessage: `HTTP ${statusCode}`,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tspan.setAttribute('error', true);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tspan.end();\n\t\t\t\t\t}\n\t\t\t\t} catch (spanError) {\n\t\t\t\t\tconsole.error('[telemetry] Failed to end span:', spanError);\n\t\t\t\t}\n\n\t\t\t\t// Log response - wrapped in try/catch to prevent blocking\n\t\t\t\ttry {\n\t\t\t\t\tconst isError = statusCode >= 400;\n\t\t\t\t\tlogger?.emit({\n\t\t\t\t\t\tseverityNumber: isError\n\t\t\t\t\t\t\t? SeverityNumber.ERROR\n\t\t\t\t\t\t\t: SeverityNumber.INFO,\n\t\t\t\t\t\tseverityText: isError ? 'ERROR' : 'INFO',\n\t\t\t\t\t\tbody: `← ${method} ${route} → ${statusCode} (${duration}ms)`,\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\t\t'url.full': request.url,\n\t\t\t\t\t\t\t'http.route': route,\n\t\t\t\t\t\t\t'http.response.status_code': statusCode,\n\t\t\t\t\t\t\t'http.duration_ms': duration,\n\t\t\t\t\t\t\t'url.scheme': url.protocol.replace(':', ''),\n\t\t\t\t\t\t\t'server.address': url.host,\n\t\t\t\t\t\t\t'service.name': SERVICE_NAME,\n\t\t\t\t\t\t\t...CUSTOM_ATTRIBUTES,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t} catch (logError) {\n\t\t\t\t\tconsole.error('[telemetry] Failed to log response:', logError);\n\t\t\t\t}\n\n\t\t\t\t// Record metrics - wrapped in try/catch to prevent blocking\n\t\t\t\ttry {\n\t\t\t\t\thttpRequestDuration?.record(duration, {\n\t\t\t\t\t\t'http.request.method': method,\n\t\t\t\t\t\t'http.route': route,\n\t\t\t\t\t\t'http.response.status_code': statusCode,\n\t\t\t\t\t\t'url.scheme': url.protocol.replace(':', ''),\n\t\t\t\t\t});\n\t\t\t\t} catch (metricsError) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'[telemetry] Failed to record request duration:',\n\t\t\t\t\t\tmetricsError,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\n\t\t// Optionally add error inspector endpoint for source-mapped stack traces\n\t\tif (merged.sourcemaps?.enabled !== false) {\n\t\t\tconst rerouteDir = '.reroute';\n\n\t\t\tapp.post('/__reroute_telemetry/inspect', async ({ body }) => {\n\t\t\t\ttry {\n\t\t\t\t\tconst { stack } = body as { stack?: string };\n\t\t\t\t\tif (!stack) {\n\t\t\t\t\t\treturn { error: 'Missing stack trace' };\n\t\t\t\t\t}\n\n\t\t\t\t\tconst { resolveStackTrace } = await import('./sourcemap');\n\t\t\t\t\tconst result = await resolveStackTrace(stack, { rerouteDir });\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\toriginal: result.original,\n\t\t\t\t\t\tmapped: result.mapped,\n\t\t\t\t\t\tframes: result.frames,\n\t\t\t\t\t};\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error('[telemetry] Error inspection failed:', error);\n\t\t\t\t\treturn {\n\t\t\t\t\t\terror: error instanceof Error ? error.message : 'Unknown error',\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Optionally add browser telemetry proxy\n\t\tif (ENABLE_PROXY) {\n\t\t\tconst API_KEY = merged.apiKey || process.env.SIGNOZ_API_KEY;\n\n\t\t\t// Proxy handler function\n\t\t\tconst handleProxy = async (\n\t\t\t\tendpoint: string,\n\t\t\t\trequestBody: unknown,\n\t\t\t\t// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Proxy forwarding with error handling\n\t\t\t): Promise<{ status: number }> => {\n\t\t\t\tconst headers: Record<string, string> = {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t};\n\n\t\t\t\tif (API_KEY) {\n\t\t\t\t\theaders.Authorization = `Bearer ${API_KEY}`;\n\t\t\t\t}\n\n\t\t\t\t// Use custom handler if provided\n\t\t\t\tif (PROXY_HANDLER) {\n\t\t\t\t\treturn await PROXY_HANDLER({\n\t\t\t\t\t\tbody: requestBody,\n\t\t\t\t\t\tendpoint,\n\t\t\t\t\t\theaders,\n\t\t\t\t\t\totlpEndpoint: OTLP_ENDPOINT,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Default handler: forward to OTLP endpoint\n\t\t\t\ttry {\n\t\t\t\t\tconst controller = new AbortController();\n\t\t\t\t\tconst timeoutId = setTimeout(() => controller.abort(), 5000);\n\n\t\t\t\t\tconst response = await fetch(`${OTLP_ENDPOINT}${endpoint}`, {\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\theaders,\n\t\t\t\t\t\tbody: JSON.stringify(requestBody),\n\t\t\t\t\t\tsignal: controller.signal,\n\t\t\t\t\t});\n\n\t\t\t\t\tclearTimeout(timeoutId);\n\n\t\t\t\t\tif (PROXY_VERBOSE) {\n\t\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t\t`[telemetry-proxy]${endpoint} forwarded: ${response.status}`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!response.ok && PROXY_VERBOSE) {\n\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t`[telemetry-proxy] OTLP error: ${response.status} ${response.statusText}`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn { status: 200 };\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (PROXY_VERBOSE) {\n\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t`[telemetry-proxy] Failed to forward${endpoint}:`,\n\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn { status: 200 };\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tapp\n\t\t\t\t.post(\n\t\t\t\t\t`${PROXY_PATHNAME}/v1/traces`,\n\t\t\t\t\tasync function forwardBrowserTraces({ body }) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst result = await handleProxy('/v1/traces', body);\n\t\t\t\t\t\t\treturn new Response(null, { status: result.status });\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tconsole.error('[telemetry-proxy] Handler error:', error);\n\t\t\t\t\t\t\treturn new Response(null, { status: 200 });\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t\t.post(\n\t\t\t\t\t`${PROXY_PATHNAME}/v1/metrics`,\n\t\t\t\t\tasync function forwardBrowserMetrics({ body }) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst result = await handleProxy('/v1/metrics', body);\n\t\t\t\t\t\t\treturn new Response(null, { status: result.status });\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tconsole.error('[telemetry-proxy] Handler error:', error);\n\t\t\t\t\t\t\treturn new Response(null, { status: 200 });\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t\t.post(\n\t\t\t\t\t`${PROXY_PATHNAME}/v1/logs`,\n\t\t\t\t\tasync function forwardBrowserLogs({ body }) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst result = await handleProxy('/v1/logs', body);\n\t\t\t\t\t\t\treturn new Response(null, { status: result.status });\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tconsole.error('[telemetry-proxy] Handler error:', error);\n\t\t\t\t\t\t\treturn new Response(null, { status: 200 });\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t\t.get(`${PROXY_PATHNAME}/health`, () => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstatus: 'ok',\n\t\t\t\t\t\totlpEndpoint: OTLP_ENDPOINT,\n\t\t\t\t\t\ttimestamp: new Date().toISOString(),\n\t\t\t\t\t};\n\t\t\t\t});\n\t\t}\n\n\t\treturn app;\n\t};\n}\n",
40
40
  "export * from './context';\nexport * from './instrumentation';\nexport * from './plugin';\nexport * from './sourcemap';\n",
41
41
  "export * from './src/server';\n"
42
42
  ],
43
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AA8BO,SAAS,UAAU,CAAC,YAA0C;AAAA,EACpE,MAAM,UAAU,eAAe,SAAS,KAAK,CAAC;AAAA,EAC9C,MAAM,UAAU,KAAK,YAAY,WAAW;AAAA,EAK5C,IAAI;AAAA,IAEH,IAAI,eAAe,SAAS,GAAG,CAI/B;AAAA,IACC,MAAM;AAAA,EAKR,0BAA0B;AAAA;AAgBpB,SAAS,YAAY,GAAS;AAAA,EACpC,0BAA0B,CAAC;AAAA;AASrB,SAAS,cAAc,GAA2B;AAAA,EACxD,OAAO,eAAe,SAAS,KAAK,2B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O,CAAC;AAAA,UAClD,OAAO,OAAO;AAAA,UACf,QAAQ,MAAM,oCAAoC,KAAK;AAAA,UACvD,OAAO,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;AAAA;AAAA,OAG5C,EACC,KACA,GAAG,0BACH,eAAe,kBAAkB,GAAG,QAAQ;AAAA,QAC3C,IAAI;AAAA,UACH,MAAM,SAAS,MAAM,YAAY,YAAY,IAAI;AAAA,UACjD,OAAO,IAAI,SAAS,MAAM,EAAE,QAAQ,OAAO,OAAO,CAAC;AAAA,UAClD,OAAO,OAAO;AAAA,UACf,QAAQ,MAAM,oCAAoC,KAAK;AAAA,UACvD,OAAO,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;AAAA;AAAA,OAG5C,EACC,IAAI,GAAG,yBAAyB,MAAM;AAAA,QACtC,OAAO;AAAA,UACN,QAAQ;AAAA,UACR,cAAc;AAAA,UACd,WAAW,IAAI,KAAK,EAAE,YAAY;AAAA,QACnC;AAAA,OACA;AAAA,IACH;AAAA,IAEA,OAAO;AAAA;AAAA;AAAA;AAAA,EAvjCT;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;;;;ECrCA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;;;;ECHA;AAAA;",
44
+ "debugId": "285A14D956C9BEB664756E2164756E21",
45
45
  "names": []
46
46
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.31.8
2
+ * reroute-js v0.32.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.31.8
2
+ * reroute-js v0.32.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.31.8
2
+ * reroute-js v0.32.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.31.8
2
+ * reroute-js v0.32.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.31.8
2
+ * reroute-js v0.32.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.31.8
2
+ * reroute-js v0.32.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.31.8
2
+ * reroute-js v0.32.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.31.8
2
+ * reroute-js v0.32.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/telemetry/src/server/plugin.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAKpE;;;;GAIG;AACH,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;CAAG;AAoEnE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,sBAA2B,IAE/C,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;IAm0BzB"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/telemetry/src/server/plugin.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAKpE;;;;GAIG;AACH,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;CAAG;AAoEnE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,sBAA2B,IAE/C,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;IAg9BzB"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * reroute-js v0.31.8
2
+ * reroute-js v0.32.0
3
3
  *
4
4
  * @license MIT
5
5
  * @copyright 2025 stewones <hi@stewan.io>