@dxos/observability 0.6.13 → 0.6.14-main.2b6a0f3

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 (57) hide show
  1. package/dist/lib/browser/{chunk-QUPP43SQ.mjs → chunk-4OXG76Y3.mjs} +58 -388
  2. package/dist/lib/browser/chunk-4OXG76Y3.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +323 -13
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/observability-WZNQCJ5C.mjs +7 -0
  7. package/dist/lib/node/{chunk-2ZVQBEPN.cjs → chunk-AMV7JU2O.cjs} +44 -379
  8. package/dist/lib/node/chunk-AMV7JU2O.cjs.map +7 -0
  9. package/dist/lib/node/index.cjs +340 -15
  10. package/dist/lib/node/index.cjs.map +4 -4
  11. package/dist/lib/node/meta.json +1 -1
  12. package/dist/lib/node/{observability-YPS7RMWB.cjs → observability-Y2NU446N.cjs} +6 -6
  13. package/dist/lib/node/{observability-YPS7RMWB.cjs.map → observability-Y2NU446N.cjs.map} +2 -2
  14. package/dist/lib/node-esm/chunk-CMDADTM3.mjs +133 -0
  15. package/dist/lib/node-esm/chunk-CMDADTM3.mjs.map +7 -0
  16. package/dist/lib/node-esm/chunk-D7JZEGRD.mjs +609 -0
  17. package/dist/lib/node-esm/chunk-D7JZEGRD.mjs.map +7 -0
  18. package/dist/lib/node-esm/chunk-YJ4KVBWC.mjs +2 -0
  19. package/dist/lib/node-esm/chunk-YJ4KVBWC.mjs.map +7 -0
  20. package/dist/lib/node-esm/index.mjs +344 -0
  21. package/dist/lib/node-esm/index.mjs.map +7 -0
  22. package/dist/lib/node-esm/meta.json +1 -0
  23. package/dist/lib/node-esm/observability-RAXT3Z2H.mjs +8 -0
  24. package/dist/lib/node-esm/observability-RAXT3Z2H.mjs.map +7 -0
  25. package/dist/lib/node-esm/otel-YI7HAFOG.mjs +258 -0
  26. package/dist/lib/node-esm/otel-YI7HAFOG.mjs.map +7 -0
  27. package/dist/lib/node-esm/segment/index.mjs +144 -0
  28. package/dist/lib/node-esm/segment/index.mjs.map +7 -0
  29. package/dist/lib/node-esm/sentry/index.mjs +25 -0
  30. package/dist/lib/node-esm/sentry/index.mjs.map +7 -0
  31. package/dist/lib/node-esm/sentry-log-processor-JYJH3AMG.mjs +133 -0
  32. package/dist/lib/node-esm/sentry-log-processor-JYJH3AMG.mjs.map +7 -0
  33. package/dist/types/src/observability.d.ts.map +1 -1
  34. package/dist/types/src/observability.js +2 -0
  35. package/dist/types/src/observability.js.map +1 -1
  36. package/dist/types/src/sentry/node.node.test.d.ts +2 -0
  37. package/dist/types/src/sentry/node.node.test.d.ts.map +1 -0
  38. package/dist/types/src/sentry/{node.test.js → node.node.test.js} +8 -15
  39. package/dist/types/src/sentry/node.node.test.js.map +1 -0
  40. package/dist/types/src/sentry/sentry.node.test.d.ts +2 -0
  41. package/dist/types/src/sentry/sentry.node.test.d.ts.map +1 -0
  42. package/dist/types/src/sentry/{sentry.test.js → sentry.node.test.js} +8 -15
  43. package/dist/types/src/sentry/sentry.node.test.js.map +1 -0
  44. package/package.json +22 -18
  45. package/src/observability.ts +2 -1
  46. package/src/sentry/{node.test.ts → node.node.test.ts} +2 -9
  47. package/src/sentry/{sentry.test.ts → sentry.node.test.ts} +2 -7
  48. package/dist/lib/browser/chunk-QUPP43SQ.mjs.map +0 -7
  49. package/dist/lib/browser/observability-EJU34BZA.mjs +0 -7
  50. package/dist/lib/node/chunk-2ZVQBEPN.cjs.map +0 -7
  51. package/dist/types/src/sentry/node.test.d.ts +0 -2
  52. package/dist/types/src/sentry/node.test.d.ts.map +0 -1
  53. package/dist/types/src/sentry/node.test.js.map +0 -1
  54. package/dist/types/src/sentry/sentry.test.d.ts +0 -2
  55. package/dist/types/src/sentry/sentry.test.d.ts.map +0 -1
  56. package/dist/types/src/sentry/sentry.test.js.map +0 -1
  57. /package/dist/lib/browser/{observability-EJU34BZA.mjs.map → observability-WZNQCJ5C.mjs.map} +0 -0
