@dxos/observability 0.6.12 → 0.6.13-main.09887cd

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/lib/node-esm/chunk-BHETLWXO.mjs +939 -0
  2. package/dist/lib/node-esm/chunk-BHETLWXO.mjs.map +7 -0
  3. package/dist/lib/node-esm/chunk-CMDADTM3.mjs +133 -0
  4. package/dist/lib/node-esm/chunk-CMDADTM3.mjs.map +7 -0
  5. package/dist/lib/node-esm/chunk-YJ4KVBWC.mjs +2 -0
  6. package/dist/lib/node-esm/chunk-YJ4KVBWC.mjs.map +7 -0
  7. package/dist/lib/node-esm/index.mjs +34 -0
  8. package/dist/lib/node-esm/index.mjs.map +7 -0
  9. package/dist/lib/node-esm/meta.json +1 -0
  10. package/dist/lib/node-esm/observability-QJFZLUL4.mjs +8 -0
  11. package/dist/lib/node-esm/observability-QJFZLUL4.mjs.map +7 -0
  12. package/dist/lib/node-esm/otel-YI7HAFOG.mjs +258 -0
  13. package/dist/lib/node-esm/otel-YI7HAFOG.mjs.map +7 -0
  14. package/dist/lib/node-esm/segment/index.mjs +144 -0
  15. package/dist/lib/node-esm/segment/index.mjs.map +7 -0
  16. package/dist/lib/node-esm/sentry/index.mjs +25 -0
  17. package/dist/lib/node-esm/sentry/index.mjs.map +7 -0
  18. package/dist/lib/node-esm/sentry-log-processor-JYJH3AMG.mjs +133 -0
  19. package/dist/lib/node-esm/sentry-log-processor-JYJH3AMG.mjs.map +7 -0
  20. package/dist/types/src/sentry/node.node.test.d.ts +2 -0
  21. package/dist/types/src/sentry/node.node.test.d.ts.map +1 -0
  22. package/dist/types/src/sentry/{node.test.js → node.node.test.js} +8 -15
  23. package/dist/types/src/sentry/node.node.test.js.map +1 -0
  24. package/dist/types/src/sentry/sentry.node.test.d.ts +2 -0
  25. package/dist/types/src/sentry/sentry.node.test.d.ts.map +1 -0
  26. package/dist/types/src/sentry/{sentry.test.js → sentry.node.test.js} +8 -15
  27. package/dist/types/src/sentry/sentry.node.test.js.map +1 -0
  28. package/package.json +21 -18
  29. package/src/sentry/{node.test.ts → node.node.test.ts} +2 -9
  30. package/src/sentry/{sentry.test.ts → sentry.node.test.ts} +2 -7
  31. package/dist/types/src/sentry/node.test.d.ts +0 -2
  32. package/dist/types/src/sentry/node.test.d.ts.map +0 -1
  33. package/dist/types/src/sentry/node.test.js.map +0 -1
  34. package/dist/types/src/sentry/sentry.test.d.ts +0 -2
  35. package/dist/types/src/sentry/sentry.test.d.ts.map +0 -1
  36. package/dist/types/src/sentry/sentry.test.js.map +0 -1
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/observability.ts", "../../../src/cli-observability-secrets.json", "../../../src/helpers/browser-observability.ts", "../../../src/helpers/common.ts", "../../../src/helpers/node-observability.ts", "../../../src/helpers/map-spaces.ts", "../../../src/helpers/setup-telemetry-listeners.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Event, scheduleTaskInterval } from '@dxos/async';\nimport { type Client, type Config } from '@dxos/client';\nimport { type ClientServices, type Space } from '@dxos/client-protocol';\nimport { Context } from '@dxos/context';\nimport { invariant } from '@dxos/invariant';\nimport { log } from '@dxos/log';\nimport { ConnectionState } from '@dxos/network-manager';\nimport { DeviceKind, type NetworkStatus, Platform } from '@dxos/protocols/proto/dxos/client/services';\nimport { isNode } from '@dxos/util';\n\nimport buildSecrets from './cli-observability-secrets.json';\nimport { type IPData, getTelemetryIdentifier, mapSpaces } from './helpers';\nimport { type OtelLogs, type OtelMetrics, type OtelTraces } from './otel';\nimport { type SegmentTelemetry, type EventOptions, type PageOptions } from './segment';\nimport { type InitOptions, type captureException as SentryCaptureException } from './sentry';\nimport { type SentryLogProcessor } from './sentry/sentry-log-processor';\n\nconst SPACE_METRICS_MIN_INTERVAL = 1000 * 60; // 1 minute\nconst SPACE_TELEMETRY_MIN_INTERVAL = 1000 * 60 * 60; // 1 hour\nconst NETWORK_METRICS_MIN_INTERVAL = 1000 * 60 * 5; // 5 minutes\n\n// Secrets? EnvironmentConfig?\n\nexport type ObservabilitySecrets = {\n DX_ENVIRONMENT: string | null;\n DX_RELEASE: string | null;\n SENTRY_DESTINATION: string | null;\n TELEMETRY_API_KEY: string | null;\n IPDATA_API_KEY: string | null;\n OTEL_ENDPOINT: string | null;\n OTEL_AUTHORIZATION: string | null;\n};\n\nexport type Mode = 'basic' | 'full' | 'disabled';\nexport type TagScope = 'errors' | 'telemetry' | 'metrics' | 'all';\n\nexport type ObservabilityOptions = {\n /// The webapp (e.g. 'composer.dxos.org'), 'cli', or 'agent'.\n namespace: string;\n mode: Mode;\n // TODO(nf): make platform a required extension?\n // platform: Platform;\n release?: string;\n environment?: string;\n config?: Config;\n secrets?: Record<string, string>;\n group?: string;\n\n telemetry?: {\n batchSize?: number;\n };\n\n errorLog?: {\n sentryInitOptions?: InitOptions;\n };\n};\n\n/*\n * Observability provides a common interface for error logging, metrics, and telemetry.\n * It currently provides these capabilities using Sentry, OpenTelemetry, and Segment.\n */\nexport class Observability {\n // TODO(wittjosiah): Generic metrics interface.\n private _otelMetrics?: OtelMetrics;\n private _otelTraces?: OtelTraces;\n // TODO(wittjosiah): Generic telemetry interface.\n private _telemetryBatchSize: number;\n private _telemetry?: SegmentTelemetry;\n // TODO(wittjosiah): Generic error logging interface.\n private _sentryLogProcessor?: SentryLogProcessor;\n private _otelLogs?: OtelLogs;\n private _errorReportingOptions?: InitOptions;\n private _captureException?: typeof SentryCaptureException;\n private _captureUserFeedback?: (name: string, email: string, message: string) => Promise<void>;\n private _setTag?: (key: string, value: string) => void;\n\n private _secrets: ObservabilitySecrets;\n private _namespace: string;\n private _mode: Mode;\n private _config?: Config;\n private _group?: string;\n // TODO(nf): accept upstream context?\n private _ctx = new Context();\n private _tags = new Map<string, { value: string; scope: TagScope }>();\n private _lastNetworkStatus?: NetworkStatus;\n\n // TODO(nf): make platform a required extension?\n constructor({\n namespace,\n environment,\n release,\n config,\n secrets,\n group,\n mode,\n telemetry,\n errorLog,\n }: ObservabilityOptions) {\n this._namespace = namespace;\n this._mode = mode;\n this._config = config;\n this._group = group;\n this._secrets = this._loadSecrets(config, secrets);\n this._telemetryBatchSize = telemetry?.batchSize ?? 30;\n this._errorReportingOptions = errorLog?.sentryInitOptions;\n\n if (this._group) {\n this.setTag('group', this._group);\n }\n this.setTag('namespace', this._namespace);\n environment && this.setTag('environment', environment);\n release && this.setTag('release', release);\n this.setTag('mode', this._mode);\n }\n\n get mode() {\n return this._mode;\n }\n\n get group() {\n return this._group;\n }\n\n get enabled() {\n return this._mode !== 'disabled';\n }\n\n private _loadSecrets(config: Config | undefined, secrets?: Record<string, string>) {\n if (isNode()) {\n const mergedSecrets = {\n ...(buildSecrets as ObservabilitySecrets),\n ...secrets,\n };\n\n process.env.DX_ENVIRONMENT && (mergedSecrets.DX_ENVIRONMENT = process.env.DX_ENVIRONMENT);\n process.env.DX_RELEASE && (mergedSecrets.DX_RELEASE = process.env.DX_RELEASE);\n // TODO: prefix these with DX_?\n process.env.SENTRY_DESTINATION && (mergedSecrets.SENTRY_DESTINATION = process.env.SENTRY_DESTINATION);\n process.env.TELEMETRY_API_KEY && (mergedSecrets.TELEMETRY_API_KEY = process.env.TELEMETRY_API_KEY);\n process.env.IPDATA_API_KEY && (mergedSecrets.IPDATA_API_KEY = process.env.IPDATA_API_KEY);\n process.env.DX_OTEL_ENDPOINT && (mergedSecrets.OTEL_ENDPOINT = process.env.DX_OTEL_ENDPOINT);\n process.env.DX_OTEL_AUTHORIZATION && (mergedSecrets.OTEL_AUTHORIZATION = process.env.DX_OTEL_AUTHORIZATION);\n\n return mergedSecrets;\n } else {\n log('config', { rtc: this._secrets, config });\n return {\n DX_ENVIRONMENT: config?.get('runtime.app.env.DX_ENVIRONMENT'),\n DX_RELEASE: config?.get('runtime.app.env.DX_RELEASE'),\n SENTRY_DESTINATION: config?.get('runtime.app.env.DX_SENTRY_DESTINATION'),\n TELEMETRY_API_KEY: config?.get('runtime.app.env.DX_TELEMETRY_API_KEY'),\n IPDATA_API_KEY: config?.get('runtime.app.env.DX_IPDATA_API_KEY'),\n OTEL_ENDPOINT: config?.get('runtime.app.env.DX_OTEL_ENDPOINT'),\n OTEL_AUTHORIZATION: config?.get('runtime.app.env.DX_OTEL_AUTHORIZATION'),\n ...secrets,\n };\n }\n }\n\n async initialize() {\n await this._initMetrics();\n await this._initTelemetry();\n await this._initErrorLogs();\n await this._initTraces();\n }\n\n async close() {\n const closes: Promise<void>[] = [];\n this._telemetry && closes.push(this._telemetry.close());\n this._otelMetrics && closes.push(this._otelMetrics.close());\n this._otelLogs && closes.push(this._otelLogs.close());\n\n await Promise.all(closes);\n await this._ctx.dispose();\n\n // TODO(wittjosiah): Remove telemetry, etc. scripts.\n }\n\n setMode(mode: Mode) {\n this._mode = mode;\n }\n\n //\n // Tags\n //\n\n setTag(key: string, value: string, scope?: TagScope) {\n if (this.enabled && (scope === undefined || scope === 'all' || scope === 'errors')) {\n this._setTag?.(key, value);\n }\n if (!scope) {\n scope = 'all';\n }\n this._tags.set(key, { value, scope });\n }\n\n getTag(key: string) {\n return this._tags.get(key);\n }\n\n addIPDataTelemetryTags = (ipData: IPData) => {\n this.setTag('city', ipData.city, 'telemetry');\n this.setTag('region', ipData.region, 'telemetry');\n this.setTag('country', ipData.country, 'telemetry');\n ipData.latitude && this.setTag('latitude', ipData.latitude.toString(), 'telemetry');\n ipData.longitude && this.setTag('longitude', ipData.longitude.toString(), 'telemetry');\n };\n\n // TODO(wittjosiah): Improve privacy of telemetry identifiers. See `getTelemetryIdentifier`.\n async setIdentityTags(clientServices: Partial<ClientServices>) {\n if (clientServices.IdentityService) {\n clientServices.IdentityService.queryIdentity().subscribe((idqr) => {\n if (!idqr?.identity?.identityKey) {\n log('empty response from identity service', { idqr });\n return;\n }\n this.setTag('identityKey', idqr.identity.identityKey.truncate());\n });\n }\n\n if (clientServices.DevicesService) {\n clientServices.DevicesService.queryDevices().subscribe((dqr) => {\n if (!dqr || !dqr.devices || dqr.devices.length === 0) {\n log('empty response from device service', { device: dqr });\n return;\n }\n invariant(dqr, 'empty response from device service');\n\n const thisDevice = dqr.devices.find((device) => device.kind === DeviceKind.CURRENT);\n if (!thisDevice) {\n log('no current device', { device: dqr });\n return;\n }\n this.setTag('deviceKey', thisDevice.deviceKey.truncate());\n if (thisDevice.profile?.label) {\n this.setTag('deviceProfile', thisDevice.profile.label);\n }\n });\n }\n }\n\n //\n // Metrics\n //\n\n private async _initMetrics() {\n if (this.enabled && this._secrets.OTEL_ENDPOINT && this._secrets.OTEL_AUTHORIZATION) {\n const { OtelMetrics } = await import('./otel');\n this._otelMetrics = new OtelMetrics({\n endpoint: this._secrets.OTEL_ENDPOINT,\n authorizationHeader: this._secrets.OTEL_AUTHORIZATION,\n serviceName: this._namespace,\n serviceVersion: this.getTag('release')?.value ?? '0.0.0',\n getTags: () =>\n Object.fromEntries(\n Array.from(this._tags)\n .filter(([key, value]) => {\n return value.scope === 'all' || value.scope === 'metrics';\n })\n .map(([key, value]) => [key, value.value]),\n ),\n });\n log('otel metrics enabled');\n } else {\n log('otel metrics disabled');\n }\n }\n\n /**\n * Gauge metric.\n *\n * The default implementation uses OpenTelemetry\n */\n gauge(name: string, value: number | any, extraTags?: any) {\n this._otelMetrics?.gauge(name, value, extraTags);\n }\n\n // TODO(nf): Refactor into ObservabilityExtensions.\n\n startNetworkMetrics(clientServices: Partial<ClientServices>) {\n if (!clientServices.NetworkService) {\n return;\n }\n // TODO(nf): support type in debounce()\n const updateSignalMetrics = new Event<NetworkStatus>().debounce(NETWORK_METRICS_MIN_INTERVAL);\n updateSignalMetrics.on(this._ctx, async () => {\n log('send signal metrics');\n (this._lastNetworkStatus?.signaling as NetworkStatus.Signal[]).forEach(({ server, state }) => {\n this.gauge('dxos.client.network.signal.connectionState', state, { server });\n });\n\n let swarmCount = 0;\n const connectionStates = new Map<string, number>();\n for (const state in ConnectionState) {\n connectionStates.set(state, 0);\n }\n\n let totalReadBufferSize = 0;\n let totalWriteBufferSize = 0;\n let totalChannelBufferSize = 0;\n\n this._lastNetworkStatus?.connectionInfo?.forEach((connectionInfo) => {\n swarmCount++;\n\n for (const conn of connectionInfo.connections ?? []) {\n connectionStates.set(conn.state, (connectionStates.get(conn.state) ?? 0) + 1);\n totalReadBufferSize += conn.readBufferSize ?? 0;\n totalWriteBufferSize += conn.writeBufferSize ?? 0;\n\n for (const stream of conn.streams ?? []) {\n totalChannelBufferSize += stream.writeBufferSize ?? 0;\n }\n }\n\n this.gauge('dxos.client.network.swarm.count', swarmCount);\n for (const state in ConnectionState) {\n this.gauge('dxos.client.network.connection.count', connectionStates.get(state) ?? 0, { state });\n }\n this.gauge('dxos.client.network.totalReadBufferSize', totalReadBufferSize);\n this.gauge('dxos.client.network.totalWriteBufferSize', totalWriteBufferSize);\n this.gauge('dxos.client.network.totalChannelBufferSize', totalChannelBufferSize);\n });\n });\n\n clientServices.NetworkService.queryStatus().subscribe((networkStatus) => {\n this._lastNetworkStatus = networkStatus;\n updateSignalMetrics.emit();\n });\n\n scheduleTaskInterval(this._ctx, async () => updateSignalMetrics.emit(), NETWORK_METRICS_MIN_INTERVAL);\n }\n\n startSpacesMetrics(client: Client, namespace: string) {\n // TODO(nf): update subscription on new spaces\n const spaces = client.spaces.get();\n const subscriptions = new Map<string, { unsubscribe: () => void }>();\n this._ctx.onDispose(() => subscriptions.forEach((subscription) => subscription.unsubscribe()));\n\n const updateSpaceMetrics = new Event<Space>().debounce(SPACE_METRICS_MIN_INTERVAL);\n updateSpaceMetrics.on(this._ctx, async () => {\n log('send space metrics');\n for (const data of mapSpaces(spaces, { truncateKeys: true })) {\n this.gauge('dxos.client.space.members', data.members, { key: data.key });\n this.gauge('dxos.client.space.objects', data.objects, { key: data.key });\n this.gauge('dxos.client.space.epoch', data.epoch, { key: data.key });\n this.gauge('dxos.client.space.currentDataMutations', data.currentDataMutations, { key: data.key });\n }\n });\n\n const updateSpaceTelemetry = new Event<Space>().debounce(SPACE_TELEMETRY_MIN_INTERVAL);\n updateSpaceTelemetry.on(this._ctx, async () => {\n log('send space telemetry');\n for (const data of mapSpaces(spaces, { truncateKeys: true })) {\n this.event({\n identityId: getTelemetryIdentifier(client),\n name: `${namespace}.space.update`,\n properties: data,\n });\n }\n });\n\n const subscribeToSpaceUpdate = (space: Space) =>\n space.pipeline.subscribe({\n next: () => {\n updateSpaceMetrics.emit();\n updateSpaceTelemetry.emit();\n },\n });\n\n spaces.forEach((space) => {\n subscriptions.set(space.key.toHex(), subscribeToSpaceUpdate(space));\n });\n\n client.spaces.subscribe({\n next: async (spaces) => {\n spaces\n .filter((space) => !subscriptions.has(space.key.toHex()))\n .forEach((space) => {\n subscriptions.set(space.key.toHex(), subscribeToSpaceUpdate(space));\n });\n },\n });\n\n scheduleTaskInterval(this._ctx, async () => updateSpaceMetrics.emit(), NETWORK_METRICS_MIN_INTERVAL);\n }\n\n async startRuntimeMetrics(client: Client, frequency: number = NETWORK_METRICS_MIN_INTERVAL) {\n const platform = await client.services.services.SystemService?.getPlatform();\n invariant(platform, 'platform is required');\n\n this.setTag('platform_type', Platform.PLATFORM_TYPE[platform.type as number].toLowerCase());\n if (this._mode === 'full') {\n // platform[foo] does not work?\n if (platform.platform) {\n this.setTag('platform', platform.platform);\n }\n if (platform.arch) {\n this.setTag('arch', platform.arch);\n }\n if (platform.runtime) {\n this.setTag('runtime', platform.runtime);\n }\n }\n\n scheduleTaskInterval(\n this._ctx,\n async () => {\n if (client.services.constructor.name === 'WorkerClientServices') {\n const memory = (window.performance as any).memory;\n if (memory) {\n this.gauge('dxos.client.runtime.heapTotal', memory.totalJSHeapSize);\n this.gauge('dxos.client.runtime.heapUsed', memory.usedJSHeapSize);\n this.gauge('dxos.client.runtime.heapSizeLimit', memory.jsHeapSizeLimit);\n }\n }\n client.services.services.SystemService?.getPlatform()\n .then((platform) => {\n if (platform.memory) {\n this.gauge('dxos.client.services.runtime.rss', platform.memory.rss);\n this.gauge('dxos.client.services.runtime.heapTotal', platform.memory.heapTotal);\n this.gauge('dxos.client.services.runtime.heapUsed', platform.memory.heapUsed);\n }\n })\n .catch((error) => log('platform error', { error }));\n },\n frequency,\n );\n }\n\n //\n // Telemetry\n //\n\n private async _initTelemetry() {\n if (this._secrets.TELEMETRY_API_KEY && this._mode !== 'disabled') {\n const { SegmentTelemetry } = await import('./segment');\n this._telemetry = new SegmentTelemetry({\n apiKey: this._secrets.TELEMETRY_API_KEY,\n batchSize: this._telemetryBatchSize,\n getTags: () =>\n Object.fromEntries(\n Array.from(this._tags)\n .filter(([key, value]) => {\n return value.scope === 'all' || value.scope === 'telemetry';\n })\n .map(([key, value]) => [key, value.value]),\n ),\n });\n } else {\n log('segment disabled');\n }\n }\n\n /**\n * A telemetry event.\n *\n * The default implementation uses Segment.\n */\n event(options: EventOptions) {\n this._telemetry?.event(options);\n }\n\n /**\n * A telemetry page view.\n *\n * The default implementation uses Segment.\n */\n page(options: PageOptions) {\n this._telemetry?.page(options);\n }\n\n //\n // Error Logs\n //\n\n private async _initErrorLogs() {\n if (this._secrets.SENTRY_DESTINATION && this._mode !== 'disabled') {\n const { captureException, captureUserFeedback, init, setTag } = await import('./sentry');\n const { SentryLogProcessor } = await import('./sentry/sentry-log-processor');\n this._captureException = captureException;\n this._captureUserFeedback = captureUserFeedback;\n\n this._setTag = setTag;\n\n // TODO(nf): refactor package into this one?\n log.info('Initializing Sentry', {\n dest: this._secrets.SENTRY_DESTINATION,\n options: this._errorReportingOptions,\n });\n this._sentryLogProcessor = new SentryLogProcessor();\n init({\n ...this._errorReportingOptions,\n destination: this._secrets.SENTRY_DESTINATION,\n scrubFilenames: this._mode !== 'full',\n onError: (event) => this._sentryLogProcessor!.addLogBreadcrumbsTo(event),\n });\n // TODO(nf): set platform at instantiation? needed for node.\n\n // TODO(nf): is this different than passing as properties in options?\n this._tags.forEach((v, k) => {\n if (v.scope === 'all' || v.scope === 'errors') {\n setTag(k, v.value);\n }\n });\n } else {\n log('sentry disabled');\n }\n\n if (this._secrets.OTEL_ENDPOINT && this._secrets.OTEL_AUTHORIZATION && this._mode !== 'disabled') {\n const { OtelLogs } = await import('./otel');\n this._otelLogs = new OtelLogs({\n endpoint: this._secrets.OTEL_ENDPOINT,\n authorizationHeader: this._secrets.OTEL_AUTHORIZATION,\n serviceName: this._namespace,\n serviceVersion: this.getTag('release')?.value ?? '0.0.0',\n getTags: () =>\n Object.fromEntries(\n Array.from(this._tags)\n .filter(([key, value]) => {\n return value.scope === 'all' || value.scope === 'errors';\n })\n .map(([key, value]) => [key, value.value]),\n ),\n });\n log('otel logs enabled', { namespace: this._namespace });\n } else {\n log('otel logs disabled');\n }\n }\n\n startErrorLogs() {\n this._sentryLogProcessor && log.runtimeConfig.processors.push(this._sentryLogProcessor.logProcessor);\n this._otelLogs && log.runtimeConfig.processors.push(this._otelLogs.logProcessor);\n }\n\n startTraces() {\n this._otelTraces && this._otelTraces.start();\n }\n\n // TODO(nf): refactor init based on providers and their capabilities\n private async _initTraces() {\n if (this._secrets.OTEL_ENDPOINT && this._secrets.OTEL_AUTHORIZATION && this._mode !== 'disabled') {\n const { OtelTraces } = await import('./otel');\n this._otelTraces = new OtelTraces({\n endpoint: this._secrets.OTEL_ENDPOINT,\n authorizationHeader: this._secrets.OTEL_AUTHORIZATION,\n serviceName: this._namespace,\n serviceVersion: this.getTag('release')?.value ?? '0.0.0',\n getTags: () =>\n Object.fromEntries(\n Array.from(this._tags)\n .filter(([key, value]) => {\n return value.scope === 'all' || value.scope === 'metrics';\n })\n .map(([key, value]) => [key, value.value]),\n ),\n });\n }\n }\n\n /**\n * Manually capture an exception.\n *\n * The default implementation uses Sentry.\n */\n captureException(err: any) {\n if (this.enabled) {\n this._captureException?.(err);\n }\n }\n\n /**\n * Manually capture user feedback.\n *\n * The default implementation uses Sentry.\n */\n captureUserFeedback(name: string, email: string, message: string) {\n // TODO(Zan): Should this respect telemetry mode? Sending feedback is explicitly user-initiated.\n // - Maybe if telemetry is disable we shouldn't enable replay.\n // - (Check the browser.ts implementation for reference).\n void this._captureUserFeedback?.(name, email, message);\n }\n}\n", "{\n \"SENTRY_DESTINATION\": \"https://2647916221e643869965e78469479aa4@o4504012000067584.ingest.sentry.io/4504012027265029\",\n \"TELEMETRY_API_KEY\": \"B00QG6PtJJrJ0VVFe0H5a6bcUUShKyZM\",\n \"IPDATA_API_KEY\": \"73dfdecdf979c18f07d50cf841bbdd9e589f237256326ac8cca23786\",\n \"OTEL_ENDPOINT\": null,\n \"OTEL_AUTHORIZATION\": null\n}", "//\n// Copyright 2022 DXOS.org\n//\n\n// NOTE: localStorage is not available in web workers.\nimport * as localForage from 'localforage';\n\n// import { type Platform } from '@dxos/client-services';\n// import { type InitOptions as TelemetryInitOptions } from '@dxos/telemetry';\n\nimport type { Config } from '@dxos/client';\nimport { log } from '@dxos/log';\n\nimport type { IPData } from './common';\nimport type { Mode, Observability } from '../observability';\n\nexport const OBSERVABILITY_DISABLED_KEY = 'observability-disabled';\nexport const OBSERVABILITY_GROUP_KEY = 'observability-group';\n\nexport const isObservabilityDisabled = async (namespace: string): Promise<boolean> => {\n try {\n return (await localForage.getItem(`${namespace}:${OBSERVABILITY_DISABLED_KEY}`)) === 'true';\n } catch (err) {\n log.catch('Failed to check if observability is disabled, assuming it is', err);\n return true;\n }\n};\n\nexport const storeObservabilityDisabled = async (namespace: string, value: boolean) => {\n try {\n await localForage.setItem(`${namespace}:${OBSERVABILITY_DISABLED_KEY}`, String(value));\n } catch (err) {\n log.catch('Failed to store observability disabled', err);\n }\n};\n\nexport const getObservabilityGroup = async (namespace: string): Promise<string | undefined> => {\n try {\n return (await localForage.getItem(`${namespace}:${OBSERVABILITY_GROUP_KEY}`)) ?? undefined;\n } catch (err) {\n log.catch('Failed to get observability group', err);\n }\n};\n\nexport const storeObservabilityGroup = async (namespace: string, value: string) => {\n try {\n await localForage.setItem(`${namespace}:${OBSERVABILITY_GROUP_KEY}`, value);\n } catch (err) {\n log.catch('Failed to store observability group', err);\n }\n};\n\nexport type AppObservabilityOptions = {\n namespace: string;\n config: Config;\n mode?: Mode;\n tracingEnable?: boolean;\n replayEnable?: boolean;\n // TODO(nf): options for providers?\n};\n\n// TODO(wittjosiah): Store preference for disabling observability.\n// At minimum should be stored locally (i.e., localstorage), possibly in halo preference.\n// Needs to be hooked up to settings page for user visibility.\nexport const initializeAppObservability = async ({\n namespace,\n config,\n mode = 'basic',\n tracingEnable = true,\n replayEnable = true,\n}: AppObservabilityOptions): Promise<Observability> => {\n log('initializeAppObservability', { config });\n\n /*\n const platform = (await client.services.services.SystemService?.getPlatform()) as Platform;\n if (!platform) {\n log.error('failed to get platform, could not initialize observability');\n return undefined;\n }\n */\n\n const group = (await getObservabilityGroup(namespace)) ?? undefined;\n const release = `${namespace}@${config.get('runtime.app.build.version')}`;\n const environment = config.get('runtime.app.env.DX_ENVIRONMENT');\n\n const observabilityDisabled = await isObservabilityDisabled(namespace);\n\n const { Observability } = await import('../observability');\n\n // TODO(nf): configure mode\n const observability = new Observability({\n namespace,\n release,\n environment,\n group,\n mode,\n config,\n errorLog: {\n sentryInitOptions: {\n environment,\n release,\n tracing: tracingEnable,\n replay: replayEnable,\n // TODO(wittjosiah): Configure these.\n sampleRate: 1.0,\n replaySampleRate: 0.1,\n replaySampleRateOnError: 1.0,\n },\n },\n });\n\n // global kill switch\n if (observabilityDisabled) {\n observability.setMode('disabled');\n log.info('observability disabled');\n return observability;\n }\n\n try {\n const getIPData = async (config: Config): Promise<IPData | void> => {\n const IP_DATA_CACHE_TIMEOUT = 6 * 60 * 60 * 1000; // 6 hours\n type CachedIPData = {\n data: IPData;\n timestamp: number;\n };\n\n // Check cache first.\n const cachedData: null | CachedIPData = await localForage.getItem('dxos:observability:ipdata');\n if (cachedData && cachedData.timestamp > Date.now() - IP_DATA_CACHE_TIMEOUT) {\n return cachedData.data;\n }\n\n // Fetch data if not cached.\n const IPDATA_API_KEY = config.get('runtime.app.env.DX_IPDATA_API_KEY');\n if (IPDATA_API_KEY) {\n return fetch(`https://api.ipdata.co?api-key=${IPDATA_API_KEY}`)\n .then((res) => res.json())\n .then((data) => {\n // Cache data.\n localForage\n .setItem('dxos:observability:ipdata', {\n data,\n timestamp: Date.now(),\n })\n .catch((err) => observability.captureException(err));\n\n return data;\n })\n .catch((err) => observability.captureException(err));\n }\n };\n\n // TODO(nf): plugin state?\n\n // TODO(nf): should provide capability to init Sentry earlier in booting process to capture errors during initialization.\n\n await observability.initialize();\n observability.startErrorLogs();\n\n const ipData = await getIPData(config);\n\n ipData && observability.addIPDataTelemetryTags(ipData);\n\n if (typeof navigator !== 'undefined' && navigator.storage?.estimate) {\n setInterval(async () => {\n try {\n const storageEstimate = await navigator.storage.estimate();\n storageEstimate.usage && observability.setTag('storageUsage', storageEstimate.usage.toString(), 'telemetry');\n storageEstimate.quota && observability.setTag('storageQuota', storageEstimate.quota.toString(), 'telemetry');\n } catch (error) {\n log.warn('Failed to run estimate()', error);\n }\n }, 10e3);\n }\n } catch (err: any) {\n log.error('Failed to initialize app observability', err);\n }\n\n return observability;\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport type { Client } from '@dxos/client';\n\n// TODO(wittjosiah): Improve privacy of telemetry identifiers.\n// - Identifier should be generated client-side with no attachment to identity.\n// - Identifier can then be reset by user.\n// - Identifier can be synced via HALO to allow for correlation of events bewteen devices.\n// - Identifier should also be stored outside of HALO such that it is available immediately on startup.\nexport const getTelemetryIdentifier = (client: Client) => {\n if (!client?.initialized) {\n return undefined;\n }\n\n const identity = client.halo.identity.get();\n if (identity) {\n return identity.identityKey.truncate();\n }\n\n return undefined;\n};\n\nexport type IPData = { city: string; region: string; country: string; latitude: number; longitude: number };\n", "//\n// Copyright 2022 DXOS.org\n//\nimport yaml from 'js-yaml';\nimport { existsSync, statSync } from 'node:fs';\nimport { mkdir, readFile, writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { v4 as uuid, validate as validateUuid } from 'uuid';\n\nimport type { Config } from '@dxos/client';\nimport { log } from '@dxos/log';\n\nimport { Observability, type Mode } from '../observability';\n\n/**\n * Print observability banner once per installation.\n */\nexport const showObservabilityBanner = async (configDir: string, bannercb: (input: string) => void) => {\n const path = join(configDir, '.observability-banner-printed');\n if (existsSync(path)) {\n return;\n }\n bannercb(\n // eslint-disable-next-line no-multi-str\n 'Basic observability data will be sent to the DXOS team in order to improve the product. This includes \\\n performance metrics, error logs, and usage data. No personally identifiable information, other than your \\\n public key, is included with this data and no private data ever leaves your devices. To disable sending \\\n observability data, set the environment variable DX_DISABLE_OBSERVABILITY=true.',\n );\n\n await writeFile(path, '', 'utf-8');\n};\n\nexport const getObservabilityState = async (configDir: string): Promise<PersistentObservabilityState> => {\n // check whether configDir exists and if it's a directory\n\n if (existsSync(configDir)) {\n if (!statSync(configDir).isDirectory()) {\n throw new Error(`Config directory ${configDir} exists but is not a directory`);\n }\n } else {\n await mkdir(configDir, { recursive: true });\n }\n\n const idPath = join(configDir, 'observability.yml');\n if (existsSync(idPath)) {\n const context = await readFile(idPath, 'utf-8');\n return validate(context) ?? initializeState(idPath);\n }\n\n return initializeState(idPath);\n};\n\nexport type PersistentObservabilityState = {\n installationId: string;\n group?: string;\n mode: Mode;\n};\n\n// create initial state and write to file, using environment variables to override defaults.\nconst initializeState = async (idPath: string): Promise<PersistentObservabilityState> => {\n // TODO(nf): read initial values from config or seed file\n const observabilityState = {\n installationId: uuid(),\n group: process.env.DX_OBSERVABILITY_GROUP ?? undefined,\n mode: (process.env.DX_DISABLE_OBSERVABILITY ? 'disabled' : process.env.DX_OBSERVABILITY_MODE ?? 'basic') as Mode,\n };\n\n await writeFile(\n idPath,\n '# This file is automatically generated by the @dxos/cli.\\n' + yaml.dump(observabilityState),\n 'utf-8',\n );\n\n return observabilityState;\n};\n\nconst validate = (contextString: string) => {\n const context = yaml.load(contextString) as PersistentObservabilityState;\n if (Boolean(context.installationId) && validateUuid(context.installationId!)) {\n return {\n ...context,\n mode: process.env.DX_DISABLE_OBSERVABILITY ? 'disabled' : context.mode ?? 'basic',\n };\n }\n};\n\nexport type NodeObservabilityOptions = {\n installationId: string;\n group?: string;\n namespace: string;\n version: string;\n config: Config;\n mode?: Mode;\n tracingEnable?: boolean;\n replayEnable?: boolean;\n // TODO(nf): options for providers?\n};\n\nexport const initializeNodeObservability = async ({\n namespace,\n version,\n config,\n installationId,\n group,\n mode = 'basic',\n tracingEnable = true,\n replayEnable = true,\n}: NodeObservabilityOptions): Promise<Observability> => {\n log('initializeCliObservability', { config });\n\n // TODO(nf): make CLI build populate runtime.app.build config?\n const release = `${namespace}@${version}`;\n const environment = process.env.DX_ENVIRONMENT ?? 'unknown';\n\n const observability = new Observability({\n namespace,\n release,\n environment,\n group,\n mode,\n errorLog: {\n sentryInitOptions: {\n environment,\n release,\n // TODO(wittjosiah): Configure this.\n sampleRate: 1.0,\n },\n },\n });\n\n observability.setTag('installationId', installationId);\n\n // TODO(nf): cache ipdata to avoid repeated requests\n const IPDATA_API_KEY = config.get('runtime.app.env.DX_IPDATA_API_KEY');\n try {\n const res = await fetch(`https://api.ipdata.co/?api-key=${IPDATA_API_KEY}`);\n const ipData = await res.json();\n ipData && observability.addIPDataTelemetryTags(ipData);\n } catch (err) {\n observability?.captureException(err);\n }\n return observability;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type { Space } from '@dxos/client-protocol';\n\nexport type MapSpacesOptions = {\n verbose?: boolean;\n truncateKeys?: boolean;\n};\n\nexport const mapSpaces = (spaces: Space[], options: MapSpacesOptions = { verbose: false, truncateKeys: false }) => {\n return spaces.map((space) => {\n // TODO(burdon): Factor out.\n // TODO(burdon): Agent needs to restart before `ready` is available.\n const { open, ready } = space.internal.data.metrics ?? {};\n const startup = open && ready && ready.getTime() - open.getTime();\n\n // TODO(burdon): Get feeds from client-services if verbose (factor out from devtools/diagnostics).\n // const host = client.services.services.DevtoolsHost!;\n const pipeline = space.internal.data.pipeline;\n const startDataMutations = pipeline?.currentEpoch?.subject.assertion.timeframe.totalMessages() ?? 0;\n const epoch = pipeline?.currentEpoch?.subject.assertion.number;\n // const appliedEpoch = pipeline?.appliedEpoch?.subject.assertion.number;\n const currentDataMutations = pipeline?.currentDataTimeframe?.totalMessages() ?? 0;\n const totalDataMutations = pipeline?.targetDataTimeframe?.totalMessages() ?? 0;\n\n return {\n // TODO(nf): truncate keys for DD?\n key: space.key.truncate(),\n open: space.isOpen,\n members: space.members.get().length,\n objects: space.db.coreDatabase.getAllObjectIds().length,\n startup,\n epoch,\n // appliedEpoch,\n startDataMutations,\n currentDataMutations,\n totalDataMutations,\n\n // TODO(burdon): Negative?\n progress: (\n Math.min(Math.abs((currentDataMutations - startDataMutations) / (totalDataMutations - startDataMutations)), 1) *\n 100\n ).toFixed(0),\n };\n });\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport type { Client } from '@dxos/client';\n\nimport { getTelemetryIdentifier } from './common';\nimport type { Observability } from '../observability';\n\nlet lastFocusEvent = new Date();\nlet totalTime = 0;\n\nexport const setupTelemetryListeners = (namespace: string, client: Client, observability: Observability) => {\n const clickCallback = (event: Event) => {\n const id = (event.target as HTMLElement)?.id;\n if (!id) {\n return;\n }\n\n setTimeout(() =>\n observability.event({\n identityId: getTelemetryIdentifier(client),\n name: `${namespace}.window.click`,\n properties: {\n href: window.location.href,\n id: (event.target as HTMLElement)?.id,\n path: (event.composedPath() as HTMLElement[])\n .filter((el) => Boolean(el.tagName))\n .map((el) => `${el.tagName.toLowerCase()}${el.id ? `#${el.id}` : ''}`)\n .reverse()\n .join('>'),\n },\n }),\n );\n };\n\n const focusCallback = () => {\n const now = new Date();\n setTimeout(() =>\n observability.event({\n identityId: getTelemetryIdentifier(client),\n name: `${namespace}.window.focus`,\n properties: {\n href: window.location.href,\n timeAway: now.getTime() - lastFocusEvent.getTime(),\n },\n }),\n );\n lastFocusEvent = now;\n };\n\n const blurCallback = () => {\n const now = new Date();\n const timeSpent = now.getTime() - lastFocusEvent.getTime();\n setTimeout(() =>\n observability.event({\n identityId: getTelemetryIdentifier(client),\n name: `${namespace}.window.blur`,\n properties: {\n href: window.location.href,\n timeSpent,\n },\n }),\n );\n lastFocusEvent = now;\n totalTime = totalTime + timeSpent;\n };\n\n const unloadCallback = () => {\n setTimeout(() =>\n observability.event({\n identityId: getTelemetryIdentifier(client),\n name: `${namespace}.page.unload`,\n properties: {\n href: window.location.href,\n timeSpent: totalTime,\n },\n }),\n );\n };\n\n const errorCallback = (event: ErrorEvent) => {\n setTimeout(() =>\n observability.event({\n identityId: getTelemetryIdentifier(client),\n name: `${namespace}.window.error`,\n properties: {\n href: window.location.href,\n message: event.message,\n filename: event.filename,\n stack: (event.error as Error).stack,\n },\n }),\n );\n };\n\n window.addEventListener('click', clickCallback, true);\n window.addEventListener('focus', focusCallback);\n window.addEventListener('blur', blurCallback);\n window.addEventListener('beforeunload', unloadCallback);\n window.addEventListener('error', errorCallback);\n\n return () => {\n window.removeEventListener('click', clickCallback, true);\n window.removeEventListener('focus', focusCallback);\n window.removeEventListener('blur', blurCallback);\n window.removeEventListener('beforeunload', unloadCallback);\n window.removeEventListener('error', errorCallback);\n };\n};\n"],
5
+ "mappings": ";;;AAIA,SAASA,OAAOC,4BAA4B;AAG5C,SAASC,eAAe;AACxB,SAASC,iBAAiB;AAC1B,SAASC,OAAAA,YAAW;AACpB,SAASC,uBAAuB;AAChC,SAASC,YAAgCC,gBAAgB;AACzD,SAASC,cAAc;;;ACZvB;AAAA,EACE,oBAAsB;AAAA,EACtB,mBAAqB;AAAA,EACrB,gBAAkB;AAAA,EAClB,eAAiB;AAAA,EACjB,oBAAsB;AACxB;;;ACDA,YAAYC,iBAAiB;AAM7B,SAASC,WAAW;;AAKb,IAAMC,6BAA6B;AACnC,IAAMC,0BAA0B;AAEhC,IAAMC,0BAA0B,OAAOC,cAAAA;AAC5C,MAAI;AACF,WAAQ,MAAkBC,oBAAQ,GAAGD,SAAAA,IAAaH,0BAAAA,EAA4B,MAAO;EACvF,SAASK,KAAK;AACZN,QAAIO,MAAM,gEAAgED,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U,KAAKvE,SAASkB;QACxBsD,qBAAqB,KAAKxE,SAASoB;QACnCqD,aAAa,KAAK7E;QAClB8E,gBAAgB,KAAK7B,OAAO,SAAA,GAAYL,SAAS;QACjDmC,SAAS,MACPC,OAAOC,YACLC,MAAMC,KAAK,KAAK9F,KAAK,EAClB+F,OAAO,CAAC,CAACzC,KAAKC,KAAAA,MAAM;AACnB,iBAAOA,MAAMC,UAAU,SAASD,MAAMC,UAAU;QAClD,CAAA,EACCwC,IAAI,CAAC,CAAC1C,KAAKC,KAAAA,MAAW;UAACD;UAAKC,MAAMA;SAAM,CAAA;MAEjD,CAAA;IACF;EACF;;;;;;EAOA+H,iBAAiBwB,KAAU;AACzB,QAAI,KAAKzL,SAAS;AAChB,WAAKqK,oBAAoBoB,GAAAA;IAC3B;EACF;;;;;;EAOAvB,oBAAoBrF,MAAc6G,OAAeC,SAAiB;AAIhE,SAAK,KAAKrB,uBAAuBzF,MAAM6G,OAAOC,OAAAA;EAChD;AACF;",
6
+ "names": ["Event", "scheduleTaskInterval", "Context", "invariant", "log", "ConnectionState", "DeviceKind", "Platform", "isNode", "localForage", "log", "OBSERVABILITY_DISABLED_KEY", "OBSERVABILITY_GROUP_KEY", "isObservabilityDisabled", "namespace", "getItem", "err", "catch", "storeObservabilityDisabled", "value", "setItem", "String", "getObservabilityGroup", "undefined", "storeObservabilityGroup", "initializeAppObservability", "config", "mode", "tracingEnable", "replayEnable", "group", "release", "get", "environment", "observabilityDisabled", "Observability", "observability", "errorLog", "sentryInitOptions", "tracing", "replay", "sampleRate", "replaySampleRate", "replaySampleRateOnError", "setMode", "info", "getIPData", "IP_DATA_CACHE_TIMEOUT", "cachedData", "timestamp", "Date", "now", "data", "IPDATA_API_KEY", "fetch", "then", "res", "json", "captureException", "initialize", "startErrorLogs", "ipData", "addIPDataTelemetryTags", "navigator", "storage", "estimate", "setInterval", "storageEstimate", "usage", "setTag", "toString", "quota", "error", "warn", "getTelemetryIdentifier", "client", "initialized", "undefined", "identity", "halo", "get", "identityKey", "truncate", "yaml", "existsSync", "statSync", "mkdir", "readFile", "writeFile", "join", "v4", "uuid", "validate", "validateUuid", "log", "showObservabilityBanner", "configDir", "bannercb", "path", "join", "existsSync", "writeFile", "getObservabilityState", "statSync", "isDirectory", "Error", "mkdir", "recursive", "idPath", "context", "readFile", "validate", "initializeState", "observabilityState", "installationId", "uuid", "group", "process", "env", "DX_OBSERVABILITY_GROUP", "undefined", "mode", "DX_DISABLE_OBSERVABILITY", "DX_OBSERVABILITY_MODE", "yaml", "dump", "contextString", "load", "Boolean", "validateUuid", "initializeNodeObservability", "namespace", "version", "config", "tracingEnable", "replayEnable", "log", "release", "environment", "DX_ENVIRONMENT", "observability", "Observability", "errorLog", "sentryInitOptions", "sampleRate", "setTag", "IPDATA_API_KEY", "get", "res", "fetch", "ipData", "json", "addIPDataTelemetryTags", "err", "captureException", "mapSpaces", "spaces", "options", "verbose", "truncateKeys", "map", "space", "open", "ready", "internal", "data", "metrics", "startup", "getTime", "pipeline", "startDataMutations", "currentEpoch", "subject", "assertion", "timeframe", "totalMessages", "epoch", "number", "currentDataMutations", "currentDataTimeframe", "totalDataMutations", "targetDataTimeframe", "key", "truncate", "isOpen", "members", "get", "length", "objects", "db", "coreDatabase", "getAllObjectIds", "progress", "Math", "min", "abs", "toFixed", "lastFocusEvent", "Date", "totalTime", "setupTelemetryListeners", "namespace", "client", "observability", "clickCallback", "event", "id", "target", "setTimeout", "identityId", "getTelemetryIdentifier", "name", "properties", "href", "window", "location", "path", "composedPath", "filter", "el", "Boolean", "tagName", "map", "toLowerCase", "reverse", "join", "focusCallback", "now", "timeAway", "getTime", "blurCallback", "timeSpent", "unloadCallback", "errorCallback", "message", "filename", "stack", "error", "addEventListener", "removeEventListener", "SPACE_METRICS_MIN_INTERVAL", "SPACE_TELEMETRY_MIN_INTERVAL", "NETWORK_METRICS_MIN_INTERVAL", "Observability", "constructor", "namespace", "environment", "release", "config", "secrets", "group", "mode", "telemetry", "errorLog", "_ctx", "Context", "_tags", "Map", "addIPDataTelemetryTags", "ipData", "setTag", "city", "region", "country", "latitude", "toString", "longitude", "_namespace", "_mode", "_config", "_group", "_secrets", "_loadSecrets", "_telemetryBatchSize", "batchSize", "_errorReportingOptions", "sentryInitOptions", "enabled", "isNode", "mergedSecrets", "buildSecrets", "process", "env", "DX_ENVIRONMENT", "DX_RELEASE", "SENTRY_DESTINATION", "TELEMETRY_API_KEY", "IPDATA_API_KEY", "DX_OTEL_ENDPOINT", "OTEL_ENDPOINT", "DX_OTEL_AUTHORIZATION", "OTEL_AUTHORIZATION", "log", "rtc", "get", "initialize", "_initMetrics", "_initTelemetry", "_initErrorLogs", "_initTraces", "close", "closes", "_telemetry", "push", "_otelMetrics", "_otelLogs", "Promise", "all", "dispose", "setMode", "key", "value", "scope", "undefined", "_setTag", "set", "getTag", "setIdentityTags", "clientServices", "IdentityService", "queryIdentity", "subscribe", "idqr", "identity", "identityKey", "truncate", "DevicesService", "queryDevices", "dqr", "devices", "length", "device", "invariant", "thisDevice", "find", "kind", "DeviceKind", "CURRENT", "deviceKey", "profile", "label", "OtelMetrics", "endpoint", "authorizationHeader", "serviceName", "serviceVersion", "getTags", "Object", "fromEntries", "Array", "from", "filter", "map", "gauge", "name", "extraTags", "startNetworkMetrics", "NetworkService", "updateSignalMetrics", "Event", "debounce", "on", "_lastNetworkStatus", "signaling", "forEach", "server", "state", "swarmCount", "connectionStates", "ConnectionState", "totalReadBufferSize", "totalWriteBufferSize", "totalChannelBufferSize", "connectionInfo", "conn", "connections", "readBufferSize", "writeBufferSize", "stream", "streams", "queryStatus", "networkStatus", "emit", "scheduleTaskInterval", "startSpacesMetrics", "client", "spaces", "subscriptions", "onDispose", "subscription", "unsubscribe", "updateSpaceMetrics", "data", "mapSpaces", "truncateKeys", "members", "objects", "epoch", "currentDataMutations", "updateSpaceTelemetry", "event", "identityId", "getTelemetryIdentifier", "properties", "subscribeToSpaceUpdate", "space", "pipeline", "next", "toHex", "has", "startRuntimeMetrics", "frequency", "platform", "services", "SystemService", "getPlatform", "Platform", "PLATFORM_TYPE", "type", "toLowerCase", "arch", "runtime", "memory", "window", "performance", "totalJSHeapSize", "usedJSHeapSize", "jsHeapSizeLimit", "then", "rss", "heapTotal", "heapUsed", "catch", "error", "SegmentTelemetry", "apiKey", "options", "page", "captureException", "captureUserFeedback", "init", "SentryLogProcessor", "_captureException", "_captureUserFeedback", "info", "dest", "_sentryLogProcessor", "destination", "scrubFilenames", "onError", "addLogBreadcrumbsTo", "v", "k", "OtelLogs", "startErrorLogs", "runtimeConfig", "processors", "logProcessor", "startTraces", "_otelTraces", "start", "OtelTraces", "err", "email", "message"]
7
+ }
@@ -0,0 +1,133 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+
3
+ // packages/sdk/observability/src/sentry/node.ts
4
+ import { init as naturalInit, setTag, addBreadcrumb as naturalAddBreadcrumb, captureException as naturalCaptureException, captureMessage as naturalCaptureMessage, withScope as naturalWithScope, metrics, startInactiveSpan } from "@sentry/node";
5
+ import { log } from "@dxos/log";
6
+ import { TRACE_PROCESSOR } from "@dxos/tracing";
7
+ import { setTag as setTag2, setTags, setUser } from "@sentry/node";
8
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/observability/src/sentry/node.ts";
9
+ var init = (options) => {
10
+ try {
11
+ naturalInit({
12
+ enabled: options.enable ?? true,
13
+ dsn: options.destination,
14
+ serverName: options.installationId,
15
+ release: options.release,
16
+ environment: options.environment ?? process.env.DX_ENVIRONMENT,
17
+ integrations: [],
18
+ tracesSampleRate: options.sampleRate,
19
+ transport: options.transport,
20
+ beforeSend: (event) => {
21
+ options.scrubFilenames && scrub(event);
22
+ options.onError?.(event);
23
+ return event;
24
+ }
25
+ });
26
+ TRACE_PROCESSOR.remoteMetrics.registerProcessor(metrics);
27
+ TRACE_PROCESSOR.remoteTracing.registerProcessor({
28
+ startSpan: startInactiveSpan
29
+ });
30
+ Object.entries(options.properties ?? {}).forEach(([key, value]) => {
31
+ setTag(key, value);
32
+ });
33
+ } catch (err) {
34
+ log.catch("Failed to initialize sentry", err, {
35
+ F: __dxlog_file,
36
+ L: 59,
37
+ S: void 0,
38
+ C: (f, a) => f(...a)
39
+ });
40
+ }
41
+ };
42
+ var scrub = (event) => {
43
+ event.exception?.values?.forEach((value) => {
44
+ value.stacktrace?.frames?.forEach((frame) => {
45
+ const filename = frame.filename?.split("/");
46
+ frame.filename = filename && filename[filename.length - 1];
47
+ });
48
+ });
49
+ };
50
+ var addBreadcrumb = (breadcrumb) => {
51
+ try {
52
+ naturalAddBreadcrumb(breadcrumb);
53
+ log("add breadcrumb", breadcrumb, {
54
+ F: __dxlog_file,
55
+ L: 84,
56
+ S: void 0,
57
+ C: (f, a) => f(...a)
58
+ });
59
+ } catch (err) {
60
+ log.catch("Failed to add breadcrumb", err, {
61
+ F: __dxlog_file,
62
+ L: 86,
63
+ S: void 0,
64
+ C: (f, a) => f(...a)
65
+ });
66
+ }
67
+ };
68
+ var captureException = (exception, captureContext) => {
69
+ try {
70
+ const eventId = naturalCaptureException(exception, captureContext);
71
+ log("capture exception", {
72
+ exception,
73
+ eventId,
74
+ ...captureContext
75
+ }, {
76
+ F: __dxlog_file,
77
+ L: 100,
78
+ S: void 0,
79
+ C: (f, a) => f(...a)
80
+ });
81
+ return eventId;
82
+ } catch (err) {
83
+ log.catch("Failed to capture exception", err, {
84
+ F: __dxlog_file,
85
+ L: 103,
86
+ S: void 0,
87
+ C: (f, a) => f(...a)
88
+ });
89
+ return "unknown";
90
+ }
91
+ };
92
+ var captureMessage = (exception, captureContext) => {
93
+ try {
94
+ const eventId = naturalCaptureMessage(exception, captureContext);
95
+ log("capture message", {
96
+ exception,
97
+ eventId,
98
+ captureContext
99
+ }, {
100
+ F: __dxlog_file,
101
+ L: 111,
102
+ S: void 0,
103
+ C: (f, a) => f(...a)
104
+ });
105
+ return eventId;
106
+ } catch (err) {
107
+ log.catch("Failed to capture message", err, {
108
+ F: __dxlog_file,
109
+ L: 114,
110
+ S: void 0,
111
+ C: (f, a) => f(...a)
112
+ });
113
+ return "unknown";
114
+ }
115
+ };
116
+ var captureUserFeedback = (name, email, message) => {
117
+ const feedback = `User feedback: ${name} ${email} ${message}`;
118
+ throw new Error(`Capture user feedback not implemented in node. Use @sentry/browser. Message: ${feedback}`);
119
+ };
120
+ var withScope = naturalWithScope;
121
+
122
+ export {
123
+ init,
124
+ addBreadcrumb,
125
+ captureException,
126
+ captureMessage,
127
+ captureUserFeedback,
128
+ withScope,
129
+ setTag2 as setTag,
130
+ setTags,
131
+ setUser
132
+ };
133
+ //# sourceMappingURL=chunk-CMDADTM3.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/sentry/node.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport {\n type Event,\n init as naturalInit,\n setTag,\n addBreadcrumb as naturalAddBreadcrumb,\n captureException as naturalCaptureException,\n captureMessage as naturalCaptureMessage,\n withScope as naturalWithScope,\n metrics,\n startInactiveSpan,\n} from '@sentry/node';\n\nimport { log } from '@dxos/log';\nimport { TRACE_PROCESSOR } from '@dxos/tracing';\n\nimport { type InitOptions } from './types';\n\n// Polyfill export.\nexport { setTag, setTags, setUser } from '@sentry/node';\n\n/**\n * To use this SDK, call the init function as early as possible in the main entry module.\n * To set context information or send manual events, use the provided methods.\n *\n * @param options {InitOptions}\n */\nexport const init = (options: InitOptions) => {\n try {\n naturalInit({\n enabled: options.enable ?? true,\n dsn: options.destination,\n serverName: options.installationId,\n release: options.release,\n environment: options.environment ?? process.env.DX_ENVIRONMENT,\n integrations: [],\n tracesSampleRate: options.sampleRate,\n transport: options.transport,\n beforeSend: (event) => {\n options.scrubFilenames && scrub(event);\n options.onError?.(event);\n\n return event;\n },\n });\n\n TRACE_PROCESSOR.remoteMetrics.registerProcessor(metrics);\n TRACE_PROCESSOR.remoteTracing.registerProcessor({\n startSpan: startInactiveSpan,\n });\n\n Object.entries(options.properties ?? {}).forEach(([key, value]) => {\n setTag(key, value);\n });\n } catch (err) {\n log.catch('Failed to initialize sentry', err);\n }\n};\n\nconst scrub = (event: Event) => {\n event.exception?.values?.forEach((value) => {\n value.stacktrace?.frames?.forEach((frame) => {\n const filename = frame.filename?.split('/');\n frame.filename = filename && filename[filename.length - 1];\n });\n });\n};\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on user's actions prior to an error or crash.\n *\n * https://docs.sentry.io/platforms/javascript/enriching-events/breadcrumbs/\n *\n * @param breadcrumb — The breadcrumb to record.\n */\nexport const addBreadcrumb: typeof naturalAddBreadcrumb = (breadcrumb) => {\n try {\n naturalAddBreadcrumb(breadcrumb);\n log('add breadcrumb', breadcrumb);\n } catch (err) {\n log.catch('Failed to add breadcrumb', err);\n }\n};\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception — An exception-like object.\n * @param captureContext — Additional scope data to apply to exception event.\n * @returns — The generated eventId.\n */\nexport const captureException: typeof naturalCaptureException = (exception, captureContext) => {\n try {\n const eventId = naturalCaptureException(exception, captureContext);\n log('capture exception', { exception, eventId, ...captureContext });\n return eventId;\n } catch (err) {\n log.catch('Failed to capture exception', err);\n return 'unknown';\n }\n};\n\nexport const captureMessage: typeof naturalCaptureMessage = (exception, captureContext) => {\n try {\n const eventId = naturalCaptureMessage(exception, captureContext);\n log('capture message', { exception, eventId, captureContext });\n return eventId;\n } catch (err) {\n log.catch('Failed to capture message', err);\n return 'unknown';\n }\n};\n\nexport const captureUserFeedback = (name: string, email: string, message: string): Promise<void> => {\n const feedback = `User feedback: ${name} ${email} ${message}`;\n throw new Error(`Capture user feedback not implemented in node. Use @sentry/browser. Message: ${feedback}`);\n};\n\nexport const withScope = naturalWithScope;\n"],
5
+ "mappings": ";;;AAIA,SAEEA,QAAQC,aACRC,QACAC,iBAAiBC,sBACjBC,oBAAoBC,yBACpBC,kBAAkBC,uBAClBC,aAAaC,kBACbC,SAC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;;;;;;EACxC;AACF;AASO,IAAM3C,mBAAmD,CAAC6C,WAAWS,mBAAAA;AAC1E,MAAI;AACF,UAAMC,UAAUtD,wBAAwB4C,WAAWS,cAAAA;AACnD9C,QAAI,qBAAqB;MAAEqC;MAAWU;MAAS,GAAGD;IAAe,GAAA;;;;;;AACjE,WAAOC;EACT,SAASZ,KAAK;AACZnC,QAAIoC,MAAM,+BAA+BD,KAAAA;;;;;;AACzC,WAAO;EACT;AACF;AAEO,IAAMzC,iBAA+C,CAAC2C,WAAWS,mBAAAA;AACtE,MAAI;AACF,UAAMC,UAAUpD,sBAAsB0C,WAAWS,cAAAA;AACjD9C,QAAI,mBAAmB;MAAEqC;MAAWU;MAASD;IAAe,GAAA;;;;;;AAC5D,WAAOC;EACT,SAASZ,KAAK;AACZnC,QAAIoC,MAAM,6BAA6BD,KAAAA;;;;;;AACvC,WAAO;EACT;AACF;AAEO,IAAMa,sBAAsB,CAACC,MAAcC,OAAeC,YAAAA;AAC/D,QAAMC,WAAW,kBAAkBH,IAAAA,IAAQC,KAAAA,IAASC,OAAAA;AACpD,QAAM,IAAIE,MAAM,gFAAgFD,QAAAA,EAAU;AAC5G;AAEO,IAAMxD,YAAYC;",
6
+ "names": ["init", "naturalInit", "setTag", "addBreadcrumb", "naturalAddBreadcrumb", "captureException", "naturalCaptureException", "captureMessage", "naturalCaptureMessage", "withScope", "naturalWithScope", "metrics", "startInactiveSpan", "log", "TRACE_PROCESSOR", "setTags", "setUser", "options", "enabled", "enable", "dsn", "destination", "serverName", "installationId", "release", "environment", "process", "env", "DX_ENVIRONMENT", "integrations", "tracesSampleRate", "sampleRate", "transport", "beforeSend", "event", "scrubFilenames", "scrub", "onError", "remoteMetrics", "registerProcessor", "remoteTracing", "startSpan", "Object", "entries", "properties", "forEach", "key", "value", "err", "catch", "exception", "values", "stacktrace", "frames", "frame", "filename", "split", "length", "breadcrumb", "captureContext", "eventId", "captureUserFeedback", "name", "email", "message", "feedback", "Error"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ //# sourceMappingURL=chunk-YJ4KVBWC.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,34 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ OBSERVABILITY_DISABLED_KEY,
4
+ OBSERVABILITY_GROUP_KEY,
5
+ Observability,
6
+ getObservabilityGroup,
7
+ getObservabilityState,
8
+ getTelemetryIdentifier,
9
+ initializeAppObservability,
10
+ initializeNodeObservability,
11
+ isObservabilityDisabled,
12
+ mapSpaces,
13
+ setupTelemetryListeners,
14
+ showObservabilityBanner,
15
+ storeObservabilityDisabled,
16
+ storeObservabilityGroup
17
+ } from "./chunk-BHETLWXO.mjs";
18
+ export {
19
+ OBSERVABILITY_DISABLED_KEY,
20
+ OBSERVABILITY_GROUP_KEY,
21
+ Observability,
22
+ getObservabilityGroup,
23
+ getObservabilityState,
24
+ getTelemetryIdentifier,
25
+ initializeAppObservability,
26
+ initializeNodeObservability,
27
+ isObservabilityDisabled,
28
+ mapSpaces,
29
+ setupTelemetryListeners,
30
+ showObservabilityBanner,
31
+ storeObservabilityDisabled,
32
+ storeObservabilityGroup
33
+ };
34
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1 @@
1
+ {"inputs":{"packages/sdk/observability/src/cli-observability-secrets.json":{"bytes":316,"imports":[]},"packages/sdk/observability/src/otel/otel.ts":{"bytes":1960,"imports":[{"path":"@opentelemetry/api","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/observability/src/otel/logs.ts":{"bytes":10297,"imports":[{"path":"@opentelemetry/api-logs","kind":"import-statement","external":true},{"path":"@opentelemetry/exporter-logs-otlp-http","kind":"import-statement","external":true},{"path":"@opentelemetry/resources","kind":"import-statement","external":true},{"path":"@opentelemetry/sdk-logs","kind":"import-statement","external":true},{"path":"@opentelemetry/semantic-conventions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/sdk/observability/src/otel/otel.ts","kind":"import-statement","original":"./otel"}],"format":"esm"},"packages/sdk/observability/src/otel/metrics.ts":{"bytes":14358,"imports":[{"path":"@opentelemetry/exporter-metrics-otlp-http","kind":"import-statement","external":true},{"path":"@opentelemetry/resources","kind":"import-statement","external":true},{"path":"@opentelemetry/sdk-metrics","kind":"import-statement","external":true},{"path":"@opentelemetry/semantic-conventions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"packages/sdk/observability/src/otel/otel.ts","kind":"import-statement","original":"./otel"}],"format":"esm"},"packages/sdk/observability/src/otel/traces.ts":{"bytes":6856,"imports":[{"path":"@opentelemetry/api","kind":"import-statement","external":true},{"path":"@opentelemetry/exporter-trace-otlp-http","kind":"import-statement","external":true},{"path":"@opentelemetry/resources","kind":"import-statement","external":true},{"path":"@opentelemetry/sdk-trace-base","kind":"import-statement","external":true},{"path":"@opentelemetry/semantic-conventions","kind":"import-statement","external":true},{"path":"debug","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/observability/src/otel/index.ts":{"bytes":744,"imports":[{"path":"packages/sdk/observability/src/otel/otel.ts","kind":"import-statement","original":"./otel"},{"path":"packages/sdk/observability/src/otel/logs.ts","kind":"import-statement","original":"./logs"},{"path":"packages/sdk/observability/src/otel/metrics.ts","kind":"import-statement","original":"./metrics"},{"path":"packages/sdk/observability/src/otel/traces.ts","kind":"import-statement","original":"./traces"}],"format":"esm"},"packages/sdk/observability/src/sentry/node.ts":{"bytes":14071,"imports":[{"path":"@sentry/node","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@sentry/node","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/observability/src/sentry/types.ts":{"bytes":1065,"imports":[],"format":"esm"},"packages/sdk/observability/src/sentry/index.ts":{"bytes":578,"imports":[{"path":"packages/sdk/observability/src/sentry/node.ts","kind":"import-statement","original":"./node"},{"path":"packages/sdk/observability/src/sentry/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/sdk/observability/src/segment/node.ts":{"bytes":9871,"imports":[{"path":"@segment/analytics-node","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/sdk/observability/src/sentry/index.ts","kind":"import-statement","original":"../sentry"}],"format":"esm"},"packages/sdk/observability/src/segment/types.ts":{"bytes":1070,"imports":[],"format":"esm"},"packages/sdk/observability/src/segment/index.ts":{"bytes":579,"imports":[{"path":"packages/sdk/observability/src/segment/node.ts","kind":"import-statement","original":"./node"},{"path":"packages/sdk/observability/src/segment/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/sdk/observability/src/sentry/sentry-log-processor.ts":{"bytes":18274,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/sdk/observability/src/sentry/node.ts","kind":"import-statement","original":"./node"}],"format":"esm"},"packages/sdk/observability/src/observability.ts":{"bytes":73787,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/network-manager","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/sdk/observability/src/cli-observability-secrets.json","kind":"import-statement","original":"./cli-observability-secrets.json"},{"path":"packages/sdk/observability/src/helpers/index.ts","kind":"import-statement","original":"./helpers"},{"path":"packages/sdk/observability/src/otel/index.ts","kind":"dynamic-import","original":"./otel"},{"path":"packages/sdk/observability/src/segment/index.ts","kind":"dynamic-import","original":"./segment"},{"path":"packages/sdk/observability/src/sentry/index.ts","kind":"dynamic-import","original":"./sentry"},{"path":"packages/sdk/observability/src/sentry/sentry-log-processor.ts","kind":"dynamic-import","original":"./sentry/sentry-log-processor"},{"path":"packages/sdk/observability/src/otel/index.ts","kind":"dynamic-import","original":"./otel"},{"path":"packages/sdk/observability/src/otel/index.ts","kind":"dynamic-import","original":"./otel"}],"format":"esm"},"packages/sdk/observability/src/helpers/browser-observability.ts":{"bytes":19735,"imports":[{"path":"localforage","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/sdk/observability/src/observability.ts","kind":"dynamic-import","original":"../observability"}],"format":"esm"},"packages/sdk/observability/src/helpers/common.ts":{"bytes":2674,"imports":[],"format":"esm"},"packages/sdk/observability/src/helpers/node-observability.ts":{"bytes":14364,"imports":[{"path":"js-yaml","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"uuid","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/sdk/observability/src/observability.ts","kind":"import-statement","original":"../observability"}],"format":"esm"},"packages/sdk/observability/src/helpers/map-spaces.ts":{"bytes":6449,"imports":[],"format":"esm"},"packages/sdk/observability/src/helpers/setup-telemetry-listeners.ts":{"bytes":11391,"imports":[{"path":"packages/sdk/observability/src/helpers/common.ts","kind":"import-statement","original":"./common"}],"format":"esm"},"packages/sdk/observability/src/helpers/index.ts":{"bytes":966,"imports":[{"path":"packages/sdk/observability/src/helpers/browser-observability.ts","kind":"import-statement","original":"./browser-observability"},{"path":"packages/sdk/observability/src/helpers/common.ts","kind":"import-statement","original":"./common"},{"path":"packages/sdk/observability/src/helpers/node-observability.ts","kind":"import-statement","original":"./node-observability"},{"path":"packages/sdk/observability/src/helpers/map-spaces.ts","kind":"import-statement","original":"./map-spaces"},{"path":"packages/sdk/observability/src/helpers/setup-telemetry-listeners.ts","kind":"import-statement","original":"./setup-telemetry-listeners"}],"format":"esm"},"packages/sdk/observability/src/index.ts":{"bytes":598,"imports":[{"path":"packages/sdk/observability/src/helpers/index.ts","kind":"import-statement","original":"./helpers"},{"path":"packages/sdk/observability/src/observability.ts","kind":"import-statement","original":"./observability"}],"format":"esm"}},"outputs":{"packages/sdk/observability/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/observability/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/sdk/observability/dist/lib/node-esm/chunk-BHETLWXO.mjs","kind":"import-statement"}],"exports":["OBSERVABILITY_DISABLED_KEY","OBSERVABILITY_GROUP_KEY","Observability","getObservabilityGroup","getObservabilityState","getTelemetryIdentifier","initializeAppObservability","initializeNodeObservability","isObservabilityDisabled","mapSpaces","setupTelemetryListeners","showObservabilityBanner","storeObservabilityDisabled","storeObservabilityGroup"],"entryPoint":"packages/sdk/observability/src/index.ts","inputs":{"packages/sdk/observability/src/index.ts":{"bytesInOutput":0}},"bytes":901},"packages/sdk/observability/dist/lib/node-esm/segment/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4167},"packages/sdk/observability/dist/lib/node-esm/segment/index.mjs":{"imports":[{"path":"packages/sdk/observability/dist/lib/node-esm/chunk-YJ4KVBWC.mjs","kind":"import-statement"},{"path":"packages/sdk/observability/dist/lib/node-esm/chunk-CMDADTM3.mjs","kind":"import-statement"},{"path":"@segment/analytics-node","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["SegmentTelemetry"],"entryPoint":"packages/sdk/observability/src/segment/index.ts","inputs":{"packages/sdk/observability/src/segment/node.ts":{"bytesInOutput":2875},"packages/sdk/observability/src/segment/index.ts":{"bytesInOutput":0}},"bytes":3176},"packages/sdk/observability/dist/lib/node-esm/sentry/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/observability/dist/lib/node-esm/sentry/index.mjs":{"imports":[{"path":"packages/sdk/observability/dist/lib/node-esm/chunk-YJ4KVBWC.mjs","kind":"import-statement"},{"path":"packages/sdk/observability/dist/lib/node-esm/chunk-CMDADTM3.mjs","kind":"import-statement"}],"exports":["addBreadcrumb","captureException","captureMessage","captureUserFeedback","init","setTag","setTags","setUser","withScope"],"entryPoint":"packages/sdk/observability/src/sentry/index.ts","inputs":{},"bytes":472},"packages/sdk/observability/dist/lib/node-esm/chunk-YJ4KVBWC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/observability/dist/lib/node-esm/chunk-YJ4KVBWC.mjs":{"imports":[],"exports":[],"inputs":{"packages/sdk/observability/src/sentry/index.ts":{"bytesInOutput":0}},"bytes":136},"packages/sdk/observability/dist/lib/node-esm/otel-YI7HAFOG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17170},"packages/sdk/observability/dist/lib/node-esm/otel-YI7HAFOG.mjs":{"imports":[{"path":"@opentelemetry/api","kind":"import-statement","external":true},{"path":"@opentelemetry/api-logs","kind":"import-statement","external":true},{"path":"@opentelemetry/exporter-logs-otlp-http","kind":"import-statement","external":true},{"path":"@opentelemetry/resources","kind":"import-statement","external":true},{"path":"@opentelemetry/sdk-logs","kind":"import-statement","external":true},{"path":"@opentelemetry/semantic-conventions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@opentelemetry/exporter-metrics-otlp-http","kind":"import-statement","external":true},{"path":"@opentelemetry/resources","kind":"import-statement","external":true},{"path":"@opentelemetry/sdk-metrics","kind":"import-statement","external":true},{"path":"@opentelemetry/semantic-conventions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@opentelemetry/api","kind":"import-statement","external":true},{"path":"@opentelemetry/exporter-trace-otlp-http","kind":"import-statement","external":true},{"path":"@opentelemetry/resources","kind":"import-statement","external":true},{"path":"@opentelemetry/sdk-trace-base","kind":"import-statement","external":true},{"path":"@opentelemetry/semantic-conventions","kind":"import-statement","external":true},{"path":"debug","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true}],"exports":["OtelLogs","OtelMetrics","OtelTraces","setDiagLogger"],"entryPoint":"packages/sdk/observability/src/otel/index.ts","inputs":{"packages/sdk/observability/src/otel/otel.ts":{"bytesInOutput":229},"packages/sdk/observability/src/otel/index.ts":{"bytesInOutput":0},"packages/sdk/observability/src/otel/logs.ts":{"bytesInOutput":2362},"packages/sdk/observability/src/otel/metrics.ts":{"bytesInOutput":3528},"packages/sdk/observability/src/otel/traces.ts":{"bytesInOutput":1698}},"bytes":8218},"packages/sdk/observability/dist/lib/node-esm/sentry-log-processor-JYJH3AMG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9375},"packages/sdk/observability/dist/lib/node-esm/sentry-log-processor-JYJH3AMG.mjs":{"imports":[{"path":"packages/sdk/observability/dist/lib/node-esm/chunk-CMDADTM3.mjs","kind":"import-statement"},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["SentryLogProcessor"],"entryPoint":"packages/sdk/observability/src/sentry/sentry-log-processor.ts","inputs":{"packages/sdk/observability/src/sentry/sentry-log-processor.ts":{"bytesInOutput":4262}},"bytes":4602},"packages/sdk/observability/dist/lib/node-esm/chunk-CMDADTM3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6692},"packages/sdk/observability/dist/lib/node-esm/chunk-CMDADTM3.mjs":{"imports":[{"path":"@sentry/node","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/tracing","kind":"import-statement","external":true},{"path":"@sentry/node","kind":"import-statement","external":true}],"exports":["addBreadcrumb","captureException","captureMessage","captureUserFeedback","init","setTag","setTags","setUser","withScope"],"inputs":{"packages/sdk/observability/src/sentry/node.ts":{"bytesInOutput":3389}},"bytes":3729},"packages/sdk/observability/dist/lib/node-esm/observability-QJFZLUL4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/observability/dist/lib/node-esm/observability-QJFZLUL4.mjs":{"imports":[{"path":"packages/sdk/observability/dist/lib/node-esm/chunk-BHETLWXO.mjs","kind":"import-statement"}],"exports":["Observability"],"entryPoint":"packages/sdk/observability/src/observability.ts","inputs":{},"bytes":228},"packages/sdk/observability/dist/lib/node-esm/chunk-BHETLWXO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":62331},"packages/sdk/observability/dist/lib/node-esm/chunk-BHETLWXO.mjs":{"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/network-manager","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"localforage","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/sdk/observability/dist/lib/node-esm/observability-QJFZLUL4.mjs","kind":"dynamic-import"},{"path":"js-yaml","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"uuid","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/sdk/observability/dist/lib/node-esm/otel-YI7HAFOG.mjs","kind":"dynamic-import"},{"path":"packages/sdk/observability/dist/lib/node-esm/segment/index.mjs","kind":"dynamic-import"},{"path":"packages/sdk/observability/dist/lib/node-esm/sentry/index.mjs","kind":"dynamic-import"},{"path":"packages/sdk/observability/dist/lib/node-esm/sentry-log-processor-JYJH3AMG.mjs","kind":"dynamic-import"},{"path":"packages/sdk/observability/dist/lib/node-esm/otel-YI7HAFOG.mjs","kind":"dynamic-import"},{"path":"packages/sdk/observability/dist/lib/node-esm/otel-YI7HAFOG.mjs","kind":"dynamic-import"}],"exports":["OBSERVABILITY_DISABLED_KEY","OBSERVABILITY_GROUP_KEY","Observability","getObservabilityGroup","getObservabilityState","getTelemetryIdentifier","initializeAppObservability","initializeNodeObservability","isObservabilityDisabled","mapSpaces","setupTelemetryListeners","showObservabilityBanner","storeObservabilityDisabled","storeObservabilityGroup"],"inputs":{"packages/sdk/observability/src/observability.ts":{"bytesInOutput":18654},"packages/sdk/observability/src/cli-observability-secrets.json":{"bytesInOutput":348},"packages/sdk/observability/src/helpers/browser-observability.ts":{"bytesInOutput":4808},"packages/sdk/observability/src/helpers/index.ts":{"bytesInOutput":0},"packages/sdk/observability/src/helpers/common.ts":{"bytesInOutput":229},"packages/sdk/observability/src/helpers/node-observability.ts":{"bytesInOutput":3415},"packages/sdk/observability/src/helpers/map-spaces.ts":{"bytesInOutput":1192},"packages/sdk/observability/src/helpers/setup-telemetry-listeners.ts":{"bytesInOutput":2657}},"bytes":32298}}}
@@ -0,0 +1,8 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ Observability
4
+ } from "./chunk-BHETLWXO.mjs";
5
+ export {
6
+ Observability
7
+ };
8
+ //# sourceMappingURL=observability-QJFZLUL4.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }