@od-oneapp/observability 2026.2.1701 → 2026.2.2301-canary
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.
- package/CHANGELOG.md +3 -3
- package/README.md +6 -6
- package/client-next.d.mts +6 -6
- package/client-next.mjs +4 -4
- package/client.d.mts +3 -3
- package/client.mjs +1 -1
- package/client.mjs.map +1 -1
- package/core-BKuLZf5B.mjs +95 -0
- package/core-BKuLZf5B.mjs.map +1 -0
- package/env.d.mts +2 -2
- package/env.mjs +1 -1
- package/env.mjs.map +1 -1
- package/{factory-DkY353r8.mjs → factory-CuW4AM5b.mjs} +2 -2
- package/factory-CuW4AM5b.mjs.map +1 -0
- package/hooks-useObservability.d.mts +1 -1
- package/hooks-useObservability.mjs +1 -1
- package/hooks-useObservability.mjs.map +1 -1
- package/{index-CpcdzWrF.d.mts → index-CyBL4Sra.d.mts} +3 -3
- package/{index-CpcdzWrF.d.mts.map → index-CyBL4Sra.d.mts.map} +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/{manager-BxQqOPEg.d.mts → manager-0G9cdhWY.d.mts} +2 -2
- package/{manager-BxQqOPEg.d.mts.map → manager-0G9cdhWY.d.mts.map} +1 -1
- package/package.json +53 -40
- package/{plugin-lPdJirTY.mjs → plugin-AzRcMmXa.mjs} +2 -2
- package/plugin-AzRcMmXa.mjs.map +1 -0
- package/{plugin-CP895lBx.mjs → plugin-BjJ3pgvT.mjs} +2 -2
- package/plugin-BjJ3pgvT.mjs.map +1 -0
- package/{plugin-Bfq-o3nr.d.mts → plugin-BqLvYLQZ.d.mts} +1 -1
- package/{plugin-Bfq-o3nr.d.mts.map → plugin-BqLvYLQZ.d.mts.map} +1 -1
- package/plugin-BrzKQ9II.mjs +593 -0
- package/plugin-BrzKQ9II.mjs.map +1 -0
- package/{plugin-Bt-ygG1m.d.mts → plugin-C11_suJr.d.mts} +4 -4
- package/{plugin-Bt-ygG1m.d.mts.map → plugin-C11_suJr.d.mts.map} +1 -1
- package/{plugin-CaQxviDs.d.mts → plugin-Cn23gGuY.d.mts} +2 -2
- package/{plugin-CaQxviDs.d.mts.map → plugin-Cn23gGuY.d.mts.map} +1 -1
- package/plugins-betterstack-env.mjs +1 -1
- package/plugins-betterstack-env.mjs.map +1 -1
- package/plugins-betterstack.d.mts +2 -2
- package/plugins-betterstack.mjs +1 -1
- package/plugins-console.d.mts +1 -1
- package/plugins-sentry-env.d.mts +4 -4
- package/plugins-sentry-env.mjs +1 -1
- package/plugins-sentry-env.mjs.map +1 -1
- package/plugins-sentry-microfrontend-env.mjs +1 -1
- package/plugins-sentry-microfrontend-env.mjs.map +1 -1
- package/plugins-sentry-microfrontend.d.mts +1 -1
- package/plugins-sentry-microfrontend.mjs +1 -1
- package/plugins-sentry.d.mts +2 -2
- package/plugins-sentry.mjs +1 -1
- package/server-edge.d.mts +4 -4
- package/server-edge.mjs +2 -2
- package/server-next.d.mts +6 -6
- package/server-next.mjs +4 -4
- package/server.d.mts +3 -3
- package/server.mjs +1 -1
- package/server.mjs.map +1 -1
- package/{utils-DjjqCeoW.d.mts → utils-BGdqvezr.d.mts} +4 -3
- package/utils-BGdqvezr.d.mts.map +1 -0
- package/factory-DkY353r8.mjs.map +0 -1
- package/plugin-CP895lBx.mjs.map +0 -1
- package/plugin-CxeJHHeJ.mjs +0 -1195
- package/plugin-CxeJHHeJ.mjs.map +0 -1
- package/plugin-lPdJirTY.mjs.map +0 -1
- package/utils-DjjqCeoW.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-BrzKQ9II.mjs","names":[],"sources":["../src/plugins/sentry-microfrontend/multiplexed-transport.ts","../src/plugins/sentry-microfrontend/sentry-types.ts","../src/plugins/sentry-microfrontend/utils.ts","../src/plugins/sentry-microfrontend/plugin.ts"],"sourcesContent":["/**\n * @fileoverview Multiplexed transport utilities for Sentry Micro Frontend Plugin\n * Multiplexed transport utilities for Sentry Micro Frontend Plugin\n */\n\nimport { logWarn } from '@od-oneapp/shared/logs';\n\nimport type { BackstageAppConfig } from './types';\n\n/**\n * Create a multiplexed transport that routes events to different Sentry projects.\n *\n * Creates a Sentry transport that routes events to different DSNs based on the\n * backstageApp information in the event. Supports edge runtime environments.\n *\n * @param backstage - Array of backstage app configurations with DSNs\n * @param fallbackDsn - Optional fallback DSN if no backstageApp match is found\n * @param sentryClient - Optional Sentry client instance (defaults to global Sentry)\n * @returns Multiplexed transport instance, or undefined if Sentry is not available\n */\n\nexport function createMultiplexedTransport(\n backstage: BackstageAppConfig[],\n fallbackDsn?: string,\n\n sentryClient?: any,\n): any {\n // Import Sentry dynamically or use provided client (edge runtime compatible)\n const Sentry =\n sentryClient !== undefined\n ? sentryClient\n : typeof globalThis !== 'undefined'\n ? (globalThis as any).Sentry\n : null;\n\n if (!Sentry?.makeMultiplexedTransport || !Sentry.makeFetchTransport) {\n logWarn('Sentry multiplexed transport not available');\n return undefined;\n }\n\n return Sentry.makeMultiplexedTransport(Sentry.makeFetchTransport, (args: any) => {\n const event = args.getEvent();\n\n if (!event) {\n return [];\n }\n\n // Extract backstageApp information from various sources\n const backstageApp =\n event.tags?.backstageApp ??\n event.extra?.backstageApp ??\n event.contexts?.microFrontend?.backstageApp;\n\n if (backstageApp) {\n // Find backstageApp configuration\n const backstageAppConfig = backstage.find(z => z.name === backstageApp);\n\n if (backstageAppConfig?.dsn) {\n // Route to backstageApp-specific DSN\n\n const envelope: any[] = [\n {\n dsn: backstageAppConfig.dsn,\n release: backstageAppConfig.release ?? event.release,\n },\n ];\n\n // Add backstageApp-specific tags if configured\n if (backstageAppConfig.tags && event.tags) {\n Object.assign(event.tags, backstageAppConfig.tags);\n }\n\n return envelope;\n }\n }\n\n // Use fallback DSN if provided\n if (fallbackDsn) {\n return [{ dsn: fallbackDsn }];\n }\n\n // Let the default DSN handle it\n return [];\n });\n}\n\n/**\n * Create a transport matcher function for more complex routing logic.\n *\n * Creates a matcher function that can be used with Sentry's multiplexed transport\n * to route events based on custom logic, including stack frame analysis.\n *\n * @param backstage - Array of backstage app configurations\n * @param customMatcher - Optional custom matcher function to extract backstageApp from event\n * @returns Matcher function that returns an array of transport configurations\n */\nexport function createTransportMatcher(\n backstage: BackstageAppConfig[],\n\n customMatcher?: (event: any) => string | undefined,\n): (args: any) => any[] {\n return (args: any) => {\n const event = args.getEvent();\n\n if (!event) {\n return [];\n }\n\n // Use custom matcher if provided\n let backstageApp: string | undefined;\n if (customMatcher) {\n backstageApp = customMatcher(event);\n }\n\n // Fall back to default backstageApp detection\n backstageApp ??=\n event.tags?.backstageApp ??\n event.extra?.backstageApp ??\n event.contexts?.microFrontend?.backstageApp;\n\n // Try to detect backstageApp from stack frames\n if (!backstageApp && event.exception?.values?.[0]?.stacktrace?.frames) {\n const { frames } = event.exception.values[0].stacktrace;\n for (const frame of frames) {\n if (frame.filename) {\n // Check if filename contains backstageApp hints\n if (frame.filename.includes('/cms/')) {\n backstageApp = 'cms';\n break;\n } else if (frame.filename.includes('/workflows/')) {\n backstageApp = 'workflows';\n break;\n } else if (frame.filename.includes('/authmgmt/')) {\n backstageApp = 'authmgmt';\n break;\n }\n }\n }\n }\n\n if (backstageApp) {\n const backstageAppConfig = backstage.find(z => z.name === backstageApp);\n if (backstageAppConfig?.dsn) {\n return [\n {\n dsn: backstageAppConfig.dsn,\n release: backstageAppConfig.release,\n },\n ];\n }\n }\n\n return [];\n };\n}\n\n/**\n * Enhance an event with Backstage app information before sending.\n *\n * Adds backstageApp tags, context, and extra data to a Sentry event.\n * This ensures events are properly tagged for micro frontend routing.\n *\n * @param event - Sentry event to enhance\n * @param backstageApp - Name of the backstage app\n * @param additionalContext - Optional additional context to add\n * @returns Enhanced event with backstageApp information\n */\n\nexport function enhanceEventWithBackstageApp(\n event: any,\n backstageApp: string,\n\n additionalContext?: Record<string, any>,\n): any {\n // Add backstageApp tag\n event.tags ??= {};\n event.tags.backstageApp = backstageApp;\n event.tags.microFrontend = true;\n\n // Add backstageApp context\n event.contexts ??= {};\n event.contexts.microFrontend = {\n backstageApp,\n timestamp: new Date().toISOString(),\n ...additionalContext,\n };\n\n // Add backstageApp to extra for backward compatibility\n event.extra ??= {};\n event.extra.backstageApp = backstageApp;\n\n return event;\n}\n\n/**\n * Create a beforeSend hook that adds backstageApp information.\n *\n * Creates a Sentry beforeSend hook that enhances events with backstageApp information\n * before they are sent. Can wrap an existing beforeSend hook.\n *\n * @param backstageApp - Name of the backstage app\n * @param originalBeforeSend - Optional original beforeSend hook to wrap\n * @returns beforeSend hook function\n */\nexport function createBackstageBeforeSend(\n backstageApp: string,\n\n originalBeforeSend?: (event: any, hint: any) => any,\n): (event: any, hint: any) => any {\n return (event: any, hint: any) => {\n // Enhance with backstageApp information\n enhanceEventWithBackstageApp(event, backstageApp);\n\n // Call original beforeSend if provided\n if (originalBeforeSend) {\n return originalBeforeSend(event, hint);\n }\n\n return event;\n };\n}\n","/**\n * @fileoverview Type definitions for Sentry SDK\n * Type definitions for Sentry SDK\n * These are minimal types to avoid using 'any' throughout the plugin\n */\n\nimport type { LogLevel } from '../../core/types';\n\n/**\n * Sentry Scope interface\n */\nexport interface SentryScope {\n setTag(key: string, value: string | number | boolean | null): void;\n setContext(key: string, context: Record<string, any> | null): void;\n setUser(user: Record<string, any> | null): void;\n setLevel(level: SentrySeverityLevel): void;\n setFingerprint(fingerprint: string[]): void;\n clear(): void;\n}\n\n/**\n * Sentry Hub interface\n */\nexport interface SentryHub {\n getScope(): SentryScope;\n pushScope(): SentryScope;\n popScope(): boolean;\n withScope(callback: (scope: SentryScope) => void): void;\n}\n\n/**\n * Sentry Client interface\n */\nexport interface SentryClient {\n captureException(exception: any, hint?: any): string;\n captureMessage(message: string, level?: SentrySeverityLevel): string;\n captureEvent(event: any): string;\n flush(timeout?: number): Promise<boolean>;\n close(timeout?: number): Promise<boolean>;\n getOptions(): SentryOptions;\n getCurrentHub?(): SentryHub;\n}\n\n/**\n * Sentry SDK interface\n */\nexport interface SentrySDK {\n init(options: SentryOptions): void;\n captureException(exception: any, captureContext?: any): string;\n captureMessage(message: string, captureContext?: any): string;\n captureEvent(event: any, hint?: any): string;\n withScope(callback: (scope: SentryScope) => void): void;\n addBreadcrumb(breadcrumb: any): void;\n setUser(user: any): void;\n setTag(key: string, value: string): void;\n setContext(key: string, context: any): void;\n setExtra(key: string, extra: any): void;\n getCurrentHub(): SentryHub;\n getClient<T extends SentryClient>(): T | undefined;\n flush(timeout?: number): Promise<boolean>;\n close(timeout?: number): Promise<boolean>;\n lastEventId(): string | undefined;\n\n // Integration methods\n addEventProcessor(processor: (event: any) => any | null): void;\n\n // Browser specific\n Scope?: new () => SentryScope;\n\n // Transport creation\n makeMultiplexedTransport?(\n createTransport: (options: any) => any,\n matcher: (options: any) => any[],\n ): any;\n makeFetchTransport?(options: any): any;\n\n // Integrations\n browserTracingIntegration?(): any;\n browserProfilingIntegration?(): any;\n replayIntegration?(options?: any): any;\n captureConsoleIntegration?(options?: any): any;\n feedbackIntegration?(options?: any): any;\n vercelAIIntegration?(): any;\n}\n\n/**\n * Sentry Options interface\n */\nexport interface SentryOptions {\n dsn?: string;\n release?: string;\n environment?: string;\n debug?: boolean;\n sampleRate?: number;\n tracesSampleRate?: number;\n profilesSampleRate?: number;\n replaysSessionSampleRate?: number;\n replaysOnErrorSampleRate?: number;\n transport?: any;\n integrations?: any[];\n beforeSend?: (event: any, hint: any) => any | null;\n beforeSendTransaction?: (event: any, hint: any) => any | null;\n beforeBreadcrumb?: (breadcrumb: any, hint?: any) => any | null;\n tracePropagationTargets?: (string | RegExp)[];\n initialScope?: any;\n maxBreadcrumbs?: number;\n attachStacktrace?: boolean;\n autoSessionTracking?: boolean;\n sendDefaultPii?: boolean;\n\n _experiments?: Record<string, any>;\n}\n\n/**\n * Sentry Severity Level\n */\nexport type SentrySeverityLevel = 'fatal' | 'error' | 'warning' | 'log' | 'info' | 'debug';\n\n/**\n * Map LogLevel to Sentry Severity.\n *\n * Converts the observability package's LogLevel to Sentry's SeverityLevel format.\n *\n * @param level - Log level from observability package\n * @returns Corresponding Sentry severity level\n */\nexport function mapLogLevelToSentrySeverity(level: LogLevel): SentrySeverityLevel {\n switch (level) {\n case 'error':\n return 'error';\n case 'warning':\n return 'warning';\n case 'info':\n return 'info';\n case 'debug':\n return 'debug';\n default:\n return 'info';\n }\n}\n","/**\n * @fileoverview Utility functions for Sentry Micro Frontend Plugin\n * Utility functions for Sentry Micro Frontend Plugin\n */\n\nimport { logError } from '@od-oneapp/shared/logs';\n\nimport type { BackstageAppConfig } from './types';\n\n/**\n * Detect the current micro frontend backstageApp based on URL path.\n *\n * Analyzes the current URL pathname to determine which micro frontend application\n * is active. Supports custom path patterns and falls back to default patterns.\n *\n * @param customPatterns - Optional array of custom backstage app configurations with path patterns\n * @returns Detected backstage app name, or undefined if not detected\n *\n * @example\n * ```typescript\n * const app = detectCurrentBackstageApp([\n * { name: 'admin', pathPatterns: ['/admin', '/manage'] },\n * { name: 'dashboard', pathPatterns: [/^\\/dashboard/] }\n * ]);\n * // Returns: 'admin' if pathname starts with '/admin' or '/manage'\n * ```\n */\nexport function detectCurrentBackstageApp(\n customPatterns?: BackstageAppConfig[],\n): string | undefined {\n // Edge runtime compatible check\n if (\n typeof globalThis === 'undefined' ||\n !(globalThis as { location?: { pathname?: string; href?: string } }).location\n ) {\n // Server-side or edge: check Next.js basePath or environment variables\n // Note: process.env is not available in edge runtime\n if (typeof process !== 'undefined' && process.env?.NEXT_PUBLIC_BASE_PATH) {\n return process.env.NEXT_PUBLIC_BASE_PATH.replace('/', '');\n }\n return undefined;\n }\n\n const path = (globalThis as { location?: { pathname?: string } }).location?.pathname;\n if (!path) {\n return undefined;\n }\n\n // Check custom patterns first\n if (customPatterns) {\n for (const config of customPatterns) {\n if (config.pathPatterns) {\n for (const pattern of config.pathPatterns) {\n if (typeof pattern === 'string' && path.startsWith(pattern)) {\n return config.name;\n } else if (pattern instanceof RegExp && pattern.test(path)) {\n return config.name;\n }\n }\n }\n }\n }\n\n // Default patterns for common microfrontend zones\n if (path.startsWith('/admin')) return 'admin';\n if (path.startsWith('/dashboard')) return 'dashboard';\n if (path.startsWith('/settings')) return 'settings';\n\n // Check for backstageApp in global object (set by host)\n\n if ((globalThis as any).__SENTRY_MICRO_FRONTEND_APP__) {\n return (globalThis as any).__SENTRY_MICRO_FRONTEND_APP__;\n }\n\n if ((globalThis as any).__SENTRY_MICRO_FRONTEND_ZONE__) {\n // Backwards compatibility with legacy zone naming\n\n return (globalThis as any).__SENTRY_MICRO_FRONTEND_ZONE__;\n }\n\n return 'main';\n}\n\n/**\n * Check if running in a host environment.\n *\n * Determines whether the current application is acting as a host for micro frontends\n * or as a child micro frontend. Checks for explicit host markers and Sentry initialization state.\n *\n * @returns True if running as host, false if child or standalone\n */\nexport function isHostEnvironment(): boolean {\n if (typeof globalThis === 'undefined') {\n return false;\n }\n\n // Check if explicitly marked as host\n\n if ((globalThis as any).__SENTRY_MICRO_FRONTEND_HOST__) {\n return true;\n }\n\n // Check if Sentry is already initialized (likely means we're a child)\n if (\n (globalThis as any).Sentry &&\n typeof (globalThis as any).Sentry.getCurrentHub === 'function'\n ) {\n return false;\n }\n\n // Default to false (safer to assume child mode)\n return false;\n}\n\n/**\n * Create a Sentry scope with backstageApp-specific context.\n *\n * Creates a new Sentry scope configured with micro frontend tags and context.\n * Includes backstageApp tag, microFrontend context, and any additional tags provided.\n *\n * @param backstageApp - Name of the backstage app\n * @param additionalTags - Optional additional tags to set on the scope\n * @returns Sentry scope instance, or null if Sentry is not available\n */\n\nexport function createBackstageScope(\n backstageApp: string,\n additionalTags?: Record<string, string>,\n): unknown {\n if (typeof globalThis === 'undefined' || !(globalThis as any).Sentry) {\n return null;\n }\n\n const { Sentry } = globalThis as any;\n\n // Check if Scope constructor is available\n if (!Sentry.Scope || typeof Sentry.Scope !== 'function') {\n return null;\n }\n\n try {\n const scope = new Sentry.Scope();\n\n // Set backstageApp tag\n scope.setTag('backstageApp', backstageApp);\n scope.setTag('microFrontend', true);\n\n // Set backstageApp context\n scope.setContext('microFrontend', {\n backstageApp,\n\n isHost: (globalThis as any).__SENTRY_MICRO_FRONTEND_HOST__ ?? false,\n url: (globalThis as { location?: { href?: string } }).location?.href ?? undefined,\n });\n\n // Add additional tags if provided\n if (additionalTags) {\n Object.entries(additionalTags).forEach(([key, value]) => {\n scope.setTag(key, value);\n });\n }\n\n return scope;\n } catch (error) {\n logError('[SentryMicroFrontendPlugin] Failed to create Backstage scope', { error });\n return null;\n }\n}\n\n/**\n * Check if Sentry is already initialized by a parent application.\n *\n * Verifies whether a parent Sentry instance exists in the global scope.\n * Used to determine if the current micro frontend should use the parent's Sentry\n * or initialize its own instance.\n *\n * @returns True if parent Sentry is available, false otherwise\n */\nexport function hasParentSentry(): boolean {\n if (typeof globalThis === 'undefined') {\n return false;\n }\n\n // Check for Sentry global\n\n const { Sentry } = globalThis as any;\n if (!Sentry) {\n return false;\n }\n\n // Verify it's a real Sentry instance with expected methods\n const requiredMethods = ['captureException', 'captureMessage', 'withScope'];\n return requiredMethods.every(method => typeof Sentry[method] === 'function');\n}\n\n/**\n * Get the parent Sentry instance if available.\n *\n * Returns the global Sentry instance if it exists and has been initialized\n * by a parent application. Returns null if no parent Sentry is available.\n *\n * @returns Parent Sentry SDK instance, or null if not available\n */\n\nexport function getParentSentry(): any {\n if (hasParentSentry()) {\n return (globalThis as any).Sentry;\n }\n return null;\n}\n\n/**\n * Mark the current environment as a host.\n *\n * Sets global flags indicating that this application is acting as a host\n * for micro frontends. This affects how Sentry events are routed and tagged.\n *\n * @param backstageApp - Optional backstage app name to set\n */\nexport function markAsHost(backstageApp?: string): void {\n if (typeof globalThis !== 'undefined') {\n (globalThis as any).__SENTRY_MICRO_FRONTEND_HOST__ = true;\n if (backstageApp) {\n (globalThis as any).__SENTRY_MICRO_FRONTEND_APP__ = backstageApp;\n\n (globalThis as any).__SENTRY_MICRO_FRONTEND_ZONE__ = backstageApp;\n }\n }\n}\n\n/**\n * Get backstageApp-specific configuration.\n *\n * Finds the configuration for a specific backstage app from the provided array.\n *\n * @param backstageApp - Name of the backstage app to find\n * @param backstage - Array of backstage app configurations\n * @returns Configuration for the specified app, or undefined if not found\n */\nexport function getBackstageAppConfig(\n backstageApp: string,\n backstage: BackstageAppConfig[],\n): BackstageAppConfig | undefined {\n return backstage.find(app => app.name === backstageApp);\n}\n\n/**\n * Ensure only one Sentry initialization happens (thread-safe).\n *\n * Prevents multiple Sentry initializations using global state tracking.\n * Uses timestamps and unique IDs to detect concurrent initialization attempts.\n * Throws an error if Sentry is already initialized or if concurrent initialization is detected.\n *\n * @throws Error if Sentry is already initialized or concurrent initialization detected\n */\nexport function ensureSingleInit(): void {\n // Use a more robust initialization check with timestamps\n const initKey = '__SENTRY_INIT_STATE__';\n const now = Date.now();\n\n if (typeof globalThis !== 'undefined') {\n const globalState = (globalThis as any)[initKey];\n\n // Check if already initialized or currently initializing\n if (globalState) {\n const { status, timestamp, id } = globalState;\n\n // If initialized, throw error\n if (status === 'initialized') {\n throw new Error(\n 'Sentry has already been initialized! Use hasParentSentry() to check before initializing.',\n );\n }\n\n // If initializing and it's been less than 5 seconds, assume another process is initializing\n if (status === 'initializing' && now - timestamp < 5000) {\n throw new Error(\n `Sentry initialization already in progress (started ${now - timestamp}ms ago by ${id})`,\n );\n }\n }\n\n // Mark as initializing with timestamp and unique ID\n const initId = `${now}-${Math.random().toString(36).substr(2, 9)}`;\n\n (globalThis as any)[initKey] = {\n status: 'initializing',\n timestamp: now,\n id: initId,\n };\n\n // Small delay to allow for race condition detection\n // In a real thread-safe implementation, this would use proper locking\n\n const checkState = (globalThis as any)[initKey];\n if (checkState.id !== initId) {\n throw new Error('Concurrent Sentry initialization detected');\n }\n\n // Mark as initialized\n\n (globalThis as any)[initKey] = {\n status: 'initialized',\n timestamp: now,\n id: initId,\n };\n\n // Also set legacy flag for backward compatibility\n\n (globalThis as any).__SENTRY_INITIALIZED__ = true;\n }\n}\n\n/**\n * Reset initialization flag (mainly for testing).\n *\n * Clears the global Sentry initialization state. Useful for testing scenarios\n * where you need to test initialization multiple times.\n */\nexport function resetInitFlag(): void {\n if (typeof globalThis !== 'undefined') {\n delete (globalThis as any).__SENTRY_INITIALIZED__;\n\n delete (globalThis as any).__SENTRY_INIT_STATE__;\n }\n}\n","/**\n * @fileoverview Sentry Micro Frontend Plugin\n * Sentry Micro Frontend Plugin\n *\n * Extends the base Sentry plugin with micro frontend-specific functionality\n */\n\nimport { SentryPlugin } from '@od-oneapp/integration-sentry/observability-plugin/plugin';\nimport { logDebug, logError, logWarn } from '@od-oneapp/shared/logs';\n\nimport {\n createBackstageBeforeSend,\n createMultiplexedTransport,\n enhanceEventWithBackstageApp,\n} from './multiplexed-transport';\nimport { mapLogLevelToSentrySeverity } from './sentry-types';\nimport {\n createBackstageScope,\n detectCurrentBackstageApp,\n ensureSingleInit,\n getParentSentry,\n hasParentSentry,\n markAsHost,\n} from './utils';\n\nimport type { SentryScope, SentrySDK } from './sentry-types';\nimport type { MicroFrontendMode, SentryMicroFrontendConfig } from './types';\nimport type { LogLevel, ObservabilityContext } from '../../core/types';\n\n/**\n * Sentry plugin optimized for micro frontend architectures\n */\n/**\n * Sentry plugin optimized for micro frontend architectures.\n *\n * Extends SentryPlugin with micro frontend-specific features:\n * - Host/child/standalone mode detection\n * - Multiplexed transport for routing events to different Sentry projects\n * - Backstage app context management\n * - Parent Sentry instance detection and reuse\n */\nexport class SentryMicroFrontendPlugin extends SentryPlugin {\n private mode: MicroFrontendMode;\n private backstageApp: string | undefined;\n private parentSentry: SentrySDK | undefined;\n private backstageScope: SentryScope | undefined;\n private microFrontendConfig: SentryMicroFrontendConfig;\n private eventProcessorCleanup?: (() => void) | undefined;\n\n /**\n * Create a new SentryMicroFrontendPlugin instance.\n *\n * @param config - Sentry micro frontend plugin configuration\n */\n constructor(config: SentryMicroFrontendConfig = {}) {\n // Determine operation mode\n const mode = SentryMicroFrontendPlugin.determineMode(config);\n\n // Prepare base config based on mode\n const baseConfig = SentryMicroFrontendPlugin.prepareConfig(config, mode);\n\n // Initialize parent class\n super(baseConfig);\n\n this.mode = mode;\n this.microFrontendConfig = config;\n this.backstageApp = config.backstageApp ?? detectCurrentBackstageApp(config.backstageApps);\n\n // Handle parent Sentry if in child mode\n if (this.mode === 'child') {\n const parent = getParentSentry();\n if (parent) {\n this.parentSentry = parent as SentrySDK;\n this.enabled = true; // Re-enable since we'll use parent\n\n // Create backstageApp-specific scope\n if (this.backstageApp && this.parentSentry.Scope) {\n this.backstageScope = createBackstageScope(\n this.backstageApp,\n config.globalTags,\n ) as SentryScope;\n }\n }\n }\n\n // Mark as host if applicable\n if (this.mode === 'host') {\n markAsHost(this.backstageApp);\n }\n }\n\n /**\n * Determine the operation mode based on configuration and environment.\n *\n * @param config - Plugin configuration\n * @returns Operation mode ('host', 'child', or 'standalone')\n */\n private static determineMode(config: SentryMicroFrontendConfig): MicroFrontendMode {\n // Explicit host mode\n if (config.isHost) {\n return 'host';\n }\n\n // Check for parent Sentry\n if (config.detectParent !== false && hasParentSentry()) {\n return 'child';\n }\n\n // Default to standalone\n return 'standalone';\n }\n\n /**\n * Prepare configuration based on operation mode.\n *\n * Adjusts configuration settings based on whether running as host, child, or standalone.\n *\n * @param config - Original plugin configuration\n * @param mode - Determined operation mode\n * @returns Prepared configuration object\n */\n private static prepareConfig(\n config: SentryMicroFrontendConfig,\n mode: MicroFrontendMode,\n ): SentryMicroFrontendConfig {\n const preparedConfig = { ...config };\n\n if (mode === 'child') {\n // Disable initialization in child mode\n preparedConfig.enabled = false;\n } else if (\n mode === 'host' &&\n config.backstageApps &&\n config.useMultiplexedTransport !== false\n ) {\n // Host mode with multiplexed transport is handled in initialize()\n // Don't set transport here as it needs Sentry to be loaded first\n }\n\n return preparedConfig;\n }\n\n /**\n * Initialize the plugin\n */\n async initialize(config?: SentryMicroFrontendConfig): Promise<void> {\n const mergedConfig = { ...this.microFrontendConfig, ...config };\n\n if (this.mode === 'child') {\n // In child mode, we don't initialize Sentry but set up our client reference\n if (this.parentSentry) {\n this.client = this.parentSentry;\n this.initialized = true;\n\n // Configure parent Sentry to include backstageApp information\n if (this.backstageApp && mergedConfig.addBackstageContext !== false) {\n this.configureParentSentry();\n }\n }\n return;\n }\n\n // For host and standalone modes\n if (mergedConfig.preventDuplicateInit !== false) {\n try {\n ensureSingleInit();\n } catch (error) {\n logError('Sentry initialization prevented', { error });\n this.enabled = false;\n return;\n }\n }\n\n // Initialize parent class\n await super.initialize(mergedConfig);\n\n // Additional setup for host mode\n if (this.mode === 'host' && this.client && mergedConfig.backstageApps) {\n this.setupHostMode(mergedConfig);\n }\n }\n\n /**\n * Configure parent Sentry instance for child mode\n */\n private configureParentSentry(): void {\n if (!this.parentSentry || !this.backstageApp) {\n logWarn(\n '[SentryMicroFrontendPlugin] Cannot configure parent Sentry: missing parentSentry or backstageApp',\n );\n return;\n }\n\n try {\n // Create event processor\n\n const processor = (event: any) => {\n try {\n if (this.shouldProcessEvent(event)) {\n enhanceEventWithBackstageApp(event, this.backstageApp ?? '', {\n mode: this.mode,\n plugin: 'SentryMicroFrontendPlugin',\n });\n }\n } catch (error) {\n logError('[SentryMicroFrontendPlugin] Error processing event', { error, event });\n }\n return event;\n };\n\n // Add global event processor to include backstageApp information\n if (typeof this.parentSentry.addEventProcessor === 'function') {\n this.parentSentry.addEventProcessor(processor);\n\n // Store cleanup function\n this.eventProcessorCleanup = () => {\n // Note: Sentry SDK doesn't provide a way to remove event processors\n // We'll mark events as processed to avoid double processing\n };\n } else {\n logWarn('[SentryMicroFrontendPlugin] Parent Sentry does not support addEventProcessor');\n }\n } catch (error) {\n logError('[SentryMicroFrontendPlugin] Failed to configure parent Sentry', { error });\n }\n }\n\n /**\n * Set up host mode with multiplexed transport\n */\n private setupHostMode(config: SentryMicroFrontendConfig): void {\n if (!config.backstageApps || !this.client) {\n logWarn(\n '[SentryMicroFrontendPlugin] Cannot setup host mode: missing backstageApps or client',\n );\n return;\n }\n\n try {\n // Create multiplexed transport\n const transport = createMultiplexedTransport(\n config.backstageApps,\n config.fallbackDsn ?? config.dsn,\n this.client,\n );\n\n if (transport && typeof (this.client as any).init === 'function') {\n // Re-initialize with multiplexed transport\n const currentOptions =\n typeof (this.client as any).getOptions === 'function'\n ? (this.client as any).getOptions()\n : {};\n\n (this.client as any).init({\n ...currentOptions,\n transport,\n beforeSend: createBackstageBeforeSend(this.backstageApp ?? 'main', config.beforeSend),\n });\n } else {\n logWarn(\n '[SentryMicroFrontendPlugin] Client does not support init method or transport creation failed',\n );\n }\n } catch (error) {\n logError('[SentryMicroFrontendPlugin] Failed to setup host mode', { error });\n }\n }\n\n /**\n * Check if we should process this event\n */\n\n private shouldProcessEvent(event: any): boolean {\n // Don't double-process events\n if (event.tags?.microFrontendProcessed) {\n return false;\n }\n\n // Check if event is from our backstageApp\n if (\n this.backstageApp &&\n event.tags?.backstageApp &&\n event.tags.backstageApp !== this.backstageApp\n ) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Capture an exception with backstageApp context\n */\n captureException(error: Error | unknown, context?: ObservabilityContext): void {\n if (!this.enabled) return;\n\n try {\n if (this.mode === 'child' && this.parentSentry && this.backstageScope) {\n // Use parent Sentry with backstageApp scope\n if (typeof this.parentSentry.withScope === 'function') {\n this.parentSentry.withScope((scope: any) => {\n try {\n // Copy backstageApp scope properties\n if (this.backstageScope && typeof scope.setTag === 'function') {\n scope.setTag('backstageApp', this.backstageApp ?? 'unknown');\n scope.setTag('microFrontend', true);\n scope.setContext('microFrontend', {\n backstageApp: this.backstageApp,\n mode: this.mode,\n });\n }\n\n // Add additional context\n if (context && typeof scope.setContext === 'function') {\n scope.setContext('additional', context);\n }\n\n if (this.parentSentry && typeof this.parentSentry.captureException === 'function') {\n this.parentSentry.captureException(error);\n }\n } catch (scopeError) {\n logError('[SentryMicroFrontendPlugin] Error in scope callback', {\n error: scopeError,\n });\n }\n });\n } else {\n logWarn('[SentryMicroFrontendPlugin] Parent Sentry does not support withScope');\n }\n } else {\n // Use standard capture with backstageApp enhancement\n const enhancedContext = {\n ...context,\n microFrontend: {\n backstageApp: this.backstageApp,\n mode: this.mode,\n },\n };\n super.captureException(error, enhancedContext);\n }\n } catch (captureError) {\n logError('[SentryMicroFrontendPlugin] Failed to capture exception', { error: captureError });\n }\n }\n\n /**\n * Capture a message with backstageApp context\n */\n captureMessage(message: string, level: LogLevel = 'info', context?: ObservabilityContext): void {\n if (!this.enabled) return;\n\n try {\n const sentryLevel = mapLogLevelToSentrySeverity(level);\n\n if (this.mode === 'child' && this.parentSentry && this.backstageScope) {\n // Use parent Sentry with backstageApp scope\n if (typeof this.parentSentry.withScope === 'function') {\n this.parentSentry.withScope((scope: SentryScope) => {\n try {\n // Copy backstageApp scope properties\n if (this.backstageScope && typeof scope.setTag === 'function') {\n scope.setTag('backstageApp', this.backstageApp ?? 'unknown');\n scope.setTag('microFrontend', true);\n if (typeof scope.setContext === 'function') {\n scope.setContext('microFrontend', {\n backstageApp: this.backstageApp,\n mode: this.mode,\n });\n }\n }\n\n // Add additional context\n if (context && typeof scope.setContext === 'function') {\n scope.setContext('additional', context);\n }\n\n if (this.parentSentry && typeof this.parentSentry.captureMessage === 'function') {\n this.parentSentry.captureMessage(message, sentryLevel);\n }\n } catch (scopeError) {\n logError('[SentryMicroFrontendPlugin] Error in scope callback', {\n error: scopeError,\n });\n }\n });\n } else {\n logWarn('[SentryMicroFrontendPlugin] Parent Sentry does not support withScope');\n }\n } else {\n // Use standard capture\n super.captureMessage(message, level, context);\n }\n } catch (captureError) {\n logError('[SentryMicroFrontendPlugin] Failed to capture message', { error: captureError });\n }\n }\n\n /**\n * Get the current operation mode\n */\n getMode(): MicroFrontendMode {\n return this.mode;\n }\n\n /**\n * Get the current Backstage app identifier\n */\n getBackstageApp(): string | undefined {\n return this.backstageApp;\n }\n\n /**\n * @deprecated Use getBackstageApp instead.\n */\n getZone(): string | undefined {\n return this.getBackstageApp();\n }\n\n /**\n * Get debug information about the plugin state\n */\n\n getDebugInfo(): Record<string, any> {\n return {\n mode: this.mode,\n backstageApp: this.backstageApp,\n enabled: this.enabled,\n initialized: this.initialized,\n hasParentSentry: this.mode === 'child' && Boolean(this.parentSentry),\n clientType: this.client ? this.client.constructor.name : 'none',\n };\n }\n\n /**\n * Clean up the plugin and release resources\n */\n async cleanup(): Promise<void> {\n try {\n // Clean up event processor if it exists\n if (this.eventProcessorCleanup) {\n this.eventProcessorCleanup();\n this.eventProcessorCleanup = undefined;\n }\n\n // Clear backstageApp scope\n\n if (this.backstageScope && typeof (this.backstageScope as any).clear === 'function') {\n (this.backstageScope as any).clear();\n }\n this.backstageScope = undefined;\n\n // Clear parent Sentry reference\n this.parentSentry = undefined;\n\n // Call parent cleanup\n await super.cleanup();\n\n // Mark as not initialized\n this.initialized = false;\n this.enabled = false;\n\n logDebug('[SentryMicroFrontendPlugin] Cleanup completed');\n } catch (error) {\n logError('[SentryMicroFrontendPlugin] Error during cleanup', { error });\n }\n }\n\n /**\n * Destroy the plugin (alias for cleanup)\n */\n async destroy(): Promise<void> {\n await this.cleanup();\n }\n}\n\n/**\n * Factory function to create a Sentry Micro Frontend plugin.\n *\n * Creates a configured SentryMicroFrontendPlugin instance with micro frontend-specific\n * features like multiplexed transport and backstage app routing.\n *\n * @param config - Optional Sentry micro frontend plugin configuration\n * @returns SentryMicroFrontendPlugin instance\n *\n * @example\n * ```typescript\n * const sentry = createSentryMicroFrontendPlugin({\n * dsn: 'https://...',\n * backstage: [\n * { name: 'admin', dsn: 'https://admin-dsn...' },\n * { name: 'dashboard', dsn: 'https://dashboard-dsn...' },\n * ],\n * });\n * ```\n */\nexport const createSentryMicroFrontendPlugin = (\n config?: SentryMicroFrontendConfig,\n): SentryMicroFrontendPlugin => {\n return new SentryMicroFrontendPlugin(config);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqBA,SAAgB,2BACd,WACA,aAEA,cACK;CAEL,MAAM,SACJ,iBAAiB,SACb,eACA,OAAO,eAAe,cACnB,WAAmB,SACpB;AAER,KAAI,CAAC,QAAQ,4BAA4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C,KAAK,eAAuB,OAAO;AAEtC,QAAK,iBAAiB;AAGtB,QAAK,eAAe;AAGpB,SAAM,MAAM,SAAS;AAGrB,QAAK,cAAc;AACnB,QAAK,UAAU;AAEf,YAAS,gDAAgD;WAClD,OAAO;AACd,YAAS,oDAAoD,EAAE,OAAO,CAAC;;;;;;CAO3E,MAAM,UAAyB;AAC7B,QAAM,KAAK,SAAS;;;;;;;;;;;;;;;;;;;;;;;AAwBxB,MAAa,mCACX,WAC8B;AAC9B,QAAO,IAAI,0BAA0B,OAAO"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Breadcrumb, f as ObservabilityUser, l as ObservabilityContext, n as ObservabilityServerPlugin, o as LogLevel } from "./plugin-
|
|
1
|
+
import { a as Breadcrumb, f as ObservabilityUser, l as ObservabilityContext, n as ObservabilityServerPlugin, o as LogLevel } from "./plugin-BqLvYLQZ.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/sentry/types.d.ts
|
|
4
4
|
interface TransactionContext {
|
|
@@ -194,14 +194,14 @@ declare class SentryPlugin<T extends SentryClient = SentryClient> implements Obs
|
|
|
194
194
|
SENTRY_AUTH_TOKEN?: string | undefined;
|
|
195
195
|
SENTRY_ORG?: string | undefined;
|
|
196
196
|
SENTRY_PROJECT?: string | undefined;
|
|
197
|
-
SENTRY_ENVIRONMENT?: "development" | "
|
|
197
|
+
SENTRY_ENVIRONMENT?: "development" | "production" | "preview" | undefined;
|
|
198
198
|
SENTRY_RELEASE?: string | undefined;
|
|
199
199
|
SENTRY_TRACES_SAMPLE_RATE?: number | undefined;
|
|
200
200
|
SENTRY_PROFILES_SAMPLE_RATE?: number | undefined;
|
|
201
201
|
SENTRY_REPLAYS_SESSION_SAMPLE_RATE?: number | undefined;
|
|
202
202
|
SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE?: number | undefined;
|
|
203
203
|
NEXT_PUBLIC_SENTRY_DSN?: string | undefined;
|
|
204
|
-
NEXT_PUBLIC_SENTRY_ENVIRONMENT?: "development" | "
|
|
204
|
+
NEXT_PUBLIC_SENTRY_ENVIRONMENT?: "development" | "production" | "preview" | undefined;
|
|
205
205
|
NEXT_PUBLIC_SENTRY_RELEASE?: string | undefined;
|
|
206
206
|
SENTRY_DEBUG: boolean;
|
|
207
207
|
}>;
|
|
@@ -251,4 +251,4 @@ declare class SentryPlugin<T extends SentryClient = SentryClient> implements Obs
|
|
|
251
251
|
declare const createSentryPlugin: <T extends SentryClient = SentryClient>(config?: SentryPluginConfig) => SentryPlugin<T>;
|
|
252
252
|
//#endregion
|
|
253
253
|
export { Hub as a, SpanContext as c, TransactionContext as d, defaultBeforeSendLog as i, SpanStatus as l, SentryPluginConfig as n, Scope as o, createSentryPlugin as r, Span as s, SentryPlugin as t, Transaction as u };
|
|
254
|
-
//# sourceMappingURL=plugin-
|
|
254
|
+
//# sourceMappingURL=plugin-C11_suJr.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-
|
|
1
|
+
{"version":3,"file":"plugin-C11_suJr.d.mts","names":[],"sources":["../src/plugins/sentry/types.ts","../src/plugins/sentry/plugin.ts"],"mappings":";;;UAQiB,kBAAA;EACf,IAAA;EACA,EAAA;EACA,IAAA,GAAO,MAAA;EACP,IAAA,GAAO,MAAA;EACP,cAAA;EACA,YAAA;EACA,aAAA;EACA,OAAA;EACA,QAAA;IACE,MAAA;IAAA,CACC,GAAA;EAAA;AAAA;AAAA,UAOY,WAAA;EACf,IAAA;EACA,EAAA;EACA,WAAA;EACA,IAAA,GAAO,MAAA;EACP,IAAA,GAAO,MAAA;EACP,cAAA;EACA,MAAA,GAAS,UAAA;EACT,MAAA;EACA,UAAA,GAAa,MAAA;AAAA;AAAA,KAMH,UAAA;AAAA,UAqBK,WAAA;EACf,IAAA;EACA,MAAA;EACA,OAAA;EACA,cAAA;EACA,IAAA,EAAM,MAAA;EACN,IAAA,EAAM,MAAA;EAGN,OAAA,CAAQ,IAAA;EACR,MAAA,C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A,EAC1D,MAAA,GAAS,kBAAA,KACR,YAAA,CAAa,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Breadcrumb, f as ObservabilityUser, l as ObservabilityContext, n as ObservabilityServerPlugin, o as LogLevel } from "./plugin-
|
|
1
|
+
import { a as Breadcrumb, f as ObservabilityUser, l as ObservabilityContext, n as ObservabilityServerPlugin, o as LogLevel } from "./plugin-BqLvYLQZ.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/betterstack/plugin.d.ts
|
|
4
4
|
interface LogtailClient {
|
|
@@ -58,4 +58,4 @@ declare class BetterStackPlugin<T extends LogtailClient = LogtailClient> impleme
|
|
|
58
58
|
declare const createBetterStackPlugin: <T extends LogtailClient = LogtailClient>(config?: BetterStackPluginConfig) => BetterStackPlugin<T>;
|
|
59
59
|
//#endregion
|
|
60
60
|
export { BetterStackPluginConfig as n, createBetterStackPlugin as r, BetterStackPlugin as t };
|
|
61
|
-
//# sourceMappingURL=plugin-
|
|
61
|
+
//# sourceMappingURL=plugin-Cn23gGuY.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-
|
|
1
|
+
{"version":3,"file":"plugin-Cn23gGuY.d.mts","names":[],"sources":["../src/plugins/betterstack/plugin.ts"],"mappings":";;;UAiCU,aAAA;EACR,IAAA,CAAK,OAAA,UAAiB,IAAA;EACtB,IAAA,CAAK,OAAA,UAAiB,IAAA;EACtB,KAAA,CAAM,OAAA,UAAiB,IAAA;EACvB,KAAA,CAAM,OAAA,UAAiB,IAAA;EACvB,KAAA,IAAS,OAAA;AAAA;AAAA,UAMM,uBAAA;EAKf,cAAA;EAGA,WAAA;EACA,QAAA;EACA,QAAA;EACA,OAAA;EAGA,aAAA;EACA,SAAA;EACA,UAAA;EACA,YAAA;EACA,UAAA;AAAA;AAAA,cAaW,iBAAA,WACD,aAAA,GAAgB,aAAA,aACf,yBAAA,CAA0B,CAAA;EACrC,IAAA;EACA,OAAA;EAAA,UACU,MAAA,EAAQ,CAAA;EAAA,UACR,WAAA;EAAA,UACA,cAAA;EAAA,UACA,WAAA,EAAa,iBAAA;EAAA,UACb,WAAA,EAAa,UAAA;EAAA,UACb,eAAA;EAAA,UACA,MAAA,EAAQ,uBAAA;cAON,MAAA,GAAQ,uBAAA;EAAA,QAuBZ,oBAAA;EASR,SAAA,CAAA,GAAa,CAAA;EAAA,UASH,UAAA,CAAA,GAAU,QAAA;;;;;;;;;;;;EAId,UAAA,CAAW,MAAA,GAAS,uBAAA,GAA0B,OAAA;EAmE9C,QAAA,CAAA,GAAY,OAAA;EAOlB,gBAAA,CAAiB,KAAA,EAAO,KAAA,YAAiB,OAAA,GAAU,oBAAA;EAqBnD,cAAA,CAAe,OAAA,UAAiB,KAAA,GAAO,QAAA,EAAmB,OAAA,GAAU,oBAAA;EA8BpE,OAAA,CAAQ,IAAA,EAAM,iBAAA;EAKd,aAAA,CAAc,UAAA,EAAY,UAAA;EAAA,QAuBlB,oBAAA;EA8BR,SAAA,CAAU,QAAA,GAAW,KAAA;EAmBf,KAAA,CAAM,QAAA,YAAoB,OAAA;AAAA;AAAA,cA8BrB,uBAAA,aAAqC,aAAA,GAAgB,aAAA,EAChE,MAAA,GAAS,uBAAA,KACR,iBAAA,CAAkB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-betterstack-env.mjs","names":[],"sources":["../src/plugins/betterstack/env.ts"],"sourcesContent":["/**\n * @fileoverview Better Stack (Logtail) environment configuration\n * Better Stack (Logtail) environment configuration\n * Updated to support official @logtail packages\n */\n\nimport { logWarn } from '@
|
|
1
|
+
{"version":3,"file":"plugins-betterstack-env.mjs","names":[],"sources":["../src/plugins/betterstack/env.ts"],"sourcesContent":["/**\n * @fileoverview Better Stack (Logtail) environment configuration\n * Better Stack (Logtail) environment configuration\n * Updated to support official @logtail packages\n */\n\nimport { logWarn } from '@od-oneapp/shared/logger';\nimport { createEnv } from '@t3-oss/env-core';\nimport { z } from 'zod/v4';\n\n// Create validated env object\nexport const env = createEnv({\n server: {\n // Legacy support\n LOGTAIL_SOURCE_TOKEN: z.string().optional(),\n BETTERSTACK_SOURCE_TOKEN: z.string().optional(),\n\n // Official Better Stack environment variables\n BETTER_STACK_SOURCE_TOKEN: z.string().optional(),\n BETTER_STACK_INGESTING_URL: z.string().url().optional(),\n BETTER_STACK_LOG_LEVEL: z.enum(['debug', 'info', 'warn', 'error', 'off']).optional(),\n },\n client: {\n // Legacy support\n NEXT_PUBLIC_LOGTAIL_TOKEN: z.string().optional(),\n NEXT_PUBLIC_BETTERSTACK_TOKEN: z.string().optional(),\n\n // Official Better Stack client environment variables\n NEXT_PUBLIC_BETTER_STACK_SOURCE_TOKEN: z.string().optional(),\n NEXT_PUBLIC_BETTER_STACK_INGESTING_URL: z.string().url().optional(),\n NEXT_PUBLIC_BETTER_STACK_LOG_LEVEL: z\n .enum(['debug', 'info', 'warn', 'error', 'off'])\n .optional(),\n },\n clientPrefix: 'NEXT_PUBLIC_',\n runtimeEnv: process.env,\n emptyStringAsUndefined: true,\n onInvalidAccess: (variable: string) => {\n throw new Error(\n `❌ Attempted to access a server-side environment variable on the client: ${variable}`,\n );\n },\n onValidationError: error => {\n logWarn('Better Stack environment validation failed', { error });\n // Don't throw in packages - use fallbacks\n return undefined as never;\n },\n});\n\n/**\n * Safe environment access for non-Next.js contexts.\n *\n * Provides fallback environment variable access for Node.js, workers, and test environments\n * where the validated env object may not be available. Returns fallback values with proper\n * priority handling for legacy and official Better Stack variable names.\n *\n * @returns Environment object with Better Stack configuration values\n */\nexport function safeEnv() {\n if (env) return env;\n\n // Fallback values for resilience with proper priority\n return {\n // Legacy support\n LOGTAIL_SOURCE_TOKEN:\n process.env.LOGTAIL_SOURCE_TOKEN ?? process.env.BETTERSTACK_SOURCE_TOKEN ?? '',\n BETTERSTACK_SOURCE_TOKEN:\n process.env.BETTERSTACK_SOURCE_TOKEN ?? process.env.LOGTAIL_SOURCE_TOKEN ?? '',\n NEXT_PUBLIC_LOGTAIL_TOKEN:\n process.env.NEXT_PUBLIC_LOGTAIL_TOKEN ?? process.env.NEXT_PUBLIC_BETTERSTACK_TOKEN ?? '',\n NEXT_PUBLIC_BETTERSTACK_TOKEN:\n process.env.NEXT_PUBLIC_BETTERSTACK_TOKEN ?? process.env.NEXT_PUBLIC_LOGTAIL_TOKEN ?? '',\n\n // Official Better Stack (preferred)\n BETTER_STACK_SOURCE_TOKEN:\n process.env.BETTER_STACK_SOURCE_TOKEN ??\n process.env.LOGTAIL_SOURCE_TOKEN ??\n process.env.BETTERSTACK_SOURCE_TOKEN ??\n '',\n BETTER_STACK_INGESTING_URL: process.env.BETTER_STACK_INGESTING_URL ?? '',\n BETTER_STACK_LOG_LEVEL:\n (process.env.BETTER_STACK_LOG_LEVEL as 'debug' | 'info' | 'warn' | 'error' | 'off') ?? 'info',\n NEXT_PUBLIC_BETTER_STACK_SOURCE_TOKEN:\n process.env.NEXT_PUBLIC_BETTER_STACK_SOURCE_TOKEN ??\n process.env.NEXT_PUBLIC_LOGTAIL_TOKEN ??\n process.env.NEXT_PUBLIC_BETTERSTACK_TOKEN ??\n '',\n NEXT_PUBLIC_BETTER_STACK_INGESTING_URL:\n process.env.NEXT_PUBLIC_BETTER_STACK_INGESTING_URL ?? '',\n NEXT_PUBLIC_BETTER_STACK_LOG_LEVEL:\n (process.env.NEXT_PUBLIC_BETTER_STACK_LOG_LEVEL as\n | 'debug'\n | 'info'\n | 'warn'\n | 'error'\n | 'off') ?? 'info',\n };\n}\n\n// Export type\nexport type Env = typeof env;\n"],"mappings":";;;;;;;;;;AAWA,MAAa,MAAM,UAAU;CAC3B,QAAQ;EAEN,sBAAsB,EAAE,QAAQ,CAAC,UAAU;EAC3C,0BAA0B,EAAE,QAAQ,CAAC,UAAU;EAG/C,2BAA2B,EAAE,QAAQ,CAAC,UAAU;EAChD,4BAA4B,EAAE,QAAQ,CAAC,KAAK,CAAC,UAAU;EACvD,wBAAwB,EAAE,K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, t as BetterStackPlugin } from "./plugin-
|
|
1
|
+
import { n as ObservabilityServerPlugin, t as ObservabilityPlugin } from "./plugin-BqLvYLQZ.mjs";
|
|
2
|
+
import { n as BetterStackPluginConfig, r as createBetterStackPlugin, t as BetterStackPlugin } from "./plugin-Cn23gGuY.mjs";
|
|
3
3
|
import { Env, env, safeEnv } from "./plugins-betterstack-env.mjs";
|
|
4
4
|
export { BetterStackPlugin, type BetterStackPluginConfig, type Env, type ObservabilityPlugin, type ObservabilityServerPlugin, createBetterStackPlugin, env, safeEnv };
|
package/plugins-betterstack.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { env, safeEnv } from "./plugins-betterstack-env.mjs";
|
|
2
|
-
import { n as createBetterStackPlugin, t as BetterStackPlugin } from "./plugin-
|
|
2
|
+
import { n as createBetterStackPlugin, t as BetterStackPlugin } from "./plugin-AzRcMmXa.mjs";
|
|
3
3
|
|
|
4
4
|
export { BetterStackPlugin, createBetterStackPlugin, env, safeEnv };
|
package/plugins-console.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Breadcrumb, f as ObservabilityUser, l as ObservabilityContext, n as ObservabilityServerPlugin, o as LogLevel, r as PluginFactory, t as ObservabilityPlugin } from "./plugin-
|
|
1
|
+
import { a as Breadcrumb, f as ObservabilityUser, l as ObservabilityContext, n as ObservabilityServerPlugin, o as LogLevel, r as PluginFactory, t as ObservabilityPlugin } from "./plugin-BqLvYLQZ.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/console/index.d.ts
|
|
4
4
|
interface ConsolePluginConfig {
|
package/plugins-sentry-env.d.mts
CHANGED
|
@@ -4,14 +4,14 @@ declare const env: Readonly<{
|
|
|
4
4
|
SENTRY_AUTH_TOKEN?: string | undefined;
|
|
5
5
|
SENTRY_ORG?: string | undefined;
|
|
6
6
|
SENTRY_PROJECT?: string | undefined;
|
|
7
|
-
SENTRY_ENVIRONMENT?: "development" | "
|
|
7
|
+
SENTRY_ENVIRONMENT?: "development" | "production" | "preview" | undefined;
|
|
8
8
|
SENTRY_RELEASE?: string | undefined;
|
|
9
9
|
SENTRY_TRACES_SAMPLE_RATE?: number | undefined;
|
|
10
10
|
SENTRY_PROFILES_SAMPLE_RATE?: number | undefined;
|
|
11
11
|
SENTRY_REPLAYS_SESSION_SAMPLE_RATE?: number | undefined;
|
|
12
12
|
SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE?: number | undefined;
|
|
13
13
|
NEXT_PUBLIC_SENTRY_DSN?: string | undefined;
|
|
14
|
-
NEXT_PUBLIC_SENTRY_ENVIRONMENT?: "development" | "
|
|
14
|
+
NEXT_PUBLIC_SENTRY_ENVIRONMENT?: "development" | "production" | "preview" | undefined;
|
|
15
15
|
NEXT_PUBLIC_SENTRY_RELEASE?: string | undefined;
|
|
16
16
|
SENTRY_DEBUG: boolean;
|
|
17
17
|
}>;
|
|
@@ -20,14 +20,14 @@ declare function safeEnv(): Readonly<{
|
|
|
20
20
|
SENTRY_AUTH_TOKEN?: string | undefined;
|
|
21
21
|
SENTRY_ORG?: string | undefined;
|
|
22
22
|
SENTRY_PROJECT?: string | undefined;
|
|
23
|
-
SENTRY_ENVIRONMENT?: "development" | "
|
|
23
|
+
SENTRY_ENVIRONMENT?: "development" | "production" | "preview" | undefined;
|
|
24
24
|
SENTRY_RELEASE?: string | undefined;
|
|
25
25
|
SENTRY_TRACES_SAMPLE_RATE?: number | undefined;
|
|
26
26
|
SENTRY_PROFILES_SAMPLE_RATE?: number | undefined;
|
|
27
27
|
SENTRY_REPLAYS_SESSION_SAMPLE_RATE?: number | undefined;
|
|
28
28
|
SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE?: number | undefined;
|
|
29
29
|
NEXT_PUBLIC_SENTRY_DSN?: string | undefined;
|
|
30
|
-
NEXT_PUBLIC_SENTRY_ENVIRONMENT?: "development" | "
|
|
30
|
+
NEXT_PUBLIC_SENTRY_ENVIRONMENT?: "development" | "production" | "preview" | undefined;
|
|
31
31
|
NEXT_PUBLIC_SENTRY_RELEASE?: string | undefined;
|
|
32
32
|
SENTRY_DEBUG: boolean;
|
|
33
33
|
}>;
|
package/plugins-sentry-env.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-sentry-env.mjs","names":[],"sources":["../src/plugins/sentry/env.ts"],"sourcesContent":["/**\n * @fileoverview Sentry-specific environment configuration\n * Sentry-specific environment configuration\n * Apps can extend this configuration to inherit Sentry environment variables\n */\n\nimport { logWarn } from '@
|
|
1
|
+
{"version":3,"file":"plugins-sentry-env.mjs","names":[],"sources":["../src/plugins/sentry/env.ts"],"sourcesContent":["/**\n * @fileoverview Sentry-specific environment configuration\n * Sentry-specific environment configuration\n * Apps can extend this configuration to inherit Sentry environment variables\n */\n\nimport { logWarn } from '@od-oneapp/shared/logger';\nimport { createEnv } from '@t3-oss/env-core';\nimport { z } from 'zod/v4';\n\n// Create validated env object\nexport const env = createEnv({\n server: {\n SENTRY_DSN: z.string().url().optional(),\n SENTRY_AUTH_TOKEN: z.string().optional(),\n SENTRY_ORG: z.string().optional(),\n SENTRY_PROJECT: z.string().optional(),\n SENTRY_ENVIRONMENT: z.enum(['development', 'preview', 'production']).optional(),\n SENTRY_RELEASE: z.string().optional(),\n SENTRY_TRACES_SAMPLE_RATE: z.coerce.number().min(0).max(1).optional(),\n SENTRY_PROFILES_SAMPLE_RATE: z.coerce.number().min(0).max(1).optional(),\n SENTRY_REPLAYS_SESSION_SAMPLE_RATE: z.coerce.number().min(0).max(1).optional(),\n SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE: z.coerce.number().min(0).max(1).optional(),\n SENTRY_DEBUG: z\n .string()\n .optional()\n .transform(val => val === 'true')\n .default(false),\n },\n clientPrefix: 'NEXT_PUBLIC_',\n client: {\n NEXT_PUBLIC_SENTRY_DSN: z.string().url().optional(),\n NEXT_PUBLIC_SENTRY_ENVIRONMENT: z.enum(['development', 'preview', 'production']).optional(),\n NEXT_PUBLIC_SENTRY_RELEASE: z.string().optional(),\n },\n runtimeEnv: process.env,\n emptyStringAsUndefined: true,\n onInvalidAccess: (variable: string) => {\n throw new Error(\n `❌ Attempted to access a server-side environment variable on the client: ${variable}`,\n );\n },\n onValidationError: error => {\n // Note: Using logWarn during env validation - shared logger is always available\n logWarn('Sentry environment validation failed', { error });\n // Don't throw in packages - use fallbacks\n return undefined as never;\n },\n});\n\n/**\n * Safe environment access for non-Next.js contexts.\n *\n * Provides fallback environment variable access for Node.js, workers, and test environments\n * where the validated env object may not be available. Returns fallback values with proper\n * type coercion and defaults.\n *\n * @returns Environment object with Sentry configuration values\n */\nexport function safeEnv() {\n if (env) return env;\n\n // Fallback values for resilience\n return {\n // Server\n SENTRY_DSN: process.env.SENTRY_DSN ?? '',\n SENTRY_AUTH_TOKEN: process.env.SENTRY_AUTH_TOKEN ?? '',\n SENTRY_ORG: process.env.SENTRY_ORG ?? '',\n SENTRY_PROJECT: process.env.SENTRY_PROJECT ?? '',\n SENTRY_ENVIRONMENT:\n (process.env.SENTRY_ENVIRONMENT as 'development' | 'preview' | 'production') ?? 'development',\n SENTRY_RELEASE: process.env.SENTRY_RELEASE ?? '',\n SENTRY_TRACES_SAMPLE_RATE:\n Number(process.env.SENTRY_TRACES_SAMPLE_RATE) ||\n (process.env.NODE_ENV === 'production' ? 0.1 : 1.0),\n SENTRY_PROFILES_SAMPLE_RATE: Number(process.env.SENTRY_PROFILES_SAMPLE_RATE) ?? 0,\n SENTRY_REPLAYS_SESSION_SAMPLE_RATE:\n Number(process.env.SENTRY_REPLAYS_SESSION_SAMPLE_RATE) ||\n (process.env.NODE_ENV === 'production' ? 0.1 : 0),\n SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE:\n Number(process.env.SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE) || 1.0,\n SENTRY_DEBUG: process.env.SENTRY_DEBUG === 'true',\n // Client\n NEXT_PUBLIC_SENTRY_DSN: process.env.NEXT_PUBLIC_SENTRY_DSN ?? '',\n NEXT_PUBLIC_SENTRY_ENVIRONMENT:\n (process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT as 'development' | 'preview' | 'production') ??\n 'development',\n NEXT_PUBLIC_SENTRY_RELEASE: process.env.NEXT_PUBLIC_SENTRY_RELEASE ?? '',\n };\n}\n\n// Export type\nexport type Env = typeof env;\n"],"mappings":";;;;;;;;;;AAWA,MAAa,MAAM,UAAU;CAC3B,QAAQ;EACN,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,UAAU;EACvC,mBAAmB,EAAE,QAAQ,CAAC,UAAU;EACxC,YAAY,EAAE,QAAQ,CAAC,UAAU;EACjC,gBAAgB,EAAE,QAAQ,CAAC,UAAU;EACrC,oBAAoB,EAAE,KAAK;GAAC;GAAe;GAAW;GAAa,CAAC,CAAC,UAAU;EAC/E,gBAAgB,EAAE,QAAQ,CAAC,UAAU;EACrC,2BAA2B,EAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,UAAU;EACrE,6BAA6B,EAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,UAAU;EACvE,oCAAoC,EAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,UAAU;EAC9E,qCAAqC,EAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,UAAU;EAC/E,cAAc,EACX,QAAQ,CACR,UAAU,CACV,WAAU,QAAO,QAAQ,OAAO,CAChC,QAAQ,MAAM;EAClB;CACD,cAAc;CACd,QAAQ;EACN,wBAAwB,EAAE,QAAQ,CAAC,KAAK,CAAC,UAAU;EACnD,gCAAgC,EAAE,KAAK;GAAC;GAAe;GAAW;GAAa,CAAC,CAAC,UAAU;EAC3F,4BAA4B,EAAE,QAAQ,CAAC,UAAU;EAClD;CACD,YAAY,QAAQ;CACpB,wBAAwB;CACxB,kBAAkB,aAAqB;AACrC,QAAM,IAAI,MACR,2EAA2E,WAC5E;;CAEH,oBAAmB,UAAS;AAE1B,UAAQ,wCAAwC,EAAE,OAAO,CAAC;;CAI7D,CAAC;;;;;;;;;;AAWF,SAAgB,UAAU;AACxB,KAAI,IAAK,QAAO;AAGhB,QAAO;EAEL,YAAY,QAAQ,IAAI,cAAc;EACtC,mBAAmB,QAAQ,IAAI,qBAAqB;EACpD,YAAY,QAAQ,IAAI,cAAc;EACtC,gBAAgB,QAAQ,IAAI,kBAAkB;EAC9C,oBACG,QAAQ,IAAI,sBAAmE;EAClF,gBAAgB,QAAQ,IAAI,kBAAkB;EAC9C,2BACE,OAAO,QAAQ,IAAI,0BAA0B,IACE;EACjD,6BAA6B,OAAO,QAAQ,IAAI,4BAA4B,IAAI;EAChF,oCACE,OAAO,QAAQ,IAAI,mCAAmC,IACP;EACjD,qCACE,OAAO,QAAQ,IAAI,oCAAoC,IAAI;EAC7D,cAAc,QAAQ,IAAI,iBAAiB;EAE3C,wBAAwB,QAAQ,IAAI,0BAA0B;EAC9D,gCACG,QAAQ,IAAI,kCACb;EACF,4BAA4B,QAAQ,IAAI,8BAA8B;EACvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-sentry-microfrontend-env.mjs","names":[],"sources":["../src/plugins/sentry-microfrontend/env.ts"],"sourcesContent":["/**\n * @fileoverview Environment configuration for Sentry Micro Frontend Plugin\n * Environment configuration for Sentry Micro Frontend Plugin\n */\n\nimport { logWarn } from '@
|
|
1
|
+
{"version":3,"file":"plugins-sentry-microfrontend-env.mjs","names":[],"sources":["../src/plugins/sentry-microfrontend/env.ts"],"sourcesContent":["/**\n * @fileoverview Environment configuration for Sentry Micro Frontend Plugin\n * Environment configuration for Sentry Micro Frontend Plugin\n */\n\nimport { logWarn } from '@od-oneapp/shared/logger';\nimport { createEnv } from '@t3-oss/env-core';\nimport { z } from 'zod/v4';\n\n/**\n * Environment configuration specific to Sentry micro frontend functionality\n */\nexport const env = createEnv({\n server: {\n // Backstage app-specific DSNs for server-side\n SENTRY_DSN_CMS: z.string().url().optional(),\n SENTRY_DSN_WORKFLOWS: z.string().url().optional(),\n SENTRY_DSN_AUTHMGMT: z.string().url().optional(),\n\n // Micro frontend configuration\n SENTRY_MICROFRONTEND_MODE: z.enum(['host', 'child', 'standalone']).optional(),\n SENTRY_MICROFRONTEND_ZONE: z.string().optional(),\n\n // Feature toggles\n SENTRY_MICROFRONTEND_ENABLED: z.boolean().optional(),\n SENTRY_MICROFRONTEND_MULTIPLEXED_TRANSPORT: z.boolean().optional(),\n },\n client: {\n // Backstage app-specific DSNs for client-side\n NEXT_PUBLIC_SENTRY_DSN_CMS: z.string().url().optional(),\n NEXT_PUBLIC_SENTRY_DSN_WORKFLOWS: z.string().url().optional(),\n NEXT_PUBLIC_SENTRY_DSN_AUTHMGMT: z.string().url().optional(),\n\n // Client-side micro frontend configuration\n NEXT_PUBLIC_SENTRY_MICROFRONTEND_MODE: z.enum(['host', 'child', 'standalone']).optional(),\n NEXT_PUBLIC_SENTRY_MICROFRONTEND_ZONE: z.string().optional(),\n\n // Feature toggles\n NEXT_PUBLIC_SENTRY_MICROFRONTEND_ENABLED: z.boolean().optional(),\n },\n clientPrefix: 'NEXT_PUBLIC_',\n runtimeEnv: process.env,\n skipValidation: process.env.SKIP_ENV_VALIDATION === 'true' || process.env.NODE_ENV === 'test',\n emptyStringAsUndefined: true,\n onInvalidAccess: (variable: string) => {\n throw new Error(\n `❌ Attempted to access a server-side environment variable on the client: ${variable}`,\n );\n },\n onValidationError: error => {\n // Non-critical plugin, warn but don't throw\n logWarn('Sentry Micro Frontend Plugin env validation failed', { error });\n return undefined as never;\n },\n});\n\n/**\n * Safe environment access for non-Next.js contexts.\n *\n * Provides fallback environment variable access for Node.js, workers, and test environments\n * where the validated env object may not be available. Returns fallback values for Sentry\n * micro frontend configuration.\n *\n * @returns Environment object with Sentry micro frontend configuration values\n */\nexport function safeEnv() {\n if (env) {\n return env;\n }\n\n // Fallback for non-Next.js contexts\n return {\n // Server\n SENTRY_DSN_CMS: process.env.SENTRY_DSN_CMS,\n SENTRY_DSN_WORKFLOWS: process.env.SENTRY_DSN_WORKFLOWS,\n SENTRY_DSN_AUTHMGMT: process.env.SENTRY_DSN_AUTHMGMT,\n SENTRY_MICROFRONTEND_MODE: process.env.SENTRY_MICROFRONTEND_MODE as\n | 'host'\n | 'child'\n | 'standalone'\n | undefined,\n SENTRY_MICROFRONTEND_APP:\n process.env.SENTRY_MICROFRONTEND_APP ?? process.env.SENTRY_MICROFRONTEND_ZONE,\n SENTRY_MICROFRONTEND_ENABLED: process.env.SENTRY_MICROFRONTEND_ENABLED === 'true',\n SENTRY_MICROFRONTEND_MULTIPLEXED_TRANSPORT:\n process.env.SENTRY_MICROFRONTEND_MULTIPLEXED_TRANSPORT === 'true',\n\n // Client\n NEXT_PUBLIC_SENTRY_DSN_CMS: process.env.NEXT_PUBLIC_SENTRY_DSN_CMS,\n NEXT_PUBLIC_SENTRY_DSN_WORKFLOWS: process.env.NEXT_PUBLIC_SENTRY_DSN_WORKFLOWS,\n NEXT_PUBLIC_SENTRY_DSN_AUTHMGMT: process.env.NEXT_PUBLIC_SENTRY_DSN_AUTHMGMT,\n NEXT_PUBLIC_SENTRY_MICROFRONTEND_MODE: process.env.NEXT_PUBLIC_SENTRY_MICROFRONTEND_MODE as\n | 'host'\n | 'child'\n | 'standalone'\n | undefined,\n NEXT_PUBLIC_SENTRY_MICROFRONTEND_APP:\n process.env.NEXT_PUBLIC_SENTRY_MICROFRONTEND_APP ??\n process.env.NEXT_PUBLIC_SENTRY_MICROFRONTEND_ZONE,\n NEXT_PUBLIC_SENTRY_MICROFRONTEND_ENABLED:\n process.env.NEXT_PUBLIC_SENTRY_MICROFRONTEND_ENABLED === 'true',\n };\n}\n\nexport type Env = typeof env;\n"],"mappings":";;;;;;;;;;;;AAYA,MAAa,MAAM,UAAU;CAC3B,QAAQ;EAEN,gBAAgB,EAAE,QAAQ,CAAC,KAAK,CAAC,U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AI;EAC7C,uCAAuC,QAAQ,IAAI;EAKnD,sCACE,QAAQ,IAAI,wCACZ,QAAQ,IAAI;EACd,0CACE,QAAQ,IAAI,6CAA6C;EAC5D"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createSentryMicroFrontendPlugin, c as MicroFrontendMode, i as SentryMicroFrontendPlugin, l as SentryMicroFrontendConfig, n as detectCurrentBackstageApp, o as createMultiplexedTransport, r as isHostEnvironment, s as BackstageAppConfig, t as createBackstageScope } from "./utils-
|
|
1
|
+
import { a as createSentryMicroFrontendPlugin, c as MicroFrontendMode, i as SentryMicroFrontendPlugin, l as SentryMicroFrontendConfig, n as detectCurrentBackstageApp, o as createMultiplexedTransport, r as isHostEnvironment, s as BackstageAppConfig, t as createBackstageScope } from "./utils-BGdqvezr.mjs";
|
|
2
2
|
export { type BackstageAppConfig, type MicroFrontendMode, type SentryMicroFrontendConfig, SentryMicroFrontendPlugin, createBackstageScope, createMultiplexedTransport, createSentryMicroFrontendPlugin, detectCurrentBackstageApp, isHostEnvironment };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as isHostEnvironment, i as detectCurrentBackstageApp, n as createSentryMicroFrontendPlugin, o as createMultiplexedTransport, r as createBackstageScope, t as SentryMicroFrontendPlugin } from "./plugin-
|
|
1
|
+
import { a as isHostEnvironment, i as detectCurrentBackstageApp, n as createSentryMicroFrontendPlugin, o as createMultiplexedTransport, r as createBackstageScope, t as SentryMicroFrontendPlugin } from "./plugin-BrzKQ9II.mjs";
|
|
2
2
|
|
|
3
3
|
export { SentryMicroFrontendPlugin, createBackstageScope, createMultiplexedTransport, createSentryMicroFrontendPlugin, detectCurrentBackstageApp, isHostEnvironment };
|
package/plugins-sentry.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ObservabilityServerPlugin, t as ObservabilityPlugin } from "./plugin-
|
|
2
|
-
import { a as Hub, c as SpanContext, d as TransactionContext, i as defaultBeforeSendLog, l as SpanStatus, n as SentryPluginConfig, o as Scope, r as createSentryPlugin, s as Span, t as SentryPlugin, u as Transaction } from "./plugin-
|
|
1
|
+
import { n as ObservabilityServerPlugin, t as ObservabilityPlugin } from "./plugin-BqLvYLQZ.mjs";
|
|
2
|
+
import { a as Hub, c as SpanContext, d as TransactionContext, i as defaultBeforeSendLog, l as SpanStatus, n as SentryPluginConfig, o as Scope, r as createSentryPlugin, s as Span, t as SentryPlugin, u as Transaction } from "./plugin-C11_suJr.mjs";
|
|
3
3
|
import { Env, env, safeEnv } from "./plugins-sentry-env.mjs";
|
|
4
4
|
export * from "@sentry/nextjs";
|
|
5
5
|
export { type Env, type Hub, type ObservabilityPlugin, type ObservabilityServerPlugin, type Scope, SentryPlugin, type SentryPluginConfig, type Span, type SpanContext, type SpanStatus, type Transaction, type TransactionContext, createSentryPlugin, defaultBeforeSendLog, env, safeEnv };
|
package/plugins-sentry.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { env, safeEnv } from "./plugins-sentry-env.mjs";
|
|
2
|
-
import { n as createSentryPlugin, r as defaultBeforeSendLog, t as SentryPlugin } from "./plugin-
|
|
2
|
+
import { n as createSentryPlugin, r as defaultBeforeSendLog, t as SentryPlugin } from "./plugin-BjJ3pgvT.mjs";
|
|
3
3
|
|
|
4
4
|
export * from "@sentry/nextjs"
|
|
5
5
|
|
package/server-edge.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as Breadcrumb, c as ObservabilityConfig, d as ObservabilityServer, f as ObservabilityUser, i as PluginLifecycle, l as ObservabilityContext, n as ObservabilityServerPlugin, o as LogLevel, r as PluginFactory, s as ObservabilityClient, t as ObservabilityPlugin, u as ObservabilityScope } from "./plugin-
|
|
2
|
-
import { t as ObservabilityManager } from "./manager-
|
|
3
|
-
import { n as ObservabilityBuilder, t as createObservability } from "./index-
|
|
4
|
-
import { n as BetterStackPluginConfig, r as createBetterStackPlugin, t as BetterStackPlugin } from "./plugin-
|
|
1
|
+
import { a as Breadcrumb, c as ObservabilityConfig, d as ObservabilityServer, f as ObservabilityUser, i as PluginLifecycle, l as ObservabilityContext, n as ObservabilityServerPlugin, o as LogLevel, r as PluginFactory, s as ObservabilityClient, t as ObservabilityPlugin, u as ObservabilityScope } from "./plugin-BqLvYLQZ.mjs";
|
|
2
|
+
import { t as ObservabilityManager } from "./manager-0G9cdhWY.mjs";
|
|
3
|
+
import { n as ObservabilityBuilder, t as createObservability } from "./index-CyBL4Sra.mjs";
|
|
4
|
+
import { n as BetterStackPluginConfig, r as createBetterStackPlugin, t as BetterStackPlugin } from "./plugin-Cn23gGuY.mjs";
|
|
5
5
|
import { env, safeEnv } from "./plugins-betterstack-env.mjs";
|
|
6
6
|
import { ConsolePlugin, ConsolePluginConfig, ConsoleServerPlugin, createConsolePlugin, createConsoleServerPlugin } from "./plugins-console.mjs";
|
|
7
7
|
|
package/server-edge.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { shouldEnableConsole } from "./index.mjs";
|
|
2
2
|
import { env as env$1 } from "./env.mjs";
|
|
3
|
-
import { n as ObservabilityBuilder, t as createObservability } from "./factory-
|
|
3
|
+
import { n as ObservabilityBuilder, t as createObservability } from "./factory-CuW4AM5b.mjs";
|
|
4
4
|
import { ConsolePlugin, ConsoleServerPlugin, createConsolePlugin, createConsoleServerPlugin } from "./plugins-console.mjs";
|
|
5
5
|
import { env, safeEnv } from "./plugins-betterstack-env.mjs";
|
|
6
|
-
import { n as createBetterStackPlugin, t as BetterStackPlugin } from "./plugin-
|
|
6
|
+
import { n as createBetterStackPlugin, t as BetterStackPlugin } from "./plugin-AzRcMmXa.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/server-edge.ts
|
|
9
9
|
/**
|
package/server-next.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as Breadcrumb, c as ObservabilityConfig, d as ObservabilityServer, f as ObservabilityUser, l as ObservabilityContext, o as LogLevel, s as ObservabilityClient, u as ObservabilityScope } from "./plugin-
|
|
2
|
-
import { t as ObservabilityManager } from "./manager-
|
|
3
|
-
import { n as ObservabilityBuilder, t as createObservability } from "./index-
|
|
4
|
-
import { t as BetterStackPlugin } from "./plugin-
|
|
1
|
+
import { a as Breadcrumb, c as ObservabilityConfig, d as ObservabilityServer, f as ObservabilityUser, l as ObservabilityContext, o as LogLevel, s as ObservabilityClient, u as ObservabilityScope } from "./plugin-BqLvYLQZ.mjs";
|
|
2
|
+
import { t as ObservabilityManager } from "./manager-0G9cdhWY.mjs";
|
|
3
|
+
import { n as ObservabilityBuilder, t as createObservability } from "./index-CyBL4Sra.mjs";
|
|
4
|
+
import { t as BetterStackPlugin } from "./plugin-Cn23gGuY.mjs";
|
|
5
5
|
import { ConsolePlugin } from "./plugins-console.mjs";
|
|
6
|
-
import { t as SentryPlugin } from "./plugin-
|
|
6
|
+
import { t as SentryPlugin } from "./plugin-C11_suJr.mjs";
|
|
7
7
|
import "./plugins-sentry.mjs";
|
|
8
|
-
import { i as SentryMicroFrontendPlugin } from "./utils-
|
|
8
|
+
import { i as SentryMicroFrontendPlugin } from "./utils-BGdqvezr.mjs";
|
|
9
9
|
import "./plugins-sentry-microfrontend.mjs";
|
|
10
10
|
|
|
11
11
|
//#region src/server-next.d.ts
|
package/server-next.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { shouldEnableConsole } from "./index.mjs";
|
|
2
2
|
import { env } from "./env.mjs";
|
|
3
|
-
import { n as ObservabilityBuilder, r as ObservabilityManager, t as createObservability } from "./factory-
|
|
3
|
+
import { n as ObservabilityBuilder, r as ObservabilityManager, t as createObservability } from "./factory-CuW4AM5b.mjs";
|
|
4
4
|
import { ConsolePlugin, createConsoleServerPlugin } from "./plugins-console.mjs";
|
|
5
5
|
import { env as env$1 } from "./plugins-betterstack-env.mjs";
|
|
6
|
-
import { n as createBetterStackPlugin, t as BetterStackPlugin } from "./plugin-
|
|
6
|
+
import { n as createBetterStackPlugin, t as BetterStackPlugin } from "./plugin-AzRcMmXa.mjs";
|
|
7
7
|
import { env as env$2 } from "./plugins-sentry-env.mjs";
|
|
8
|
-
import { n as createSentryPlugin, t as SentryPlugin } from "./plugin-
|
|
9
|
-
import { t as SentryMicroFrontendPlugin } from "./plugin-
|
|
8
|
+
import { n as createSentryPlugin, t as SentryPlugin } from "./plugin-BjJ3pgvT.mjs";
|
|
9
|
+
import { t as SentryMicroFrontendPlugin } from "./plugin-BrzKQ9II.mjs";
|
|
10
10
|
|
|
11
11
|
//#region src/server-next.ts
|
|
12
12
|
/**
|
package/server.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as Breadcrumb, c as ObservabilityConfig, d as ObservabilityServer, f as ObservabilityUser, l as ObservabilityContext, o as LogLevel, s as ObservabilityClient, u as ObservabilityScope } from "./plugin-
|
|
2
|
-
import { t as ObservabilityManager } from "./manager-
|
|
3
|
-
import { n as ObservabilityBuilder, t as createObservability } from "./index-
|
|
1
|
+
import { a as Breadcrumb, c as ObservabilityConfig, d as ObservabilityServer, f as ObservabilityUser, l as ObservabilityContext, o as LogLevel, s as ObservabilityClient, u as ObservabilityScope } from "./plugin-BqLvYLQZ.mjs";
|
|
2
|
+
import { t as ObservabilityManager } from "./manager-0G9cdhWY.mjs";
|
|
3
|
+
import { n as ObservabilityBuilder, t as createObservability } from "./index-CyBL4Sra.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/server.d.ts
|
|
6
6
|
declare const observability: ObservabilityManager;
|
package/server.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shouldEnableConsole } from "./index.mjs";
|
|
2
2
|
import { safeEnv } from "./env.mjs";
|
|
3
|
-
import { n as ObservabilityBuilder, t as createObservability } from "./factory-
|
|
3
|
+
import { n as ObservabilityBuilder, t as createObservability } from "./factory-CuW4AM5b.mjs";
|
|
4
4
|
import { createConsoleServerPlugin } from "./plugins-console.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/server.ts
|
package/server.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.mjs","names":[],"sources":["../src/server.ts"],"sourcesContent":["/**\n * @fileoverview Auto-configuring server export for Node.js environments (non-Next.js)\n * Auto-configuring server export for Node.js environments (non-Next.js)\n */\n\nimport { safeEnv } from '../env';\n\nimport { ObservabilityBuilder } from './factory/builder';\nimport { createConsoleServerPlugin } from './plugins/console';\nimport { shouldEnableConsole } from './shared';\n\n/**\n * Auto-configured observability for Node.js server environments\n * Automatically sets up console logging based on environment variables\n */\nconst builder = ObservabilityBuilder.create();\n\n// Console logging control using shared utility\nconst env = safeEnv();\nconst enableConsole = shouldEnableConsole(\n env.NEXT_PUBLIC_NODE_ENV,\n env.NEXT_PUBLIC_OBSERVABILITY_CONSOLE_ENABLED,\n env.NEXT_PUBLIC_OBSERVABILITY_DEBUG,\n);\n\n// Always add console plugin, control via enabled flag\nbuilder.withPlugin(\n createConsoleServerPlugin({\n prefix: '[Server]',\n enabled: enableConsole,\n }),\n);\n\n// Note: Production providers would typically be configured by the app\n// This is just a fallback for non-Next.js server usage\n\n/**\n * Pre-configured observability instance for Node.js server environments\n * Includes console logging with automatic environment-based configuration\n */\nexport const observability = builder.build();\n\n// Export types and utilities\nexport * from './core/types';\nexport { createObservability } from './factory';\nexport { ObservabilityBuilder } from './factory/builder';\n\n/**\n * Synchronous logger functions for non-Next.js Node.js environments.\n * These are bound to a pre-built observability instance at module load time.\n *\n * Note: For Next.js apps, use `@repo/observability/server/next` instead,\n * which provides async loggers that support lazy initialization.\n *\n * @example\n * ```typescript\n * import { logInfo, logError } from '@
|
|
1
|
+
{"version":3,"file":"server.mjs","names":[],"sources":["../src/server.ts"],"sourcesContent":["/**\n * @fileoverview Auto-configuring server export for Node.js environments (non-Next.js)\n * Auto-configuring server export for Node.js environments (non-Next.js)\n */\n\nimport { safeEnv } from '../env';\n\nimport { ObservabilityBuilder } from './factory/builder';\nimport { createConsoleServerPlugin } from './plugins/console';\nimport { shouldEnableConsole } from './shared';\n\n/**\n * Auto-configured observability for Node.js server environments\n * Automatically sets up console logging based on environment variables\n */\nconst builder = ObservabilityBuilder.create();\n\n// Console logging control using shared utility\nconst env = safeEnv();\nconst enableConsole = shouldEnableConsole(\n env.NEXT_PUBLIC_NODE_ENV,\n env.NEXT_PUBLIC_OBSERVABILITY_CONSOLE_ENABLED,\n env.NEXT_PUBLIC_OBSERVABILITY_DEBUG,\n);\n\n// Always add console plugin, control via enabled flag\nbuilder.withPlugin(\n createConsoleServerPlugin({\n prefix: '[Server]',\n enabled: enableConsole,\n }),\n);\n\n// Note: Production providers would typically be configured by the app\n// This is just a fallback for non-Next.js server usage\n\n/**\n * Pre-configured observability instance for Node.js server environments\n * Includes console logging with automatic environment-based configuration\n */\nexport const observability = builder.build();\n\n// Export types and utilities\nexport * from './core/types';\nexport { createObservability } from './factory';\nexport { ObservabilityBuilder } from './factory/builder';\n\n/**\n * Synchronous logger functions for non-Next.js Node.js environments.\n * These are bound to a pre-built observability instance at module load time.\n *\n * Note: For Next.js apps, use `@repo/observability/server/next` instead,\n * which provides async loggers that support lazy initialization.\n *\n * @example\n * ```typescript\n * import { logInfo, logError } from '@od-oneapp/shared/logger';\n * logInfo('Server started', { port: 3000 });\n * logError('Database connection failed', { error: err });\n * ```\n */\n// Legacy function for backward compatibility (no-op)\n/**\n * @deprecated Configuration now happens through the observability system\n */\nexport const configureLogger = () => {\n // No-op: Configuration now happens through the observability system\n};\n\n// Re-export type\nexport type LogContext = Record<string, any>;\n"],"mappings":";;;;;;;;;;;;;;AAeA,MAAM,UAAU,qBAAqB,QAAQ;AAG7C,MAAM,MAAM,SAAS;AACrB,MAAM,gBAAgB,oBACpB,IAAI,sBACJ,IAAI,2CACJ,IAAI,gCACL;AAGD,QAAQ,WACN,0BAA0B;CACxB,QAAQ;CACR,SAAS;CACV,CAAC,CACH;;;;;AASD,MAAa,gBAAgB,QAAQ,OAAO;;;;;;;;;;;;;;;;;;AAyB5C,MAAa,wBAAwB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { l as ObservabilityContext, o as LogLevel } from "./plugin-
|
|
2
|
-
import { n as SentryPluginConfig } from "./plugin-
|
|
1
|
+
import { l as ObservabilityContext, o as LogLevel } from "./plugin-BqLvYLQZ.mjs";
|
|
2
|
+
import { n as SentryPluginConfig } from "./plugin-C11_suJr.mjs";
|
|
3
|
+
import { SentryPlugin } from "@od-oneapp/integration-sentry/observability-plugin/plugin";
|
|
3
4
|
|
|
4
5
|
//#region src/plugins/sentry-microfrontend/types.d.ts
|
|
5
6
|
interface BackstageAppConfig {
|
|
@@ -73,4 +74,4 @@ declare function isHostEnvironment(): boolean;
|
|
|
73
74
|
declare function createBackstageScope(backstageApp: string, additionalTags?: Record<string, string>): unknown;
|
|
74
75
|
//#endregion
|
|
75
76
|
export { createSentryMicroFrontendPlugin as a, MicroFrontendMode as c, SentryMicroFrontendPlugin as i, SentryMicroFrontendConfig as l, detectCurrentBackstageApp as n, createMultiplexedTransport as o, isHostEnvironment as r, BackstageAppConfig as s, createBackstageScope as t };
|
|
76
|
-
//# sourceMappingURL=utils-
|
|
77
|
+
//# sourceMappingURL=utils-BGdqvezr.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-BGdqvezr.d.mts","names":[],"sources":["../src/plugins/sentry-microfrontend/types.ts","../src/plugins/sentry-microfrontend/multiplexed-transport.ts","../src/plugins/sentry-microfrontend/plugin.ts","../src/plugins/sentry-microfrontend/utils.ts"],"mappings":";;;;;UAUiB,kBAAA;EAIf,IAAA;EAKA,GAAA;EAKA,OAAA;EAKA,IAAA,GAAO,MAAA;EAKP,YAAA,aAAyB,MAAA;AAAA;AAAA,KAMf,iBAAA;AAAA,UAKK,yBAAA,SAAkC,IAAA,CAAK,kBAAA;EAItD,MAAA;EAKA,YAAA;EAKA,aAAA,GAAgB,kBAAA;EAMhB,YAAA;EAKA,oBAAA;EAMA,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.ts","../src/factory/builder.ts","../src/factory/index.ts"],"sourcesContent":["/**\n * @fileoverview ObservabilityManager - Core orchestrator for multiple observability providers\n * ObservabilityManager - Core orchestrator for multiple observability providers\n */\n\nimport { logError, logWarn } from '@repo/shared/logs';\n\nimport type { ObservabilityPlugin, ObservabilityServerPlugin, PluginLifecycle } from './plugin';\nimport type {\n Breadcrumb,\n LogLevel,\n ObservabilityContext,\n ObservabilityScope,\n ObservabilityServer,\n ObservabilityUser,\n} from './types';\n\n/**\n * Manager that orchestrates multiple observability plugins\n * Broadcasts all method calls to enabled plugins\n */\nexport class ObservabilityManager implements ObservabilityServer {\n private plugins = new Map<string, ObservabilityPlugin | ObservabilityServerPlugin>();\n private initialized = false;\n private initializationPromise: Promise<void> | null = null;\n private lifecycle: PluginLifecycle = {};\n private initializationError: Error | null = null;\n\n /**\n * Create a new ObservabilityManager instance.\n *\n * @param lifecycle - Optional lifecycle callbacks for plugin events\n */\n constructor(lifecycle?: PluginLifecycle) {\n if (lifecycle) {\n this.lifecycle = lifecycle;\n }\n }\n\n /**\n * Add a plugin to the manager\n */\n addPlugin(plugin: ObservabilityPlugin | ObservabilityServerPlugin): this {\n this.plugins.set(plugin.name, plugin);\n return this;\n }\n\n /**\n * Get a specific plugin by name.\n *\n * @param name - Name of the plugin to retrieve\n * @returns Plugin instance if found, undefined otherwise\n */\n getPlugin<T extends ObservabilityPlugin>(name: string): T | undefined {\n return this.plugins.get(name) as T;\n }\n\n /**\n * Get all registered plugins.\n *\n * @returns Array of all registered plugins\n */\n getPlugins(): ObservabilityPlugin[] {\n return Array.from(this.plugins.values());\n }\n\n /**\n * List all registered plugins (alias for getPlugins).\n *\n * @returns Array of all registered plugins\n */\n listPlugins(): ObservabilityPlugin[] {\n return this.getPlugins();\n }\n\n /**\n * Initialize all plugins\n * Note: Failed initialization is retryable - subsequent calls will re-attempt initialization.\n * This allows recovery from transient failures (network issues, temporary misconfigurations).\n */\n async initialize(): Promise<void> {\n // If there's already an initialization in progress, wait for it\n if (this.initializationPromise) {\n return this.initializationPromise;\n }\n\n // If already initialized successfully, return early\n if (this.initialized) {\n return;\n }\n\n // Allow retry if previous attempt failed\n if (this.initializationError) {\n // Log retry attempt for debugging\n logWarn('ObservabilityManager: Retrying failed initialization');\n // Clear previous error to allow fresh attempt\n this.initializationError = null;\n }\n\n // Create the initialization promise and store it to prevent concurrent calls\n this.initializationPromise = this.doInitialize();\n\n try {\n await this.initializationPromise;\n } finally {\n // Clear the promise after initialization completes (success or failure)\n this.initializationPromise = null;\n }\n }\n\n private async doInitialize(): Promise<void> {\n const initPromises = Array.from(this.plugins.values())\n .filter(plugin => plugin.enabled && plugin.initialize)\n .map(async plugin => {\n try {\n if (plugin.initialize) {\n await plugin.initialize();\n }\n this.lifecycle.onInitialized?.(plugin);\n } catch (error) {\n logError(`Failed to initialize plugin ${plugin.name}`, {\n error,\n pluginName: plugin.name,\n });\n this.lifecycle.onError?.(error as Error, plugin);\n // Re-throw to propagate error to Promise.all\n throw error;\n }\n });\n\n try {\n await Promise.all(initPromises);\n this.initialized = true;\n } catch (error) {\n this.initializationError = error instanceof Error ? error : new Error(String(error));\n throw this.initializationError;\n }\n }\n\n /**\n * Check if initialization had an error\n * @returns `true` if initialization failed, `false` otherwise\n */\n hasInitializationError(): boolean {\n return this.initializationError !== null;\n }\n\n /**\n * Get the initialization error if one occurred\n * @returns The initialization error or `null` if no error\n */\n getInitializationError(): Error | null {\n return this.initializationError;\n }\n\n /**\n * Shutdown all plugins\n */\n async shutdown(): Promise<void> {\n const shutdownPromises = Array.from(this.plugins.values())\n .filter(plugin => plugin.shutdown)\n .map(async plugin => {\n try {\n if (plugin.shutdown) {\n await plugin.shutdown();\n }\n this.lifecycle.onShutdown?.(plugin);\n } catch (error) {\n logError(`Failed to shutdown plugin ${plugin.name}`, { error, pluginName: plugin.name });\n this.lifecycle.onError?.(error as Error, plugin);\n }\n });\n\n await Promise.allSettled(shutdownPromises);\n this.initialized = false;\n }\n\n /**\n * Broadcast exception to all enabled plugins.\n *\n * @param error - Error object or unknown error value\n * @param context - Optional additional context data\n */\n captureException(error: Error | unknown, context?: ObservabilityContext): void {\n this.broadcast(plugin => plugin.captureException(error, context));\n }\n\n /**\n * Broadcast message to all enabled plugins.\n *\n * @param message - Message to log\n * @param level - Log level (default: 'info')\n * @param context - Optional additional context data\n */\n captureMessage(message: string, level: LogLevel = 'info', context?: ObservabilityContext): void {\n this.broadcast(plugin => plugin.captureMessage(message, level, context));\n }\n\n /**\n * Validate and sanitize user data to prevent injection and DoS attacks\n * @param user - User data to validate\n * @returns Validated user data with length limits and format validation applied\n */\n private validateUser(user: ObservabilityUser | null): ObservabilityUser | null {\n if (!user) return null;\n\n // Validate required ID field\n const id = String(user.id).trim().slice(0, 255);\n if (!id) {\n // Log warning but don't throw - graceful degradation\n logWarn('ObservabilityManager: User ID is empty, ignoring user data');\n return null;\n }\n\n const validated: ObservabilityUser = { id };\n\n // Validate email format if provided\n if ('email' in user && user.email) {\n const email = String(user.email).trim().slice(0, 255);\n // More robust email validation - RFC 5322 simplified but stricter\n // Allows: alphanumeric, dots, plus, hyphens, underscores before @\n // Requires: valid domain with at least one dot after @\n if (\n email &&\n // eslint-disable-next-line security/detect-unsafe-regex -- Safe: bounded input (max 255 chars), RFC 5322 compliant pattern\n /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(\n email,\n )\n ) {\n validated.email = email;\n }\n }\n\n // Validate username if provided\n if ('username' in user && user.username) {\n const username = String(user.username).trim().slice(0, 255);\n if (username) {\n validated.username = username;\n }\n }\n\n // Validate IP address format if provided\n if ('ip_address' in user && user.ip_address) {\n const ip = String(user.ip_address).trim();\n // Stricter IP validation\n // IPv4: Each octet must be 0-255\n const isValidIPv4 =\n // eslint-disable-next-line security/detect-unsafe-regex -- Safe: bounded pattern for IPv4 validation, input is trimmed string\n /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(\n ip,\n );\n // IPv6: Basic format check (full validation is complex, this catches most invalid cases)\n const looksLikeIPv6 =\n /^[0-9a-fA-F:]+$/.test(ip) && ip.includes(':') && ip.split(':').length <= 8;\n\n if (isValidIPv4 || looksLikeIPv6) {\n validated.ip_address = ip.slice(0, 45); // IPv6 max length\n }\n }\n\n return validated;\n }\n\n /**\n * Set user on all enabled plugins\n * User data is validated and sanitized before being set\n * @param user - User data to set (will be validated)\n */\n setUser(user: ObservabilityUser | null): void {\n const validatedUser = this.validateUser(user);\n this.broadcast(plugin => plugin.setUser(validatedUser));\n }\n\n /**\n * Add breadcrumb to all enabled plugins.\n *\n * @param breadcrumb - Breadcrumb data to add\n */\n addBreadcrumb(breadcrumb: Breadcrumb): void {\n this.broadcast(plugin => plugin.addBreadcrumb(breadcrumb));\n }\n\n /**\n * Execute callback within scope for all enabled plugins.\n *\n * @param callback - Callback that receives the scope\n */\n withScope(callback: (scope: ObservabilityScope) => void): void {\n this.broadcast(plugin => plugin.withScope(callback));\n }\n\n /**\n * Flush all plugins that support it.\n *\n * Waits for all enabled plugins with flush capability to send pending events.\n *\n * @param timeout - Maximum time to wait in milliseconds\n * @returns Promise resolving to true if all plugins flushed successfully\n */\n async flush(timeout?: number): Promise<boolean> {\n const flushPromises = Array.from(this.plugins.values())\n .filter((plugin): plugin is ObservabilityServerPlugin => {\n return plugin.enabled && 'flush' in plugin && typeof plugin.flush === 'function';\n })\n .map(plugin => plugin.flush(timeout));\n\n if (flushPromises.length === 0) {\n return true;\n }\n\n const results = await Promise.allSettled(flushPromises);\n return results.every(result => result.status === 'fulfilled' && result.value === true);\n }\n\n /**\n * Helper to broadcast a method call to all enabled plugins\n * Uses nested try-catch to ensure errors in error handling don't prevent other plugins from executing\n */\n private broadcast(fn: (plugin: ObservabilityPlugin) => void): void {\n this.plugins.forEach(plugin => {\n if (plugin.enabled) {\n try {\n fn(plugin);\n } catch (error) {\n // Safely handle error without throwing - nested try-catch ensures resilience\n try {\n logError(`Plugin ${plugin.name} error`, { error, pluginName: plugin.name });\n } catch {\n // Logger unavailable - continue silently\n }\n\n try {\n this.lifecycle.onError?.(error as Error, plugin);\n } catch {\n // Error handler failed - continue to next plugin\n }\n }\n }\n });\n }\n\n /**\n * Check if manager has any enabled plugins.\n *\n * @returns True if at least one plugin is enabled, false otherwise\n */\n hasEnabledPlugins(): boolean {\n return Array.from(this.plugins.values()).some(plugin => plugin.enabled);\n }\n\n /**\n * Get names of all enabled plugins.\n *\n * @returns Array of plugin names that are currently enabled\n */\n getEnabledPluginNames(): string[] {\n return Array.from(this.plugins.values())\n .filter(plugin => plugin.enabled)\n .map(plugin => plugin.name);\n }\n}\n","/**\n * @fileoverview ObservabilityBuilder - Fluent API for building observability instances\n * ObservabilityBuilder - Fluent API for building observability instances\n */\n\nimport { logError } from '@repo/shared/logs';\n\nimport { ObservabilityManager } from '../core/manager';\n\nimport type {\n ObservabilityPlugin,\n ObservabilityServerPlugin,\n PluginLifecycle,\n} from '../core/plugin';\n\n/**\n * Builder for creating configured ObservabilityManager instances\n */\nexport class ObservabilityBuilder {\n private plugins: (ObservabilityPlugin | ObservabilityServerPlugin)[] = [];\n private lifecycle: PluginLifecycle = {};\n private autoInitialize = true;\n\n /**\n * Add a plugin to the observability stack\n * @param plugin - Observability plugin to add\n * @returns Builder instance for chaining\n */\n withPlugin(plugin: ObservabilityPlugin | ObservabilityServerPlugin): this {\n if (plugin) {\n this.plugins.push(plugin);\n }\n return this;\n }\n\n /**\n * Add multiple plugins at once\n * @param plugins - Array of observability plugins to add\n * @returns Builder instance for chaining\n */\n withPlugins(plugins: (ObservabilityPlugin | ObservabilityServerPlugin)[]): this {\n if (plugins && Array.isArray(plugins)) {\n const validPlugins = plugins.filter(plugin => plugin != null);\n this.plugins.push(...validPlugins);\n }\n return this;\n }\n\n /**\n * Set lifecycle callbacks for plugin management\n * @param lifecycle - Lifecycle callback configuration\n * @returns Builder instance for chaining\n */\n withLifecycle(lifecycle: PluginLifecycle): this {\n this.lifecycle = { ...this.lifecycle, ...lifecycle };\n return this;\n }\n\n /**\n * Configure whether to auto-initialize plugins (default: true)\n */\n withAutoInitialize(autoInitialize: boolean): this {\n this.autoInitialize = autoInitialize;\n return this;\n }\n\n /**\n * Build the ObservabilityManager instance\n * @returns Configured ObservabilityManager instance\n */\n build(): ObservabilityManager {\n const manager = new ObservabilityManager(this.lifecycle);\n\n // Add all plugins\n this.plugins.forEach(plugin => manager.addPlugin(plugin));\n\n // Auto-initialize if enabled and not in edge runtime\n if (\n this.autoInitialize &&\n typeof process !== 'undefined' &&\n process.env.NEXT_RUNTIME !== 'edge'\n ) {\n // Initialize asynchronously with safe error handling\n void (async () => {\n try {\n await manager.initialize();\n } catch (error) {\n // Store error in manager for later inspection\n // Note: We can't directly set private property, but manager stores it internally\n\n // Try logError, but don't fail if unavailable\n try {\n logError('Failed to initialize observability', { error });\n } catch {\n // Logger unavailable - error is stored in manager via initialize() method\n }\n }\n })();\n }\n\n return manager;\n }\n\n /**\n * Build and initialize the ObservabilityManager instance\n * @returns Promise resolving to initialized ObservabilityManager\n */\n async buildWithAutoInit(): Promise<ObservabilityManager> {\n const manager = new ObservabilityManager(this.lifecycle);\n\n // Add all plugins\n this.plugins.forEach(plugin => manager.addPlugin(plugin));\n\n // Initialize all plugins - catch errors but still return manager (graceful degradation)\n try {\n await manager.initialize();\n } catch {\n // Error is stored in manager, but we still return it for graceful degradation\n // This allows the application to continue even if observability initialization fails\n }\n\n return manager;\n }\n\n /**\n * Create a new builder instance\n * @returns New ObservabilityBuilder instance\n */\n static create(): ObservabilityBuilder {\n return new ObservabilityBuilder();\n }\n}\n","/**\n * @fileoverview Factory functions for creating observability instances\n * Factory functions for creating observability instances\n */\n\nimport { ObservabilityManager } from '../core/manager';\n\nimport { ObservabilityBuilder } from './builder';\n\nimport type { ObservabilityPlugin, ObservabilityServerPlugin } from '../core/plugin';\n\nexport { ObservabilityManager } from '../core/manager';\nexport { ObservabilityBuilder } from './builder';\n\n/**\n * Create an observability instance with the provided plugins.\n *\n * Factory function that creates a configured ObservabilityManager with the given plugins.\n * Provides a simpler API than using ObservabilityBuilder directly.\n *\n * @param plugins - Array of observability plugins to include\n * @param options - Optional configuration options\n * @param options.autoInitialize - Whether to auto-initialize plugins (default: true)\n * @returns Configured ObservabilityManager instance\n *\n * @example\n * ```typescript\n * const obs = createObservability([\n * createConsolePlugin(),\n * createSentryPlugin({ dsn: '...' }),\n * ], { autoInitialize: true });\n * ```\n */\nexport function createObservability(\n plugins: (ObservabilityPlugin | ObservabilityServerPlugin)[],\n options?: {\n autoInitialize?: boolean;\n },\n): ObservabilityManager {\n const builder = new ObservabilityBuilder();\n\n if (options?.autoInitialize !== undefined) {\n builder.withAutoInitialize(options.autoInitialize);\n }\n\n return builder.withPlugins(plugins).build();\n}\n\n/**\n * Create a no-op observability instance for testing or when observability is disabled.\n *\n * Returns an ObservabilityManager with no plugins configured. All observability methods\n * will be no-ops. Useful for testing or when observability should be disabled.\n *\n * Note: For logging, use @repo/shared/logger instead.\n *\n * @returns Empty ObservabilityManager instance\n *\n * @example\n * ```typescript\n * const obs = createNoOpObservability();\n * obs.captureMessage('This will not be logged'); // No-op\n * ```\n */\nexport function createNoOpObservability(): ObservabilityManager {\n return new ObservabilityManager();\n}\n"],"mappings":";;;;;;;;;;;AAqBA,IAAa,uBAAb,MAAiE;CAC/D,AAAQ,0BAAU,IAAI,KAA8D;CACpF,AAAQ,cAAc;CACtB,AAAQ,wBAA8C;CACtD,AAAQ,YAA6B,EAAE;CACvC,AAAQ,sBAAoC;;;;;;CAO5C,YAAY,WAA6B;AACvC,MAAI,UACF,MAAK,YAAY;;;;;CAOrB,UAAU,QAA+D;AACvE,OAAK,QAAQ,IAAI,OAAO,MAAM,OAAO;AACrC,SAAO;;;;;;;;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