@@ -1,8 +1,9 @@
1
1
  // packages/sdk/observability/src/observability.ts
2
2
  import { Event, scheduleTaskInterval } from "@dxos/async";
3
+ import { PublicKey } from "@dxos/client";
3
4
  import { Context } from "@dxos/context";
4
5
  import { invariant } from "@dxos/invariant";
5
- import { log as log3 } from "@dxos/log";
6
+ import { log } from "@dxos/log";
6
7
  import { ConnectionState } from "@dxos/network-manager";
7
8
  import { DeviceKind, Platform } from "@dxos/protocols/proto/dxos/client/services";
8
9
  import { isNode } from "@dxos/util";
@@ -16,154 +17,6 @@ var cli_observability_secrets_default = {
16
17
  OTEL_AUTHORIZATION: null
17
18
  };
18
19
 
19
- // packages/sdk/observability/src/helpers/browser-observability.ts
20
- import * as localForage from "localforage";
21
- import { log } from "@dxos/log";
22
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/observability/src/helpers/browser-observability.ts";
23
- var OBSERVABILITY_DISABLED_KEY = "observability-disabled";
24
- var OBSERVABILITY_GROUP_KEY = "observability-group";
25
- var isObservabilityDisabled = async (namespace) => {
26
- try {
27
- return await localForage.getItem(`${namespace}:${OBSERVABILITY_DISABLED_KEY}`) === "true";
28
- } catch (err) {
29
- log.catch("Failed to check if observability is disabled, assuming it is", err, {
30
- F: __dxlog_file,
31
- L: 24,
32
- S: void 0,
33
- C: (f, a) => f(...a)
34
- });
35
- return true;
36
- }
37
- };
38
- var storeObservabilityDisabled = async (namespace, value) => {
39
- try {
40
- await localForage.setItem(`${namespace}:${OBSERVABILITY_DISABLED_KEY}`, String(value));
41
- } catch (err) {
42
- log.catch("Failed to store observability disabled", err, {
43
- F: __dxlog_file,
44
- L: 33,
45
- S: void 0,
46
- C: (f, a) => f(...a)
47
- });
48
- }
49
- };
50
- var getObservabilityGroup = async (namespace) => {
51
- try {
52
- return await localForage.getItem(`${namespace}:${OBSERVABILITY_GROUP_KEY}`) ?? void 0;
53
- } catch (err) {
54
- log.catch("Failed to get observability group", err, {
55
- F: __dxlog_file,
56
- L: 41,
57
- S: void 0,
58
- C: (f, a) => f(...a)
59
- });
60
- }
61
- };
62
- var storeObservabilityGroup = async (namespace, value) => {
63
- try {
64
- await localForage.setItem(`${namespace}:${OBSERVABILITY_GROUP_KEY}`, value);
65
- } catch (err) {
66
- log.catch("Failed to store observability group", err, {
67
- F: __dxlog_file,
68
- L: 49,
69
- S: void 0,
70
- C: (f, a) => f(...a)
71
- });
72
- }
73
- };
74
- var initializeAppObservability = async ({ namespace, config, mode = "basic", tracingEnable = true, replayEnable = true }) => {
75
- log("initializeAppObservability", {
76
- config
77
- }, {
78
- F: __dxlog_file,
79
- L: 72,
80
- S: void 0,
81
- C: (f, a) => f(...a)
82
- });
83
- const group = await getObservabilityGroup(namespace) ?? void 0;
84
- const release = `${namespace}@${config.get("runtime.app.build.version")}`;
85
- const environment = config.get("runtime.app.env.DX_ENVIRONMENT");
86
- const observabilityDisabled = await isObservabilityDisabled(namespace);
87
- const { Observability: Observability2 } = await import("./observability-EJU34BZA.mjs");
88
- const observability = new Observability2({
89
- namespace,
90
- release,
91
- environment,
92
- group,
93
- mode,
94
- config,
95
- errorLog: {
96
- sentryInitOptions: {
97
- environment,
98
- release,
99
- tracing: tracingEnable,
100
- replay: replayEnable,
101
- // TODO(wittjosiah): Configure these.
102
- sampleRate: 1,
103
- replaySampleRate: 0.1,
104
- replaySampleRateOnError: 1
105
- }
106
- }
107
- });
108
- if (observabilityDisabled) {
109
- observability.setMode("disabled");
110
- log.info("observability disabled", void 0, {
111
- F: __dxlog_file,
112
- L: 115,
113
- S: void 0,
114
- C: (f, a) => f(...a)
115
- });
116
- return observability;
117
- }
118
- try {
119
- const getIPData = async (config2) => {
120
- const IP_DATA_CACHE_TIMEOUT = 6 * 60 * 60 * 1e3;
121
- const cachedData = await localForage.getItem("dxos:observability:ipdata");
122
- if (cachedData && cachedData.timestamp > Date.now() - IP_DATA_CACHE_TIMEOUT) {
123
- return cachedData.data;
124
- }
125
- const IPDATA_API_KEY = config2.get("runtime.app.env.DX_IPDATA_API_KEY");
126
- if (IPDATA_API_KEY) {
127
- return fetch(`https://api.ipdata.co?api-key=${IPDATA_API_KEY}`).then((res) => res.json()).then((data) => {
128
- localForage.setItem("dxos:observability:ipdata", {
129
- data,
130
- timestamp: Date.now()
131
- }).catch((err) => observability.captureException(err));
132
- return data;
133
- }).catch((err) => observability.captureException(err));
134
- }
135
- };
136
- await observability.initialize();
137
- observability.startErrorLogs();
138
- const ipData = await getIPData(config);
139
- ipData && observability.addIPDataTelemetryTags(ipData);
140
- if (typeof navigator !== "undefined" && navigator.storage?.estimate) {
141
- setInterval(async () => {
142
- try {
143
- const storageEstimate = await navigator.storage.estimate();
144
- storageEstimate.usage && observability.setTag("storageUsage", storageEstimate.usage.toString(), "telemetry");
145
- storageEstimate.quota && observability.setTag("storageQuota", storageEstimate.quota.toString(), "telemetry");
146
- } catch (error) {
147
- log.warn("Failed to run estimate()", error, {
148
- F: __dxlog_file,
149
- L: 171,
150
- S: void 0,
151
- C: (f, a) => f(...a)
152
- });
153
- }
154
- }, 1e4);
155
- }
156
- } catch (err) {
157
- log.error("Failed to initialize app observability", err, {
158
- F: __dxlog_file,
159
- L: 176,
160
- S: void 0,
161
- C: (f, a) => f(...a)
162
- });
163
- }
164
- return observability;
165
- };
166
-
167
20
  // packages/sdk/observability/src/helpers/common.ts
