@dxos/observability 0.4.4 → 0.4.5-main.2d76d4e
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/dist/lib/browser/{chunk-GMA3VEXB.mjs → chunk-FWGZ42PL.mjs} +32 -27
- package/dist/lib/browser/chunk-FWGZ42PL.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/observability-OXPW6W3U.mjs +7 -0
- package/dist/lib/node/{chunk-OGELP3WQ.cjs → chunk-2DD5QAAE.cjs} +35 -30
- package/dist/lib/node/chunk-2DD5QAAE.cjs.map +7 -0
- package/dist/lib/node/datadog/index.cjs +1 -1
- package/dist/lib/node/datadog/index.cjs.map +3 -3
- package/dist/lib/node/index.cjs +15 -15
- package/dist/lib/node/index.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{observability-53WZ5VOC.cjs → observability-3XEBF5HP.cjs} +6 -6
- package/dist/lib/node/{observability-53WZ5VOC.cjs.map → observability-3XEBF5HP.cjs.map} +2 -2
- package/dist/lib/node/segment/index.cjs +4 -1
- package/dist/lib/node/segment/index.cjs.map +3 -3
- package/dist/types/src/datadog/metrics.d.ts +1 -0
- package/dist/types/src/datadog/metrics.d.ts.map +1 -1
- package/dist/types/src/datadog/metrics.js +1 -1
- package/dist/types/src/datadog/metrics.js.map +1 -1
- package/dist/types/src/helpers/browser-observability.d.ts.map +1 -1
- package/dist/types/src/helpers/browser-observability.js +2 -0
- package/dist/types/src/helpers/browser-observability.js.map +1 -1
- package/dist/types/src/helpers/node-observability.d.ts +2 -12
- package/dist/types/src/helpers/node-observability.d.ts.map +1 -1
- package/dist/types/src/helpers/node-observability.js +8 -3
- package/dist/types/src/helpers/node-observability.js.map +1 -1
- package/dist/types/src/observability.d.ts +3 -1
- package/dist/types/src/observability.d.ts.map +1 -1
- package/dist/types/src/observability.js +4 -4
- package/dist/types/src/observability.js.map +1 -1
- package/dist/types/src/segment/node.js +1 -1
- package/dist/types/src/segment/node.js.map +1 -1
- package/package.json +14 -14
- package/src/datadog/metrics.ts +2 -2
- package/src/helpers/browser-observability.ts +2 -0
- package/src/helpers/node-observability.ts +8 -14
- package/src/observability.ts +16 -5
- package/src/segment/node.ts +1 -1
- package/dist/lib/browser/chunk-GMA3VEXB.mjs.map +0 -7
- package/dist/lib/browser/observability-S4PVKC2P.mjs +0 -7
- package/dist/lib/node/chunk-OGELP3WQ.cjs.map +0 -7
- /package/dist/lib/browser/{observability-S4PVKC2P.mjs.map → observability-OXPW6W3U.mjs.map} +0 -0
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_2DD5QAAE_exports = {};
|
|
30
|
+
__export(chunk_2DD5QAAE_exports, {
|
|
31
31
|
OBSERVABILITY_DISABLED_KEY: () => OBSERVABILITY_DISABLED_KEY,
|
|
32
32
|
OBSERVABILITY_GROUP_KEY: () => OBSERVABILITY_GROUP_KEY,
|
|
33
33
|
Observability: () => Observability,
|
|
@@ -43,7 +43,7 @@ __export(chunk_OGELP3WQ_exports, {
|
|
|
43
43
|
storeObservabilityDisabled: () => storeObservabilityDisabled,
|
|
44
44
|
storeObservabilityGroup: () => storeObservabilityGroup
|
|
45
45
|
});
|
|
46
|
-
module.exports = __toCommonJS(
|
|
46
|
+
module.exports = __toCommonJS(chunk_2DD5QAAE_exports);
|
|
47
47
|
var import_async = require("@dxos/async");
|
|
48
48
|
var import_context = require("@dxos/context");
|
|
49
49
|
var import_invariant = require("@dxos/invariant");
|
|
@@ -131,9 +131,11 @@ var initializeAppObservability = async ({ namespace, config, mode = "basic", tra
|
|
|
131
131
|
const release = `${namespace}@${config.get("runtime.app.build.version")}`;
|
|
132
132
|
const environment = config.get("runtime.app.env.DX_ENVIRONMENT");
|
|
133
133
|
const observabilityDisabled = await isObservabilityDisabled(namespace);
|
|
134
|
-
const { Observability: Observability2 } = await import("./observability-
|
|
134
|
+
const { Observability: Observability2 } = await import("./observability-3XEBF5HP.cjs");
|
|
135
135
|
const observability = new Observability2({
|
|
136
136
|
namespace,
|
|
137
|
+
release,
|
|
138
|
+
environment,
|
|
137
139
|
group,
|
|
138
140
|
mode,
|
|
139
141
|
config,
|
|
@@ -154,7 +156,7 @@ var initializeAppObservability = async ({ namespace, config, mode = "basic", tra
|
|
|
154
156
|
observability.setMode("disabled");
|
|
155
157
|
import_log2.log.info("observability disabled", void 0, {
|
|
156
158
|
F: __dxlog_file,
|
|
157
|
-
L:
|
|
159
|
+
L: 115,
|
|
158
160
|
S: void 0,
|
|
159
161
|
C: (f, a) => f(...a)
|
|
160
162
|
});
|
|
@@ -190,7 +192,7 @@ var initializeAppObservability = async ({ namespace, config, mode = "basic", tra
|
|
|
190
192
|
} catch (error) {
|
|
191
193
|
import_log2.log.warn("Failed to run estimate()", error, {
|
|
192
194
|
F: __dxlog_file,
|
|
193
|
-
L:
|
|
195
|
+
L: 170,
|
|
194
196
|
S: void 0,
|
|
195
197
|
C: (f, a) => f(...a)
|
|
196
198
|
});
|
|
@@ -200,7 +202,7 @@ var initializeAppObservability = async ({ namespace, config, mode = "basic", tra
|
|
|
200
202
|
} catch (err) {
|
|
201
203
|
import_log2.log.error("Failed to initialize app observability", err, {
|
|
202
204
|
F: __dxlog_file,
|
|
203
|
-
L:
|
|
205
|
+
L: 175,
|
|
204
206
|
S: void 0,
|
|
205
207
|
C: (f, a) => f(...a)
|
|
206
208
|
});
|
|
@@ -264,19 +266,21 @@ var validate = (contextString) => {
|
|
|
264
266
|
};
|
|
265
267
|
}
|
|
266
268
|
};
|
|
267
|
-
var initializeNodeObservability = async ({ namespace, config, installationId, group, mode = "basic", tracingEnable = true, replayEnable = true }) => {
|
|
269
|
+
var initializeNodeObservability = async ({ namespace, version, config, installationId, group, mode = "basic", tracingEnable = true, replayEnable = true }) => {
|
|
268
270
|
(0, import_log3.log)("initializeCliObservability", {
|
|
269
271
|
config
|
|
270
272
|
}, {
|
|
271
273
|
F: __dxlog_file2,
|
|
272
|
-
L:
|
|
274
|
+
L: 110,
|
|
273
275
|
S: void 0,
|
|
274
276
|
C: (f, a) => f(...a)
|
|
275
277
|
});
|
|
276
|
-
const release = `${namespace}@${
|
|
277
|
-
const environment =
|
|
278
|
+
const release = `${namespace}@${version}`;
|
|
279
|
+
const environment = process.env.DX_ENVIRONMENT ?? "unknown";
|
|
278
280
|
const observability = new Observability({
|
|
279
281
|
namespace,
|
|
282
|
+
release,
|
|
283
|
+
environment,
|
|
280
284
|
group,
|
|
281
285
|
mode,
|
|
282
286
|
errorLog: {
|
|
@@ -409,7 +413,7 @@ var SPACE_METRICS_MIN_INTERVAL = 1e3 * 60;
|
|
|
409
413
|
var DATADOG_IDLE_INTERVAL = 1e3 * 60 * 1;
|
|
410
414
|
var Observability = class {
|
|
411
415
|
// TODO(nf): make platform a required extension?
|
|
412
|
-
constructor({ namespace, config, secrets, group, mode, telemetry, errorLog }) {
|
|
416
|
+
constructor({ namespace, environment, release, config, secrets, group, mode, telemetry, errorLog }) {
|
|
413
417
|
this._mode = "disabled";
|
|
414
418
|
this._ctx = new import_context.Context();
|
|
415
419
|
this._tags = /* @__PURE__ */ new Map();
|
|
@@ -432,8 +436,9 @@ var Observability = class {
|
|
|
432
436
|
this.setTag("group", this._group);
|
|
433
437
|
}
|
|
434
438
|
this.setTag("namespace", this._namespace);
|
|
435
|
-
|
|
436
|
-
|
|
439
|
+
environment && this.setTag("environment", environment);
|
|
440
|
+
release && this.setTag("release", release);
|
|
441
|
+
this.setTag("mode", this._mode);
|
|
437
442
|
}
|
|
438
443
|
_loadSecrets(config, secrets) {
|
|
439
444
|
if ((0, import_util.isNode)()) {
|
|
@@ -455,7 +460,7 @@ var Observability = class {
|
|
|
455
460
|
config
|
|
456
461
|
}, {
|
|
457
462
|
F: __dxlog_file3,
|
|
458
|
-
L:
|
|
463
|
+
L: 134,
|
|
459
464
|
S: this,
|
|
460
465
|
C: (f, a) => f(...a)
|
|
461
466
|
});
|
|
@@ -517,7 +522,7 @@ var Observability = class {
|
|
|
517
522
|
idqr
|
|
518
523
|
}, {
|
|
519
524
|
F: __dxlog_file3,
|
|
520
|
-
L:
|
|
525
|
+
L: 206,
|
|
521
526
|
S: this,
|
|
522
527
|
C: (f, a) => f(...a)
|
|
523
528
|
});
|
|
@@ -531,7 +536,7 @@ var Observability = class {
|
|
|
531
536
|
device: dqr
|
|
532
537
|
}, {
|
|
533
538
|
F: __dxlog_file3,
|
|
534
|
-
L:
|
|
539
|
+
L: 215,
|
|
535
540
|
S: this,
|
|
536
541
|
C: (f, a) => f(...a)
|
|
537
542
|
});
|
|
@@ -539,7 +544,7 @@ var Observability = class {
|
|
|
539
544
|
}
|
|
540
545
|
(0, import_invariant.invariant)(dqr, "empty response from device service", {
|
|
541
546
|
F: __dxlog_file3,
|
|
542
|
-
L:
|
|
547
|
+
L: 218,
|
|
543
548
|
S: this,
|
|
544
549
|
A: [
|
|
545
550
|
"dqr",
|
|
@@ -552,7 +557,7 @@ var Observability = class {
|
|
|
552
557
|
device: dqr
|
|
553
558
|
}, {
|
|
554
559
|
F: __dxlog_file3,
|
|
555
|
-
L:
|
|
560
|
+
L: 222,
|
|
556
561
|
S: this,
|
|
557
562
|
C: (f, a) => f(...a)
|
|
558
563
|
});
|
|
@@ -584,7 +589,7 @@ var Observability = class {
|
|
|
584
589
|
} else {
|
|
585
590
|
(0, import_log.log)("datadog disabled", void 0, {
|
|
586
591
|
F: __dxlog_file3,
|
|
587
|
-
L:
|
|
592
|
+
L: 253,
|
|
588
593
|
S: this,
|
|
589
594
|
C: (f, a) => f(...a)
|
|
590
595
|
});
|
|
@@ -604,7 +609,7 @@ var Observability = class {
|
|
|
604
609
|
updateSignalMetrics.on(this._ctx, async (networkStatus) => {
|
|
605
610
|
(0, import_log.log)("send signal metrics", void 0, {
|
|
606
611
|
F: __dxlog_file3,
|
|
607
|
-
L:
|
|
612
|
+
L: 273,
|
|
608
613
|
S: this,
|
|
609
614
|
C: (f, a) => f(...a)
|
|
610
615
|
});
|
|
@@ -654,7 +659,7 @@ var Observability = class {
|
|
|
654
659
|
updateSpaceMetrics.on(this._ctx, async () => {
|
|
655
660
|
(0, import_log.log)("send space update", void 0, {
|
|
656
661
|
F: __dxlog_file3,
|
|
657
|
-
L:
|
|
662
|
+
L: 325,
|
|
658
663
|
S: this,
|
|
659
664
|
C: (f, a) => f(...a)
|
|
660
665
|
});
|
|
@@ -701,7 +706,7 @@ var Observability = class {
|
|
|
701
706
|
const platform = await client.services.services.SystemService?.getPlatform();
|
|
702
707
|
(0, import_invariant.invariant)(platform, "platform is required", {
|
|
703
708
|
F: __dxlog_file3,
|
|
704
|
-
L:
|
|
709
|
+
L: 368,
|
|
705
710
|
S: this,
|
|
706
711
|
A: [
|
|
707
712
|
"platform",
|
|
@@ -723,7 +728,7 @@ var Observability = class {
|
|
|
723
728
|
(0, import_async.scheduleTaskInterval)(this._ctx, async () => {
|
|
724
729
|
(0, import_log.log)("platform", void 0, {
|
|
725
730
|
F: __dxlog_file3,
|
|
726
|
-
L:
|
|
731
|
+
L: 386,
|
|
727
732
|
S: this,
|
|
728
733
|
C: (f, a) => f(...a)
|
|
729
734
|
});
|
|
@@ -732,7 +737,7 @@ var Observability = class {
|
|
|
732
737
|
platform: platform2
|
|
733
738
|
}, {
|
|
734
739
|
F: __dxlog_file3,
|
|
735
|
-
L:
|
|
740
|
+
L: 389,
|
|
736
741
|
S: this,
|
|
737
742
|
C: (f, a) => f(...a)
|
|
738
743
|
});
|
|
@@ -745,7 +750,7 @@ var Observability = class {
|
|
|
745
750
|
error
|
|
746
751
|
}, {
|
|
747
752
|
F: __dxlog_file3,
|
|
748
|
-
L:
|
|
753
|
+
L: 396,
|
|
749
754
|
S: this,
|
|
750
755
|
C: (f, a) => f(...a)
|
|
751
756
|
}));
|
|
@@ -770,7 +775,7 @@ var Observability = class {
|
|
|
770
775
|
} else {
|
|
771
776
|
(0, import_log.log)("segment disabled", void 0, {
|
|
772
777
|
F: __dxlog_file3,
|
|
773
|
-
L:
|
|
778
|
+
L: 422,
|
|
774
779
|
S: this,
|
|
775
780
|
C: (f, a) => f(...a)
|
|
776
781
|
});
|
|
@@ -805,7 +810,7 @@ var Observability = class {
|
|
|
805
810
|
options: this._errorReportingOptions
|
|
806
811
|
}, {
|
|
807
812
|
F: __dxlog_file3,
|
|
808
|
-
L:
|
|
813
|
+
L: 455,
|
|
809
814
|
S: this,
|
|
810
815
|
C: (f, a) => f(...a)
|
|
811
816
|
});
|
|
@@ -828,7 +833,7 @@ var Observability = class {
|
|
|
828
833
|
} else {
|
|
829
834
|
(0, import_log.log)("sentry disabled", void 0, {
|
|
830
835
|
F: __dxlog_file3,
|
|
831
|
-
L:
|
|
836
|
+
L: 478,
|
|
832
837
|
S: this,
|
|
833
838
|
C: (f, a) => f(...a)
|
|
834
839
|
});
|
|
@@ -862,4 +867,4 @@ var Observability = class {
|
|
|
862
867
|
storeObservabilityDisabled,
|
|
863
868
|
storeObservabilityGroup
|
|
864
869
|
});
|
|
865
|
-
//# sourceMappingURL=chunk-
|
|
870
|
+
//# sourceMappingURL=chunk-2DD5QAAE.cjs.map
|
|
@@ -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 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 DatadogMetrics } from './datadog';\nimport { type IPData, getTelemetryIdentifier, mapSpaces } from './helpers';\nimport { type SegmentTelemetry, type EventOptions, type PageOptions } from './segment';\nimport { type InitOptions, type captureException as SentryCaptureException } from './sentry';\n\nconst SPACE_METRICS_MIN_INTERVAL = 1000 * 60;\n// const DATADOG_IDLE_INTERVAL = 1000 * 60 * 5;\nconst DATADOG_IDLE_INTERVAL = 1000 * 60 * 1;\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 DATADOG_API_KEY: string | null;\n DATADOG_APP_KEY: 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 // 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 mode?: Mode;\n\n telemetry?: {\n batchSize?: number;\n };\n\n errorLog?: {\n sentryInitOptions?: InitOptions;\n logProcessor?: boolean;\n };\n};\n\n/*\n * Observability provides a common interface for error logging, metrics, and telemetry.\n * It currently provides these capabilities using Sentry, Datadog, and Segment.\n */\nexport class Observability {\n // TODO(wittjosiah): Generic metrics interface.\n private _metrics?: DatadogMetrics;\n // TODO(wittjosiah): Generic telemetry interface.\n private _telemetryBatchSize: number;\n private _telemetry?: SegmentTelemetry;\n // TODO(wittjosiah): Generic error logging interface.\n private _errorReportingOptions?: InitOptions;\n private _errorLogProcessor: boolean;\n private _captureException?: typeof SentryCaptureException;\n private _setTag?: (key: string, value: string) => void;\n\n private _secrets: ObservabilitySecrets;\n private _namespace: string;\n private _config?: Config;\n private _mode: Mode = 'disabled';\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\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._config = config;\n this._mode = mode ?? 'disabled';\n this._group = group;\n this._secrets = this._loadSecrets(config, secrets);\n this._telemetryBatchSize = telemetry?.batchSize ?? 30;\n this._errorReportingOptions = errorLog?.sentryInitOptions;\n this._errorLogProcessor = errorLog?.logProcessor ?? false;\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 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 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.DATADOG_API_KEY && (mergedSecrets.DATADOG_API_KEY = process.env.DATADOG_API_KEY);\n process.env.DATADOG_APP_KEY && (mergedSecrets.DATADOG_APP_KEY = process.env.DATADOG_APP_KEY);\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 DATADOG_API_KEY: config?.get('runtime.app.env.DX_DATADOG_API_KEY'),\n DATADOG_APP_KEY: config?.get('runtime.app.env.DX_DATADOG_APP_KEY'),\n ...secrets,\n };\n }\n }\n\n async initialize() {\n await this._initMetrics();\n await this._initTelemetry();\n await this._initErrorLogs();\n }\n\n async close() {\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 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 //\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(client: Client) {\n client.services.services.IdentityService!.queryIdentity().subscribe((idqr) => {\n if (!idqr?.identity?.identityKey) {\n log('empty response from identity service', { idqr });\n return;\n }\n\n this.setTag('identityKey', idqr.identity.identityKey.truncate());\n });\n\n client.services.services.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 // Metrics\n //\n\n private async _initMetrics() {\n if (this.enabled && this._secrets.DATADOG_API_KEY) {\n const { DatadogMetrics } = await import('./datadog');\n this._metrics = new DatadogMetrics({\n apiKey: this._secrets.DATADOG_API_KEY,\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 // TODO(nf): move/refactor from telementryContext, needed to read CORS proxy\n config: this._config!,\n });\n } else {\n log('datadog disabled');\n }\n }\n\n /**\n * Gauge metric.\n *\n * The default implementation uses Datadog.\n */\n gauge(name: string, value: number | any, extraTags?: any) {\n this._metrics?.gauge(name, value, extraTags);\n }\n\n // TODO(nf): Refactor into ObservabilityExtensions.\n\n startNetworkMetrics(client: Client) {\n const updateSignalMetrics = new Event<NetworkStatus>();\n\n // const lcsh = (csp as LocalClientServices).host;\n updateSignalMetrics.on(this._ctx, async (networkStatus) => {\n log('send signal metrics');\n (networkStatus.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 networkStatus.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('dxox.client.network.totalReadBufferSize', totalReadBufferSize);\n this.gauge('dxos.client.network.totalWriteBufferSize', totalWriteBufferSize);\n this.gauge('dxos.client.network.totalChannelBufferSize', totalChannelBufferSize);\n });\n });\n\n client.services.services.NetworkService?.queryStatus().subscribe((networkStatus) => {\n updateSignalMetrics.emit(networkStatus);\n });\n\n // scheduleTaskInterval(ctx, async () => updateSignalMetrics.emit(), DATADOG_IDLE_INTERVAL);\n }\n\n startSpacesMetrics(client: Client, namespace: string) {\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 update');\n for (const data of mapSpaces(spaces, { truncateKeys: true })) {\n // Metrics\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 // Telemetry\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 },\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(), DATADOG_IDLE_INTERVAL);\n }\n\n async startRuntimeMetrics(client: Client, frequency: number = DATADOG_IDLE_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 scheduleTaskInterval(\n this._ctx,\n async () => {\n log('platform');\n client.services.services.SystemService?.getPlatform()\n .then((platform) => {\n log('platform', { platform });\n if (platform.memory) {\n this.gauge('dxos.client.runtime.rss', platform.memory.rss);\n this.gauge('dxos.client.runtime.heapTotal', platform.memory.heapTotal);\n this.gauge('dxos.client.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, enableSentryLogProcessor, configureTracing, init, setTag } = await import('./sentry');\n this._captureException = captureException;\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 init({\n ...this._errorReportingOptions,\n destination: this._secrets.SENTRY_DESTINATION,\n scrubFilenames: this._mode !== 'full',\n });\n if (this._errorReportingOptions?.tracing) {\n configureTracing();\n }\n // TODO(nf): set platform at instantiation? needed for node.\n if (this._errorLogProcessor) {\n enableSentryLogProcessor();\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\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 \"SENTRY_DESTINATION\": \"https://2647916221e643869965e78469479aa4@o4504012000067584.ingest.sentry.io/4504012027265029\",\n \"TELEMETRY_API_KEY\": \"B00QG6PtJJrJ0VVFe0H5a6bcUUShKyZM\",\n \"IPDATA_API_KEY\": \"73dfdecdf979c18f07d50cf841bbdd9e589f237256326ac8cca23786\",\n \"DATADOG_API_KEY\": null,\n \"DATADOG_APP_KEY\": 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\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 logProcessor: true,\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.query().objects.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: any) => {\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.path 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,mBAA4C;AAG5C,qBAAwB;AACxB,uBAA0B;AAC1B,iBAAoB;AACpB,6BAAgC;AAChC,sBAAyD;AACzD,kBAAuB;AEPvB,kBAA6B;AAM7B,IAAAA,cAAoB;AERpB,qBAAiB;AACjB,qBAAqC;AACrC,sBAA2C;AAC3C,uBAAqB;AACrB,kBAAqD;AAGrD,IAAAA,cAAoB;AHVpB,IAAA,oCAAA;EACE,oBAAsB;EACtB,mBAAqB;EACrB,gBAAkB;EAClB,iBAAmB;EACnB,iBAAmB;AACrB;;ACUO,IAAMC,6BAA6B;AACnC,IAAMC,0BAA0B;AAEhC,IAAMC,0BAA0B,OAAOC,cAAAA;AAC5C,MAAI;AACF,WAAQ,MAAkBC,YAAAA,QAAQ,GAAGD,SAAAA,IAAaH,0BAAAA,EAA4B,MAAO;EACvF,SAASK,KAAK;AACZC,oBAAIC,MAAM,gEAAgEF,KAAAA;;;;;;AAC1E,WAAO;EACT;AACF;AAEO,IAAMG,6BAA6B,OAAOL,WAAmBM,UAAAA;AAClE,MAAI;AACF,UAAkBC,YAAAA,QAAQ,GAAGP,SAAAA,IAAaH,0BAAAA,IAA8BW,OAAOF,KAAAA,CAAAA;EACjF,SAASJ,KAAK;AACZC,oBAAIC,MAAM,0CAA0CF,KAAAA;;;;;;EACtD;AACF;AAEO,IAAMO,wBAAwB,OAAOT,cAAAA;AAC1C,MAAI;AACF,WAAQ,MAAkBC,YAAAA,QAAQ,GAAGD,SAAAA,IAAaF,uBAAAA,EAAyB,KAAMY;EACnF,SAASR,KAAK;AACZC,oBAAIC,MAAM,qCAAqCF,KAAAA;;;;;;EACjD;AACF;AAEO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
|
+
"names": ["import_log", "OBSERVABILITY_DISABLED_KEY", "OBSERVABILITY_GROUP_KEY", "isObservabilityDisabled", "namespace", "getItem", "err", "log", "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", "ipData", "addIPDataTelemetryTags", "navigator", "storage", "estimate", "setInterval", "storageEstimate", "usage", "setTag", "toString", "quota", "error", "warn", "getTelemetryIdentifier", "client", "initialized", "identity", "halo", "identityKey", "truncate", "showObservabilityBanner", "configDir", "bannercb", "path", "join", "existsSync", "writeFile", "getObservabilityState", "statSync", "isDirectory", "Error", "mkdir", "recursive", "idPath", "context", "readFile", "validate", "initializeState", "observabilityState", "installationId", "uuid", "process", "env", "DX_OBSERVABILITY_GROUP", "DX_DISABLE_OBSERVABILITY", "DX_OBSERVABILITY_MODE", "yaml", "dump", "contextString", "load", "Boolean", "validateUuid", "initializeNodeObservability", "version", "DX_ENVIRONMENT", "logProcessor", "mapSpaces", "spaces", "options", "verbose", "truncateKeys", "map", "space", "open", "ready", "internal", "metrics", "startup", "getTime", "pipeline", "startDataMutations", "currentEpoch", "subject", "assertion", "timeframe", "totalMessages", "epoch", "number", "currentDataMutations", "currentDataTimeframe", "totalDataMutations", "targetDataTimeframe", "key", "isOpen", "members", "length", "objects", "db", "query", "progress", "Math", "min", "abs", "toFixed", "lastFocusEvent", "totalTime", "setupTelemetryListeners", "clickCallback", "event", "setTimeout", "identityId", "name", "properties", "href", "window", "location", "id", "target", "filter", "el", "tagName", "toLowerCase", "reverse", "focusCallback", "timeAway", "blurCallback", "timeSpent", "unloadCallback", "errorCallback", "message", "filename", "stack", "addEventListener", "removeEventListener", "SPACE_METRICS_MIN_INTERVAL", "DATADOG_IDLE_INTERVAL", "constructor", "secrets", "telemetry", "_mode", "Context", "_tags", "Map", "city", "region", "country", "latitude", "longitude", "_namespace", "_config", "_group", "_secrets", "_loadSecrets", "_telemetryBatchSize", "batchSize", "_errorReportingOptions", "_errorLogProcessor", "isNode", "mergedSecrets", "buildSecrets", "DX_RELEASE", "SENTRY_DESTINATION", "TELEMETRY_API_KEY", "DATADOG_API_KEY", "DATADOG_APP_KEY", "rtc", "_initMetrics", "_initTelemetry", "_initErrorLogs", "close", "_ctx", "dispose", "enabled", "scope", "_setTag", "set", "getTag", "setIdentityTags", "services", "IdentityService", "queryIdentity", "subscribe", "idqr", "DevicesService", "queryDevices", "dqr", "devices", "device", "invariant", "thisDevice", "find", "kind", "DeviceKind", "CURRENT", "deviceKey", "profile", "label", "DatadogMetrics", "_metrics", "apiKey", "getTags", "Object", "fromEntries", "Array", "from", "gauge", "extraTags", "startNetworkMetrics", "updateSignalMetrics", "Event", "on", "networkStatus", "signaling", "forEach", "server", "state", "swarmCount", "connectionStates", "ConnectionState", "totalReadBufferSize", "totalWriteBufferSize", "totalChannelBufferSize", "connectionInfo", "conn", "connections", "readBufferSize", "writeBufferSize", "stream", "streams", "NetworkService", "queryStatus", "emit", "startSpacesMetrics", "subscriptions", "onDispose", "subscription", "unsubscribe", "updateSpaceMetrics", "debounce", "subscribeToSpaceUpdate", "next", "toHex", "has", "scheduleTaskInterval", "startRuntimeMetrics", "frequency", "platform", "SystemService", "getPlatform", "Platform", "PLATFORM_TYPE", "type", "arch", "runtime", "memory", "rss", "heapTotal", "heapUsed", "SegmentTelemetry", "_telemetry", "page", "enableSentryLogProcessor", "configureTracing", "init", "_captureException", "dest", "destination", "scrubFilenames", "v", "k"]
|
|
7
|
+
}
|
|
@@ -56,11 +56,11 @@ var defaultOptions = ({ apiKey, host }) => {
|
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/observability/src/datadog/metrics.ts";
|
|
59
|
-
import_debug.default.enable("metrics");
|
|
60
59
|
var DatadogMetrics = class {
|
|
61
60
|
constructor(options) {
|
|
62
61
|
this._getTags = options.getTags;
|
|
63
62
|
this._datadogmetrics = Datadog;
|
|
63
|
+
import_debug.default && import_debug.default.enable("metrics");
|
|
64
64
|
this._datadogmetrics.init(defaultOptions(options));
|
|
65
65
|
}
|
|
66
66
|
gauge(name, value, tags) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/datadog/node.ts", "../../../../src/datadog/metrics.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport os from 'node:os';\n\nimport { log } from '@dxos/log';\n\nimport { type DatadogOptions } from './metrics';\n\nexport const defaultOptions = ({ apiKey, host }: DatadogOptions) => {\n return {\n apiKey,\n host: host ?? os.hostname(),\n onError: (err: any) => {\n log.info('Datadog error', { err });\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Datadog from 'datadog-metrics';\nimport debug from 'debug';\n\nimport { type Config } from '@dxos/client';\nimport { invariant } from '@dxos/invariant';\nimport { log } from '@dxos/log';\n\nimport { defaultOptions } from './node';\n// import { tags as globalTags } from '../tags';\n\nexport type DatadogOptions = {\n apiKey: string;\n host?: string;\n site?: String;\n getTags: () => { [key: string]: string };\n // needed to read CORS proxy\n config: Config;\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,qBAAe;AAEf,iBAAoB;ACFpB,cAAyB;AACzB,mBAAkB;AAGlB,uBAA0B;AAC1B,IAAAA,cAAoB;;ADCb,IAAMC,iBAAiB,CAAC,EAAEC,QAAQC,KAAI,MAAkB;AAC7D,SAAO;IACLD;IACAC,MAAMA,QAAQC,eAAAA,QAAGC,SAAQ;IACzBC,SAAS,CAACC,QAAAA;AACRC,qBAAIC,KAAK,iBAAiB;QAAEF;MAAI,GAAA;;;;;;IAClC;EACF;AACF;;
|
|
6
|
-
"names": ["import_log", "defaultOptions", "apiKey", "host", "os", "hostname", "onError", "err", "log", "info", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport os from 'node:os';\n\nimport { log } from '@dxos/log';\n\nimport { type DatadogOptions } from './metrics';\n\nexport const defaultOptions = ({ apiKey, host }: DatadogOptions) => {\n return {\n apiKey,\n host: host ?? os.hostname(),\n onError: (err: any) => {\n log.info('Datadog error', { err });\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Datadog from 'datadog-metrics';\nimport debug from 'debug';\n\nimport { type Config } from '@dxos/client';\nimport { invariant } from '@dxos/invariant';\nimport { log } from '@dxos/log';\n\nimport { defaultOptions } from './node';\n// import { tags as globalTags } from '../tags';\n\nexport type DatadogOptions = {\n apiKey: string;\n host?: string;\n site?: String;\n getTags: () => { [key: string]: string };\n // needed to read CORS proxy\n config: Config;\n debug?: boolean;\n};\n\nexport class DatadogMetrics {\n private _datadogmetrics?: any;\n private _getTags: () => { [key: string]: string };\n\n constructor(options: DatadogOptions) {\n this._getTags = options.getTags;\n this._datadogmetrics = Datadog;\n debug && debug.enable('metrics');\n\n this._datadogmetrics.init(defaultOptions(options));\n }\n\n gauge(name: string, value: number, tags?: any) {\n invariant(this._datadogmetrics, 'Datadog not initialized');\n const mergedTags = Object.entries({ ...this._getTags(), ...tags }).map(([key, value]) => `${key}:${value}`);\n log('datadog gauge', { name, value, tags: mergedTags });\n this._datadogmetrics.gauge(name, value, mergedTags);\n }\n\n flush() {\n this._datadogmetrics.flush();\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,qBAAe;AAEf,iBAAoB;ACFpB,cAAyB;AACzB,mBAAkB;AAGlB,uBAA0B;AAC1B,IAAAA,cAAoB;;ADCb,IAAMC,iBAAiB,CAAC,EAAEC,QAAQC,KAAI,MAAkB;AAC7D,SAAO;IACLD;IACAC,MAAMA,QAAQC,eAAAA,QAAGC,SAAQ;IACzBC,SAAS,CAACC,QAAAA;AACRC,qBAAIC,KAAK,iBAAiB;QAAEF;MAAI,GAAA;;;;;;IAClC;EACF;AACF;;ACMO,IAAMG,iBAAN,MAAMA;EAIXC,YAAYC,SAAyB;AACnC,SAAKC,WAAWD,QAAQE;AACxB,SAAKC,kBAAkBC;AACvBC,iBAAAA,WAASA,aAAAA,QAAMC,OAAO,SAAA;AAEtB,SAAKH,gBAAgBI,KAAKlB,eAAeW,OAAAA,CAAAA;EAC3C;EAEAQ,MAAMC,MAAcC,OAAeC,MAAY;AAC7CC,oCAAU,KAAKT,iBAAiB,2BAAA;;;;;;;;;AAChC,UAAMU,aAAaC,OAAOC,QAAQ;MAAE,GAAG,KAAKd,SAAQ;MAAI,GAAGU;IAAK,CAAA,EAAGK,IAAI,CAAC,CAACC,KAAKP,MAAAA,MAAW,GAAGO,GAAAA,IAAOP,MAAAA,EAAO;AAC1Gd,oBAAAA,KAAI,iBAAiB;MAAEa;MAAMC;MAAOC,MAAME;IAAW,GAAA;;;;;;AACrD,SAAKV,gBAAgBK,MAAMC,MAAMC,OAAOG,UAAAA;EAC1C;EAEAK,QAAQ;AACN,SAAKf,gBAAgBe,MAAK;EAC5B;AACF;",
|
|
6
|
+
"names": ["import_log", "defaultOptions", "apiKey", "host", "os", "hostname", "onError", "err", "log", "info", "DatadogMetrics", "constructor", "options", "_getTags", "getTags", "_datadogmetrics", "Datadog", "debug", "enable", "init", "gauge", "name", "value", "tags", "invariant", "mergedTags", "Object", "entries", "map", "key", "flush"]
|
|
7
7
|
}
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -18,23 +18,23 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var node_exports = {};
|
|
20
20
|
__export(node_exports, {
|
|
21
|
-
OBSERVABILITY_DISABLED_KEY: () =>
|
|
22
|
-
OBSERVABILITY_GROUP_KEY: () =>
|
|
23
|
-
Observability: () =>
|
|
24
|
-
getObservabilityGroup: () =>
|
|
25
|
-
getObservabilityState: () =>
|
|
26
|
-
getTelemetryIdentifier: () =>
|
|
27
|
-
initializeAppObservability: () =>
|
|
28
|
-
initializeNodeObservability: () =>
|
|
29
|
-
isObservabilityDisabled: () =>
|
|
30
|
-
mapSpaces: () =>
|
|
31
|
-
setupTelemetryListeners: () =>
|
|
32
|
-
showObservabilityBanner: () =>
|
|
33
|
-
storeObservabilityDisabled: () =>
|
|
34
|
-
storeObservabilityGroup: () =>
|
|
21
|
+
OBSERVABILITY_DISABLED_KEY: () => import_chunk_2DD5QAAE.OBSERVABILITY_DISABLED_KEY,
|
|
22
|
+
OBSERVABILITY_GROUP_KEY: () => import_chunk_2DD5QAAE.OBSERVABILITY_GROUP_KEY,
|
|
23
|
+
Observability: () => import_chunk_2DD5QAAE.Observability,
|
|
24
|
+
getObservabilityGroup: () => import_chunk_2DD5QAAE.getObservabilityGroup,
|
|
25
|
+
getObservabilityState: () => import_chunk_2DD5QAAE.getObservabilityState,
|
|
26
|
+
getTelemetryIdentifier: () => import_chunk_2DD5QAAE.getTelemetryIdentifier,
|
|
27
|
+
initializeAppObservability: () => import_chunk_2DD5QAAE.initializeAppObservability,
|
|
28
|
+
initializeNodeObservability: () => import_chunk_2DD5QAAE.initializeNodeObservability,
|
|
29
|
+
isObservabilityDisabled: () => import_chunk_2DD5QAAE.isObservabilityDisabled,
|
|
30
|
+
mapSpaces: () => import_chunk_2DD5QAAE.mapSpaces,
|
|
31
|
+
setupTelemetryListeners: () => import_chunk_2DD5QAAE.setupTelemetryListeners,
|
|
32
|
+
showObservabilityBanner: () => import_chunk_2DD5QAAE.showObservabilityBanner,
|
|
33
|
+
storeObservabilityDisabled: () => import_chunk_2DD5QAAE.storeObservabilityDisabled,
|
|
34
|
+
storeObservabilityGroup: () => import_chunk_2DD5QAAE.storeObservabilityGroup
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(node_exports);
|
|
37
|
-
var
|
|
37
|
+
var import_chunk_2DD5QAAE = require("./chunk-2DD5QAAE.cjs");
|
|
38
38
|
// Annotate the CommonJS export names for ESM import in node:
|
|
39
39
|
0 && (module.exports = {
|
|
40
40
|
OBSERVABILITY_DISABLED_KEY,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["index.cjs"],
|
|
4
|
-
"sourcesContent": ["import {\n OBSERVABILITY_DISABLED_KEY,\n OBSERVABILITY_GROUP_KEY,\n Observability,\n getObservabilityGroup,\n getObservabilityState,\n getTelemetryIdentifier,\n initializeAppObservability,\n initializeNodeObservability,\n isObservabilityDisabled,\n mapSpaces,\n setupTelemetryListeners,\n showObservabilityBanner,\n storeObservabilityDisabled,\n storeObservabilityGroup\n} from \"./chunk-
|
|
4
|
+
"sourcesContent": ["import {\n OBSERVABILITY_DISABLED_KEY,\n OBSERVABILITY_GROUP_KEY,\n Observability,\n getObservabilityGroup,\n getObservabilityState,\n getTelemetryIdentifier,\n initializeAppObservability,\n initializeNodeObservability,\n isObservabilityDisabled,\n mapSpaces,\n setupTelemetryListeners,\n showObservabilityBanner,\n storeObservabilityDisabled,\n storeObservabilityGroup\n} from \"./chunk-2DD5QAAE.cjs\";\nexport {\n OBSERVABILITY_DISABLED_KEY,\n OBSERVABILITY_GROUP_KEY,\n Observability,\n getObservabilityGroup,\n getObservabilityState,\n getTelemetryIdentifier,\n initializeAppObservability,\n initializeNodeObservability,\n isObservabilityDisabled,\n mapSpaces,\n setupTelemetryListeners,\n showObservabilityBanner,\n storeObservabilityDisabled,\n storeObservabilityGroup\n};\n//# sourceMappingURL=index.cjs.map\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAeO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/lib/node/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/sdk/observability/src/datadog/node.ts":{"bytes":1685,"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/observability/src/datadog/metrics.ts":{"bytes":4585,"imports":[{"path":"datadog-metrics","kind":"import-statement","external":true},{"path":"debug","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/datadog/node.ts","kind":"import-statement","original":"./node"}],"format":"esm"},"packages/sdk/observability/src/datadog/index.ts":{"bytes":553,"imports":[{"path":"packages/sdk/observability/src/datadog/node.ts","kind":"import-statement","original":"./node"},{"path":"packages/sdk/observability/src/datadog/metrics.ts","kind":"import-statement","original":"./metrics"}],"format":"esm"},"packages/sdk/observability/src/cli-observability-secrets.json":{"bytes":315,"imports":[]},"packages/sdk/observability/src/sentry/node.ts":{"bytes":16627,"imports":[{"path":"@sentry/integrations","kind":"import-statement","external":true},{"path":"@sentry/node","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@sentry/node","kind":"import-statement","external":true},{"path":"@sentry/tracing","kind":"dynamic-import","external":true}],"format":"esm"},"packages/sdk/observability/src/sentry/types.ts":{"bytes":1037,"imports":[],"format":"esm"},"packages/sdk/observability/src/sentry/tracing.ts":{"bytes":17365,"imports":[{"path":"@sentry/browser","kind":"import-statement","external":true},{"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}],"format":"esm"},"packages/sdk/observability/src/sentry/index.ts":{"bytes":908,"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"},{"path":"packages/sdk/observability/src/sentry/tracing.ts","kind":"import-statement","original":"./tracing"}],"format":"esm"},"packages/sdk/observability/src/segment/node.ts":{"bytes":9207,"imports":[{"path":"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":1042,"imports":[],"format":"esm"},"packages/sdk/observability/src/segment/index.ts":{"bytes":547,"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/observability.ts":{"bytes":57192,"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/datadog/index.ts","kind":"dynamic-import","original":"./datadog"},{"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"}],"format":"esm"},"packages/sdk/observability/src/helpers/browser-observability.ts":{"bytes":19253,"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":2622,"imports":[],"format":"esm"},"packages/sdk/observability/src/helpers/node-observability.ts":{"bytes":14166,"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":6306,"imports":[],"format":"esm"},"packages/sdk/observability/src/helpers/setup-telemetry-listeners.ts":{"bytes":10880,"imports":[{"path":"packages/sdk/observability/src/helpers/common.ts","kind":"import-statement","original":"./common"}],"format":"esm"},"packages/sdk/observability/src/helpers/index.ts":{"bytes":930,"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":566,"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/datadog/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3008},"packages/sdk/observability/dist/lib/node/datadog/index.cjs":{"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"datadog-metrics","kind":"import-statement","external":true},{"path":"debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["DatadogMetrics","defaultOptions"],"entryPoint":"packages/sdk/observability/src/datadog/index.ts","inputs":{"packages/sdk/observability/src/datadog/node.ts":{"bytesInOutput":450},"packages/sdk/observability/src/datadog/index.ts":{"bytesInOutput":0},"packages/sdk/observability/src/datadog/metrics.ts":{"bytesInOutput":1128}},"bytes":1764},"packages/sdk/observability/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/observability/dist/lib/node/index.cjs":{"imports":[{"path":"packages/sdk/observability/dist/lib/node/chunk-OGELP3WQ.cjs","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":809},"packages/sdk/observability/dist/lib/node/segment/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3931},"packages/sdk/observability/dist/lib/node/segment/index.cjs":{"imports":[{"path":"packages/sdk/observability/dist/lib/node/chunk-FSAOBKO2.cjs","kind":"import-statement"},{"path":"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":2850},"packages/sdk/observability/src/segment/index.ts":{"bytesInOutput":0}},"bytes":3027},"packages/sdk/observability/dist/lib/node/sentry/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/observability/dist/lib/node/sentry/index.cjs":{"imports":[{"path":"packages/sdk/observability/dist/lib/node/chunk-FSAOBKO2.cjs","kind":"import-statement"}],"exports":["SENTRY_LOG_PROCESSOR","addBreadcrumb","captureException","configureTracing","enableSentryLogProcessor","init","setTag","setTags","setUser"],"entryPoint":"packages/sdk/observability/src/sentry/index.ts","inputs":{},"bytes":384},"packages/sdk/observability/dist/lib/node/chunk-FSAOBKO2.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16118},"packages/sdk/observability/dist/lib/node/chunk-FSAOBKO2.cjs":{"imports":[{"path":"@sentry/integrations","kind":"import-statement","external":true},{"path":"@sentry/node","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@sentry/node","kind":"import-statement","external":true},{"path":"@sentry/tracing","kind":"dynamic-import","external":true},{"path":"@sentry/browser","kind":"import-statement","external":true},{"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}],"exports":["SENTRY_LOG_PROCESSOR","addBreadcrumb","captureException","configureTracing","enableSentryLogProcessor","init","setTag","setTags","setUser"],"inputs":{"packages/sdk/observability/src/sentry/node.ts":{"bytesInOutput":3654},"packages/sdk/observability/src/sentry/index.ts":{"bytesInOutput":0},"packages/sdk/observability/src/sentry/tracing.ts":{"bytesInOutput":4629}},"bytes":8601},"packages/sdk/observability/dist/lib/node/observability-53WZ5VOC.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/observability/dist/lib/node/observability-53WZ5VOC.cjs":{"imports":[{"path":"packages/sdk/observability/dist/lib/node/chunk-OGELP3WQ.cjs","kind":"import-statement"}],"exports":["Observability"],"entryPoint":"packages/sdk/observability/src/observability.ts","inputs":{},"bytes":136},"packages/sdk/observability/dist/lib/node/chunk-OGELP3WQ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":54534},"packages/sdk/observability/dist/lib/node/chunk-OGELP3WQ.cjs":{"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/observability-53WZ5VOC.cjs","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/datadog/index.cjs","kind":"dynamic-import"},{"path":"packages/sdk/observability/dist/lib/node/segment/index.cjs","kind":"dynamic-import"},{"path":"packages/sdk/observability/dist/lib/node/sentry/index.cjs","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":14618},"packages/sdk/observability/src/cli-observability-secrets.json":{"bytesInOutput":347},"packages/sdk/observability/src/helpers/browser-observability.ts":{"bytesInOutput":4742},"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":3439},"packages/sdk/observability/src/helpers/map-spaces.ts":{"bytesInOutput":1177},"packages/sdk/observability/src/helpers/setup-telemetry-listeners.ts":{"bytesInOutput":2580}},"bytes":28034}}}
|
|
1
|
+
{"inputs":{"packages/sdk/observability/src/datadog/node.ts":{"bytes":1685,"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/observability/src/datadog/metrics.ts":{"bytes":4658,"imports":[{"path":"datadog-metrics","kind":"import-statement","external":true},{"path":"debug","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/datadog/node.ts","kind":"import-statement","original":"./node"}],"format":"esm"},"packages/sdk/observability/src/datadog/index.ts":{"bytes":553,"imports":[{"path":"packages/sdk/observability/src/datadog/node.ts","kind":"import-statement","original":"./node"},{"path":"packages/sdk/observability/src/datadog/metrics.ts","kind":"import-statement","original":"./metrics"}],"format":"esm"},"packages/sdk/observability/src/cli-observability-secrets.json":{"bytes":315,"imports":[]},"packages/sdk/observability/src/sentry/node.ts":{"bytes":16627,"imports":[{"path":"@sentry/integrations","kind":"import-statement","external":true},{"path":"@sentry/node","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@sentry/node","kind":"import-statement","external":true},{"path":"@sentry/tracing","kind":"dynamic-import","external":true}],"format":"esm"},"packages/sdk/observability/src/sentry/types.ts":{"bytes":1037,"imports":[],"format":"esm"},"packages/sdk/observability/src/sentry/tracing.ts":{"bytes":17365,"imports":[{"path":"@sentry/browser","kind":"import-statement","external":true},{"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}],"format":"esm"},"packages/sdk/observability/src/sentry/index.ts":{"bytes":908,"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"},{"path":"packages/sdk/observability/src/sentry/tracing.ts","kind":"import-statement","original":"./tracing"}],"format":"esm"},"packages/sdk/observability/src/segment/node.ts":{"bytes":9404,"imports":[{"path":"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":1042,"imports":[],"format":"esm"},"packages/sdk/observability/src/segment/index.ts":{"bytes":547,"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/observability.ts":{"bytes":57675,"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/datadog/index.ts","kind":"dynamic-import","original":"./datadog"},{"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"}],"format":"esm"},"packages/sdk/observability/src/helpers/browser-observability.ts":{"bytes":19351,"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":2622,"imports":[],"format":"esm"},"packages/sdk/observability/src/helpers/node-observability.ts":{"bytes":14308,"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":6306,"imports":[],"format":"esm"},"packages/sdk/observability/src/helpers/setup-telemetry-listeners.ts":{"bytes":10880,"imports":[{"path":"packages/sdk/observability/src/helpers/common.ts","kind":"import-statement","original":"./common"}],"format":"esm"},"packages/sdk/observability/src/helpers/index.ts":{"bytes":930,"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":566,"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/datadog/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3047},"packages/sdk/observability/dist/lib/node/datadog/index.cjs":{"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"datadog-metrics","kind":"import-statement","external":true},{"path":"debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["DatadogMetrics","defaultOptions"],"entryPoint":"packages/sdk/observability/src/datadog/index.ts","inputs":{"packages/sdk/observability/src/datadog/node.ts":{"bytesInOutput":450},"packages/sdk/observability/src/datadog/index.ts":{"bytesInOutput":0},"packages/sdk/observability/src/datadog/metrics.ts":{"bytesInOutput":1141}},"bytes":1777},"packages/sdk/observability/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/observability/dist/lib/node/index.cjs":{"imports":[{"path":"packages/sdk/observability/dist/lib/node/chunk-2DD5QAAE.cjs","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":809},"packages/sdk/observability/dist/lib/node/segment/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3999},"packages/sdk/observability/dist/lib/node/segment/index.cjs":{"imports":[{"path":"packages/sdk/observability/dist/lib/node/chunk-FSAOBKO2.cjs","kind":"import-statement"},{"path":"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":2911},"packages/sdk/observability/src/segment/index.ts":{"bytesInOutput":0}},"bytes":3088},"packages/sdk/observability/dist/lib/node/sentry/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/observability/dist/lib/node/sentry/index.cjs":{"imports":[{"path":"packages/sdk/observability/dist/lib/node/chunk-FSAOBKO2.cjs","kind":"import-statement"}],"exports":["SENTRY_LOG_PROCESSOR","addBreadcrumb","captureException","configureTracing","enableSentryLogProcessor","init","setTag","setTags","setUser"],"entryPoint":"packages/sdk/observability/src/sentry/index.ts","inputs":{},"bytes":384},"packages/sdk/observability/dist/lib/node/chunk-FSAOBKO2.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16118},"packages/sdk/observability/dist/lib/node/chunk-FSAOBKO2.cjs":{"imports":[{"path":"@sentry/integrations","kind":"import-statement","external":true},{"path":"@sentry/node","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@sentry/node","kind":"import-statement","external":true},{"path":"@sentry/tracing","kind":"dynamic-import","external":true},{"path":"@sentry/browser","kind":"import-statement","external":true},{"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}],"exports":["SENTRY_LOG_PROCESSOR","addBreadcrumb","captureException","configureTracing","enableSentryLogProcessor","init","setTag","setTags","setUser"],"inputs":{"packages/sdk/observability/src/sentry/node.ts":{"bytesInOutput":3654},"packages/sdk/observability/src/sentry/index.ts":{"bytesInOutput":0},"packages/sdk/observability/src/sentry/tracing.ts":{"bytesInOutput":4629}},"bytes":8601},"packages/sdk/observability/dist/lib/node/observability-3XEBF5HP.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/sdk/observability/dist/lib/node/observability-3XEBF5HP.cjs":{"imports":[{"path":"packages/sdk/observability/dist/lib/node/chunk-2DD5QAAE.cjs","kind":"import-statement"}],"exports":["Observability"],"entryPoint":"packages/sdk/observability/src/observability.ts","inputs":{},"bytes":136},"packages/sdk/observability/dist/lib/node/chunk-2DD5QAAE.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":54838},"packages/sdk/observability/dist/lib/node/chunk-2DD5QAAE.cjs":{"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/observability-3XEBF5HP.cjs","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/datadog/index.cjs","kind":"dynamic-import"},{"path":"packages/sdk/observability/dist/lib/node/segment/index.cjs","kind":"dynamic-import"},{"path":"packages/sdk/observability/dist/lib/node/sentry/index.cjs","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":14746},"packages/sdk/observability/src/cli-observability-secrets.json":{"bytesInOutput":347},"packages/sdk/observability/src/helpers/browser-observability.ts":{"bytesInOutput":4772},"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":3441},"packages/sdk/observability/src/helpers/map-spaces.ts":{"bytesInOutput":1177},"packages/sdk/observability/src/helpers/setup-telemetry-listeners.ts":{"bytesInOutput":2580}},"bytes":28194}}}
|
|
@@ -16,14 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
21
|
-
Observability: () =>
|
|
19
|
+
var observability_3XEBF5HP_exports = {};
|
|
20
|
+
__export(observability_3XEBF5HP_exports, {
|
|
21
|
+
Observability: () => import_chunk_2DD5QAAE.Observability
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(observability_3XEBF5HP_exports);
|
|
24
|
+
var import_chunk_2DD5QAAE = require("./chunk-2DD5QAAE.cjs");
|
|
25
25
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
26
|
0 && (module.exports = {
|
|
27
27
|
Observability
|
|
28
28
|
});
|
|
29
|
-
//# sourceMappingURL=observability-
|
|
29
|
+
//# sourceMappingURL=observability-3XEBF5HP.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["observability-
|
|
4
|
-
"sourcesContent": ["import {\n Observability\n} from \"./chunk-
|
|
3
|
+
"sources": ["observability-3XEBF5HP.cjs"],
|
|
4
|
+
"sourcesContent": ["import {\n Observability\n} from \"./chunk-2DD5QAAE.cjs\";\nexport {\n Observability\n};\n//# sourceMappingURL=observability-3XEBF5HP.cjs.map\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAEO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|