168
21
  var getTelemetryIdentifier = (client) => {
169
22
  if (!client?.initialized) {
@@ -176,98 +29,6 @@ var getTelemetryIdentifier = (client) => {
176
29
  return void 0;
177
30
  };
178
31
 
179
- // packages/sdk/observability/src/helpers/node-observability.ts
180
- import yaml from "js-yaml";
181
- import { existsSync, statSync } from "@dxos/node-std/fs";
182
- import { mkdir, readFile, writeFile } from "@dxos/node-std/fs/promises";
183
- import { join } from "@dxos/node-std/path";
184
- import { v4 as uuid, validate as validateUuid } from "uuid";
185
- import { log as log2 } from "@dxos/log";
186
- var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/observability/src/helpers/node-observability.ts";
187
- var showObservabilityBanner = async (configDir, bannercb) => {
188
- const path = join(configDir, ".observability-banner-printed");
189
- if (existsSync(path)) {
190
- return;
191
- }
192
- bannercb(
193
- // eslint-disable-next-line no-multi-str
194
- "Basic observability data will be sent to the DXOS team in order to improve the product. This includes performance metrics, error logs, and usage data. No personally identifiable information, other than your public key, is included with this data and no private data ever leaves your devices. To disable sending observability data, set the environment variable DX_DISABLE_OBSERVABILITY=true."
195
- );
196
- await writeFile(path, "", "utf-8");
197
- };
198
- var getObservabilityState = async (configDir) => {
199
- if (existsSync(configDir)) {
200
- if (!statSync(configDir).isDirectory()) {
201
- throw new Error(`Config directory ${configDir} exists but is not a directory`);
202
- }
203
- } else {
204
- await mkdir(configDir, {
205
- recursive: true
206
- });
207
- }
208
- const idPath = join(configDir, "observability.yml");
209
- if (existsSync(idPath)) {
210
- const context = await readFile(idPath, "utf-8");
211
- return validate(context) ?? initializeState(idPath);
212
- }
213
- return initializeState(idPath);
214
- };
215
- var initializeState = async (idPath) => {
216
- const observabilityState = {
217
- installationId: uuid(),
218
- group: process.env.DX_OBSERVABILITY_GROUP ?? void 0,
219
- mode: process.env.DX_DISABLE_OBSERVABILITY ? "disabled" : process.env.DX_OBSERVABILITY_MODE ?? "basic"
220
- };
221
- await writeFile(idPath, "# This file is automatically generated by the @dxos/cli.\n" + yaml.dump(observabilityState), "utf-8");
222
- return observabilityState;
223
- };
224
- var validate = (contextString) => {
225
- const context = yaml.load(contextString);
226
- if (Boolean(context.installationId) && validateUuid(context.installationId)) {
227
- return {
228
- ...context,
229
- mode: process.env.DX_DISABLE_OBSERVABILITY ? "disabled" : context.mode ?? "basic"
230
- };
231
- }
232
- };
233
- var initializeNodeObservability = async ({ namespace, version, config, installationId, group, mode = "basic", tracingEnable = true, replayEnable = true }) => {
234
- log2("initializeCliObservability", {
235
- config
236
- }, {
237
- F: __dxlog_file2,
238
- L: 110,
239
- S: void 0,
240
- C: (f, a) => f(...a)
241
- });
242
- const release = `${namespace}@${version}`;
243
- const environment = process.env.DX_ENVIRONMENT ?? "unknown";
244
- const observability = new Observability({
245
- namespace,
246
- release,
247
- environment,
248
- group,
249
- mode,
250
- errorLog: {
251
- sentryInitOptions: {
252
- environment,
253
- release,
254
- // TODO(wittjosiah): Configure this.
255
- sampleRate: 1
256
- }
257
- }
258
- });
259
- observability.setTag("installationId", installationId);
260
- const IPDATA_API_KEY = config.get("runtime.app.env.DX_IPDATA_API_KEY");
261
- try {
262
- const res = await fetch(`https://api.ipdata.co/?api-key=${IPDATA_API_KEY}`);
263
- const ipData = await res.json();
264
- ipData && observability.addIPDataTelemetryTags(ipData);
265
- } catch (err) {
266
- observability?.captureException(err);
267
- }
268
- return observability;
269
- };
270
-
271
32
  // packages/sdk/observability/src/helpers/map-spaces.ts
272
33
  var mapSpaces = (spaces, options = {
273
34
  verbose: false,
@@ -299,89 +60,8 @@ var mapSpaces = (spaces, options = {
299
60
  });
300
61
  };
301
62
 
302
- // packages/sdk/observability/src/helpers/setup-telemetry-listeners.ts
303
- var lastFocusEvent = /* @__PURE__ */ new Date();
304
- var totalTime = 0;
305
- var setupTelemetryListeners = (namespace, client, observability) => {
306
- const clickCallback = (event) => {
307
- const id = event.target?.id;
308
- if (!id) {
309
- return;
310
- }
311
- setTimeout(() => observability.event({
312
- identityId: getTelemetryIdentifier(client),
313
- name: `${namespace}.window.click`,
314
- properties: {
315
- href: window.location.href,
316
- id: event.target?.id,
317
- path: event.composedPath().filter((el) => Boolean(el.tagName)).map((el) => `${el.tagName.toLowerCase()}${el.id ? `#${el.id}` : ""}`).reverse().join(">")
318
- }
319
- }));
320
- };
321
- const focusCallback = () => {
322
- const now = /* @__PURE__ */ new Date();
323
- setTimeout(() => observability.event({
324
- identityId: getTelemetryIdentifier(client),
325
- name: `${namespace}.window.focus`,
326
- properties: {
327
- href: window.location.href,
328
- timeAway: now.getTime() - lastFocusEvent.getTime()
329
- }
330
- }));
331
- lastFocusEvent = now;
332
- };
333
- const blurCallback = () => {
334
- const now = /* @__PURE__ */ new Date();
335
- const timeSpent = now.getTime() - lastFocusEvent.getTime();
336
- setTimeout(() => observability.event({
337
- identityId: getTelemetryIdentifier(client),
338
- name: `${namespace}.window.blur`,
339
- properties: {
340
- href: window.location.href,
341
- timeSpent
342
- }
343
- }));
344
- lastFocusEvent = now;
345
- totalTime = totalTime + timeSpent;
346
- };
347
- const unloadCallback = () => {
348
- setTimeout(() => observability.event({
349
- identityId: getTelemetryIdentifier(client),
350
- name: `${namespace}.page.unload`,
351
- properties: {
352
- href: window.location.href,
353
- timeSpent: totalTime
354
- }
355
- }));
356
- };
357
- const errorCallback = (event) => {
358
- setTimeout(() => observability.event({
359
- identityId: getTelemetryIdentifier(client),
360
- name: `${namespace}.window.error`,
361
- properties: {
362
- href: window.location.href,
363
- message: event.message,
364
- filename: event.filename,
365
- stack: event.error.stack
366
- }
367
- }));
368
- };
369
- window.addEventListener("click", clickCallback, true);
370
- window.addEventListener("focus", focusCallback);
371
- window.addEventListener("blur", blurCallback);
372
- window.addEventListener("beforeunload", unloadCallback);
373
- window.addEventListener("error", errorCallback);
374
- return () => {
375
- window.removeEventListener("click", clickCallback, true);
376
- window.removeEventListener("focus", focusCallback);
377
- window.removeEventListener("blur", blurCallback);
378
- window.removeEventListener("beforeunload", unloadCallback);
379
- window.removeEventListener("error", errorCallback);
380
- };
381
- };
382
-
383
63
  // packages/sdk/observability/src/observability.ts
384
- var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/observability/src/observability.ts";
64
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/observability/src/observability.ts";
385
65
  var SPACE_METRICS_MIN_INTERVAL = 1e3 * 60;
386
66
  var SPACE_TELEMETRY_MIN_INTERVAL = 1e3 * 60 * 60;
387
67
  var NETWORK_METRICS_MIN_INTERVAL = 1e3 * 60 * 5;
@@ -390,7 +70,7 @@ var Observability = class {
390
70
  constructor({ namespace, environment, release, config, secrets, group, mode, telemetry, errorLog }) {
391
71
  // TODO(nf): accept upstream context?
392
72
  this._ctx = new Context(void 0, {
393
- F: __dxlog_file3,
73
+ F: __dxlog_file,
394
74
  L: 87
395
75
  });
396
76
  this._tags = /* @__PURE__ */ new Map();
@@ -415,6 +95,7 @@ var Observability = class {
415
95
  environment && this.setTag("environment", environment);
416
96
  release && this.setTag("release", release);
417
97
  this.setTag("mode", this._mode);
98
+ this.setTag("session", PublicKey.random().toHex());
418
99
  }
419
100
  get mode() {
420
101
  return this._mode;
@@ -440,12 +121,12 @@ var Observability = class {
440
121
  process.env.DX_OTEL_AUTHORIZATION && (mergedSecrets.OTEL_AUTHORIZATION = process.env.DX_OTEL_AUTHORIZATION);
441
122
  return mergedSecrets;
442
123
  } else {
443
- log3("config", {
124
+ log("config", {
444
125
  rtc: this._secrets,
445
126
  config
446
127
  }, {
447
- F: __dxlog_file3,
448
- L: 150,
128
+ F: __dxlog_file,
129
+ L: 151,
449
130
  S: this,
450
131
  C: (f, a) => f(...a)
451
132
  });
@@ -501,11 +182,11 @@ var Observability = class {
501
182
  if (clientServices.IdentityService) {
502
183
  clientServices.IdentityService.queryIdentity().subscribe((idqr) => {
503
184
  if (!idqr?.identity?.identityKey) {
504
- log3("empty response from identity service", {
185
+ log("empty response from identity service", {
505
186
  idqr
506
187
  }, {
507
- F: __dxlog_file3,
508
- L: 218,
188
+ F: __dxlog_file,
189
+ L: 219,
509
190
  S: this,
510
191
  C: (f, a) => f(...a)
511
192
  });
@@ -517,19 +198,19 @@ var Observability = class {
517
198
  if (clientServices.DevicesService) {
518
199
  clientServices.DevicesService.queryDevices().subscribe((dqr) => {
519
200
  if (!dqr || !dqr.devices || dqr.devices.length === 0) {
520
- log3("empty response from device service", {
201
+ log("empty response from device service", {
521
202
  device: dqr
522
203
  }, {
523
- F: __dxlog_file3,
524
- L: 228,
204
+ F: __dxlog_file,
205
+ L: 229,
525
206
  S: this,
526
207
  C: (f, a) => f(...a)
527
208
  });
528
209
  return;
529
210
  }
530
211
  invariant(dqr, "empty response from device service", {
531
- F: __dxlog_file3,
532
- L: 231,
212
+ F: __dxlog_file,
213
+ L: 232,
533
214
  S: this,
534
215
  A: [
535
216
  "dqr",
@@ -538,11 +219,11 @@ var Observability = class {
538
219
  });
539
220
  const thisDevice = dqr.devices.find((device) => device.kind === DeviceKind.CURRENT);
540
221
  if (!thisDevice) {
541
- log3("no current device", {
222
+ log("no current device", {
542
223
  device: dqr
543
224
  }, {
544
- F: __dxlog_file3,
545
- L: 235,
225
+ F: __dxlog_file,
226
+ L: 236,
546
227
  S: this,
547
228
  C: (f, a) => f(...a)
548
229
  });
@@ -573,16 +254,16 @@ var Observability = class {
573
254
  value.value
574
255
  ]))
575
256
  });
576
- log3("otel metrics enabled", void 0, {
577
- F: __dxlog_file3,
578
- L: 267,
257
+ log("otel metrics enabled", void 0, {
258
+ F: __dxlog_file,
259
+ L: 268,
579
260
  S: this,
580
261
  C: (f, a) => f(...a)
581
262
  });
582
263
  } else {
583
- log3("otel metrics disabled", void 0, {
584
- F: __dxlog_file3,
585
- L: 269,
264
+ log("otel metrics disabled", void 0, {
265
+ F: __dxlog_file,
266
+ L: 270,
586
267
  S: this,
587
268
  C: (f, a) => f(...a)
588
269
  });
@@ -603,9 +284,9 @@ var Observability = class {
603
284
  }
604
285
  const updateSignalMetrics = new Event().debounce(NETWORK_METRICS_MIN_INTERVAL);
605
286
  updateSignalMetrics.on(this._ctx, async () => {
606
- log3("send signal metrics", void 0, {
607
- F: __dxlog_file3,
608
- L: 291,
287
+ log("send signal metrics", void 0, {
288
+ F: __dxlog_file,
289
+ L: 292,
609
290
  S: this,
610
291
  C: (f, a) => f(...a)
611
292
  });
@@ -655,9 +336,9 @@ var Observability = class {
655
336
  this._ctx.onDispose(() => subscriptions.forEach((subscription) => subscription.unsubscribe()));
656
337
  const updateSpaceMetrics = new Event().debounce(SPACE_METRICS_MIN_INTERVAL);
657
338
  updateSpaceMetrics.on(this._ctx, async () => {
658
- log3("send space metrics", void 0, {
659
- F: __dxlog_file3,
660
- L: 345,
339
+ log("send space metrics", void 0, {
340
+ F: __dxlog_file,
341
+ L: 346,
661
342
  S: this,
662
343
  C: (f, a) => f(...a)
663
344
  });
@@ -680,9 +361,9 @@ var Observability = class {
680
361
  });
681
362
  const updateSpaceTelemetry = new Event().debounce(SPACE_TELEMETRY_MIN_INTERVAL);
682
363
  updateSpaceTelemetry.on(this._ctx, async () => {
683
- log3("send space telemetry", void 0, {
684
- F: __dxlog_file3,
685
- L: 356,
364
+ log("send space telemetry", void 0, {
365
+ F: __dxlog_file,
366
+ L: 357,
686
367
  S: this,
687
368
  C: (f, a) => f(...a)
688
369
  });
@@ -717,8 +398,8 @@ var Observability = class {
717
398
  async startRuntimeMetrics(client, frequency = NETWORK_METRICS_MIN_INTERVAL) {
718
399
  const platform = await client.services.services.SystemService?.getPlatform();
719
400
  invariant(platform, "platform is required", {
720
- F: __dxlog_file3,
721
- L: 393,
401
+ F: __dxlog_file,
402
+ L: 394,
722
403
  S: this,
723
404
  A: [
724
405
  "platform",
@@ -752,11 +433,11 @@ var Observability = class {
752
433
  this.gauge("dxos.client.services.runtime.heapTotal", platform2.memory.heapTotal);
753
434
  this.gauge("dxos.client.services.runtime.heapUsed", platform2.memory.heapUsed);
754
435
  }
755
- }).catch((error) => log3("platform error", {
436
+ }).catch((error) => log("platform error", {
756
437
  error
757
438
  }, {
758
- F: __dxlog_file3,
759
- L: 428,
439
+ F: __dxlog_file,
440
+ L: 429,
760
441
  S: this,
761
442
  C: (f, a) => f(...a)
762
443
  }));
@@ -779,9 +460,9 @@ var Observability = class {
779
460
  ]))
780
461
  });
781
462
  } else {
782
- log3("segment disabled", void 0, {
783
- F: __dxlog_file3,
784
- L: 454,
463
+ log("segment disabled", void 0, {
464
+ F: __dxlog_file,
465
+ L: 455,
785
466
  S: this,
786
467
  C: (f, a) => f(...a)
787
468
  });
@@ -813,12 +494,12 @@ var Observability = class {
813
494
  this._captureException = captureException;
814
495
  this._captureUserFeedback = captureUserFeedback;
815
496
  this._setTag = setTag;
816
- log3.info("Initializing Sentry", {
497
+ log.info("Initializing Sentry", {
817
498
  dest: this._secrets.SENTRY_DESTINATION,
818
499
  options: this._errorReportingOptions
819
500
  }, {
820
- F: __dxlog_file3,
821
- L: 490,
501
+ F: __dxlog_file,
502
+ L: 491,
822
503
  S: this,
823
504
  C: (f, a) => f(...a)
824
505
  });
@@ -835,9 +516,9 @@ var Observability = class {
835
516
  }
836
517
  });
837
518
  } else {
838
- log3("sentry disabled", void 0, {
839
- F: __dxlog_file3,
840
- L: 510,
519
+ log("sentry disabled", void 0, {
520
+ F: __dxlog_file,
521
+ L: 511,
841
522
  S: this,
842
523
  C: (f, a) => f(...a)
843
524
  });
@@ -856,26 +537,26 @@ var Observability = class {
856
537
  value.value
857
538
  ]))
858
539
  });
859
- log3("otel logs enabled", {
540
+ log("otel logs enabled", {
860
541
  namespace: this._namespace
861
542
  }, {
862
- F: __dxlog_file3,
863
- L: 529,
543
+ F: __dxlog_file,
544
+ L: 530,
864
545
  S: this,
865
546
  C: (f, a) => f(...a)
866
547
  });
867
548
  } else {
868
- log3("otel logs disabled", void 0, {
869
- F: __dxlog_file3,
870
- L: 531,
549
+ log("otel logs disabled", void 0, {
550
+ F: __dxlog_file,
551
+ L: 532,
871
552
  S: this,
872
553
  C: (f, a) => f(...a)
873
554
  });
874
555
  }
875
556
  }
876
557
  startErrorLogs() {
877
- this._sentryLogProcessor && log3.runtimeConfig.processors.push(this._sentryLogProcessor.logProcessor);
878
- this._otelLogs && log3.runtimeConfig.processors.push(this._otelLogs.logProcessor);
558
+ this._sentryLogProcessor && log.runtimeConfig.processors.push(this._sentryLogProcessor.logProcessor);
559
+ this._otelLogs && log.runtimeConfig.processors.push(this._otelLogs.logProcessor);
879
560
  }
880
561
  startTraces() {
881
562
  this._otelTraces && this._otelTraces.start();
@@ -920,18 +601,7 @@ var Observability = class {
920
601
 
921
602
  export {
922
603
  Observability,
923
- OBSERVABILITY_DISABLED_KEY,
924
- OBSERVABILITY_GROUP_KEY,
925
- isObservabilityDisabled,
926
- storeObservabilityDisabled,
927
- getObservabilityGroup,
928
- storeObservabilityGroup,
929
- initializeAppObservability,
930
604
  getTelemetryIdentifier,
931
- showObservabilityBanner,
932
- getObservabilityState,
933
- initializeNodeObservability,
934
- mapSpaces,
935
- setupTelemetryListeners
605
+ mapSpaces
936
606
  };
937
- //# sourceMappingURL=chunk-QUPP43SQ.mjs.map
607
+ //# sourceMappingURL=chunk-4OXG76Y3.mjs.map