@dxos/plugin-observability 0.7.5-main.9d26e3a → 0.7.5-main.e9bb01b
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-X6XUBXZQ.mjs → chunk-BMBRX6IW.mjs} +5 -4
- package/dist/lib/browser/chunk-BMBRX6IW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-UBDF6N5K.mjs → chunk-LJICNNK4.mjs} +2 -2
- package/dist/lib/browser/chunk-VOXXTFUV.mjs +37 -0
- package/dist/lib/browser/chunk-VOXXTFUV.mjs.map +7 -0
- package/dist/lib/browser/chunk-WEVYEGVJ.mjs +18 -0
- package/dist/lib/browser/chunk-WEVYEGVJ.mjs.map +7 -0
- package/dist/lib/browser/client-ready-G43SJ5KX.mjs +103 -0
- package/dist/lib/browser/client-ready-G43SJ5KX.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +77 -207
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intents-resolver-SSLETJX6.mjs +64 -0
- package/dist/lib/browser/intents-resolver-SSLETJX6.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-TRXHCMO5.mjs +24 -0
- package/dist/lib/browser/react-surface-TRXHCMO5.mjs.map +7 -0
- package/dist/lib/browser/settings-3DXJFOJA.mjs +25 -0
- package/dist/lib/browser/settings-3DXJFOJA.mjs.map +7 -0
- package/dist/lib/browser/state-LG42JNIS.mjs +26 -0
- package/dist/lib/browser/state-LG42JNIS.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +2 -2
- package/dist/lib/node/{chunk-SIUGGDNL.cjs → chunk-7I7D7NBM.cjs} +9 -8
- package/dist/lib/node/chunk-7I7D7NBM.cjs.map +7 -0
- package/dist/lib/node/chunk-X7HWBFE2.cjs +38 -0
- package/dist/lib/node/chunk-X7HWBFE2.cjs.map +7 -0
- package/dist/lib/node/{chunk-HZSRCP4I.cjs → chunk-XBDGBB5D.cjs} +6 -6
- package/dist/lib/node/chunk-YHIPA37Q.cjs +65 -0
- package/dist/lib/node/chunk-YHIPA37Q.cjs.map +7 -0
- package/dist/lib/node/client-ready-352F6HCO.cjs +114 -0
- package/dist/lib/node/client-ready-352F6HCO.cjs.map +7 -0
- package/dist/lib/node/index.cjs +73 -200
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/intents-resolver-JZ5PEWEO.cjs +75 -0
- package/dist/lib/node/intents-resolver-JZ5PEWEO.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react-surface-G4DDWTSN.cjs +48 -0
- package/dist/lib/node/react-surface-G4DDWTSN.cjs.map +7 -0
- package/dist/lib/node/settings-ZFZ4YONA.cjs +39 -0
- package/dist/lib/node/settings-ZFZ4YONA.cjs.map +7 -0
- package/dist/lib/node/state-FNK3OBM7.cjs +40 -0
- package/dist/lib/node/state-FNK3OBM7.cjs.map +7 -0
- package/dist/lib/node/types.cjs +4 -4
- package/dist/lib/node/types.cjs.map +1 -1
- package/dist/lib/node-esm/{chunk-52FTHXHB.mjs → chunk-DSC5SQ7W.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-7GGPSKXN.mjs → chunk-HTL7V6A2.mjs} +5 -4
- package/dist/lib/node-esm/chunk-HTL7V6A2.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-KPH3N6JS.mjs +19 -0
- package/dist/lib/node-esm/chunk-KPH3N6JS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-N5NBR55J.mjs +38 -0
- package/dist/lib/node-esm/chunk-N5NBR55J.mjs.map +7 -0
- package/dist/lib/node-esm/client-ready-NXRLOXLL.mjs +104 -0
- package/dist/lib/node-esm/client-ready-NXRLOXLL.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +77 -207
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/intents-resolver-PZS43GGV.mjs +65 -0
- package/dist/lib/node-esm/intents-resolver-PZS43GGV.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-QYURTQNR.mjs +25 -0
- package/dist/lib/node-esm/react-surface-QYURTQNR.mjs.map +7 -0
- package/dist/lib/node-esm/settings-UNFUTWGX.mjs +26 -0
- package/dist/lib/node-esm/settings-UNFUTWGX.mjs.map +7 -0
- package/dist/lib/node-esm/state-UXRA6NQC.mjs +27 -0
- package/dist/lib/node-esm/state-UXRA6NQC.mjs.map +7 -0
- package/dist/lib/node-esm/types.mjs +2 -2
- package/dist/types/src/ObservabilityPlugin.d.ts +1 -11
- package/dist/types/src/ObservabilityPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +12 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/client-ready.d.ts +10 -0
- package/dist/types/src/capabilities/client-ready.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +16 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/intents-resolver.d.ts +7 -0
- package/dist/types/src/capabilities/intents-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +4 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +4 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts +6 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/components/ObservabilitySettings.d.ts +5 -3
- package/dist/types/src/components/ObservabilitySettings.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +5 -0
- package/dist/types/src/events.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +20 -27
- package/src/ObservabilityPlugin.ts +61 -0
- package/src/capabilities/capabilities.ts +22 -0
- package/src/capabilities/client-ready.ts +98 -0
- package/src/capabilities/index.ts +13 -0
- package/src/capabilities/intents-resolver.ts +62 -0
- package/src/capabilities/react-surface.tsx +23 -0
- package/src/capabilities/settings.ts +19 -0
- package/src/capabilities/state.ts +21 -0
- package/src/components/ObservabilitySettings.tsx +15 -10
- package/src/events.ts +14 -0
- package/src/index.ts +3 -4
- package/src/meta.ts +2 -1
- package/src/translations.ts +1 -1
- package/dist/lib/browser/chunk-X6XUBXZQ.mjs.map +0 -7
- package/dist/lib/browser/meta.mjs +0 -9
- package/dist/lib/browser/meta.mjs.map +0 -7
- package/dist/lib/node/chunk-SIUGGDNL.cjs.map +0 -7
- package/dist/lib/node/meta.cjs +0 -30
- package/dist/lib/node/meta.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-7GGPSKXN.mjs.map +0 -7
- package/dist/lib/node-esm/meta.mjs +0 -10
- package/dist/lib/node-esm/meta.mjs.map +0 -7
- package/src/ObservabilityPlugin.tsx +0 -215
- /package/dist/lib/browser/{chunk-UBDF6N5K.mjs.map → chunk-LJICNNK4.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-HZSRCP4I.cjs.map → chunk-XBDGBB5D.cjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-52FTHXHB.mjs.map → chunk-DSC5SQ7W.mjs.map} +0 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// packages/plugins/plugin-observability/src/meta.ts
|
|
2
2
|
var OBSERVABILITY_PLUGIN = "dxos.org/plugin/observability";
|
|
3
|
-
var
|
|
3
|
+
var meta = {
|
|
4
4
|
id: OBSERVABILITY_PLUGIN,
|
|
5
|
-
name: "Telemetry"
|
|
5
|
+
name: "Telemetry",
|
|
6
|
+
icon: "ph--eye--regular"
|
|
6
7
|
};
|
|
7
8
|
|
|
8
9
|
export {
|
|
9
10
|
OBSERVABILITY_PLUGIN,
|
|
10
|
-
|
|
11
|
+
meta
|
|
11
12
|
};
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-BMBRX6IW.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const OBSERVABILITY_PLUGIN = 'dxos.org/plugin/observability';\n\nexport const meta = {\n id: OBSERVABILITY_PLUGIN,\n name: 'Telemetry',\n icon: 'ph--eye--regular',\n} satisfies PluginMeta;\n"],
|
|
5
|
+
"mappings": ";AAMO,IAAMA,uBAAuB;AAE7B,IAAMC,OAAO;EAClBC,IAAIF;EACJG,MAAM;EACNC,MAAM;AACR;",
|
|
6
|
+
"names": ["OBSERVABILITY_PLUGIN", "meta", "id", "name", "icon"]
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OBSERVABILITY_PLUGIN
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BMBRX6IW.mjs";
|
|
4
4
|
|
|
5
5
|
// packages/plugins/plugin-observability/src/types.ts
|
|
6
6
|
import { S } from "@dxos/echo-schema";
|
|
@@ -55,4 +55,4 @@ export {
|
|
|
55
55
|
UserFeedback,
|
|
56
56
|
ObservabilityAction
|
|
57
57
|
};
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-LJICNNK4.mjs.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ObservabilityAction
|
|
3
|
+
} from "./chunk-LJICNNK4.mjs";
|
|
4
|
+
import {
|
|
5
|
+
OBSERVABILITY_PLUGIN
|
|
6
|
+
} from "./chunk-BMBRX6IW.mjs";
|
|
7
|
+
|
|
8
|
+
// packages/plugins/plugin-observability/src/components/ObservabilitySettings.tsx
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { createIntent, useIntentDispatcher } from "@dxos/app-framework";
|
|
11
|
+
import { S } from "@dxos/echo-schema";
|
|
12
|
+
import { Input, Message, useTranslation } from "@dxos/react-ui";
|
|
13
|
+
import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
|
|
14
|
+
var ObservabilitySettingsSchema = S.mutable(S.Struct({
|
|
15
|
+
enabled: S.Boolean
|
|
16
|
+
}));
|
|
17
|
+
var ObservabilitySettings = ({ settings }) => {
|
|
18
|
+
const { t } = useTranslation(OBSERVABILITY_PLUGIN);
|
|
19
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
20
|
+
return /* @__PURE__ */ React.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React.createElement(DeprecatedFormInput, {
|
|
21
|
+
label: t("observability enabled label"),
|
|
22
|
+
secondary: /* @__PURE__ */ React.createElement(Message.Root, {
|
|
23
|
+
valence: "info"
|
|
24
|
+
}, /* @__PURE__ */ React.createElement(Message.Body, null, t("observability description")))
|
|
25
|
+
}, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
26
|
+
checked: settings.enabled,
|
|
27
|
+
onCheckedChange: (checked) => dispatch(createIntent(ObservabilityAction.Toggle, {
|
|
28
|
+
state: !!checked
|
|
29
|
+
}))
|
|
30
|
+
})));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
ObservabilitySettingsSchema,
|
|
35
|
+
ObservabilitySettings
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=chunk-VOXXTFUV.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/ObservabilitySettings.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { createIntent, useIntentDispatcher } from '@dxos/app-framework';\nimport { S } from '@dxos/echo-schema';\nimport { Input, Message, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { OBSERVABILITY_PLUGIN } from '../meta';\nimport { ObservabilityAction } from '../types';\n\nexport const ObservabilitySettingsSchema = S.mutable(\n S.Struct({\n enabled: S.Boolean,\n // TODO(wittjosiah): Separate settings for each observability feature.\n // metrics?: boolean;\n // telemetry?: boolean;\n // errors?: boolean;\n }),\n);\n\nexport type ObservabilitySettingsProps = S.Schema.Type<typeof ObservabilitySettingsSchema>;\n\nexport const ObservabilitySettings = ({ settings }: { settings: ObservabilitySettingsProps }) => {\n const { t } = useTranslation(OBSERVABILITY_PLUGIN);\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n\n return (\n <DeprecatedFormContainer>\n <DeprecatedFormInput\n label={t('observability enabled label')}\n secondary={\n <Message.Root valence='info'>\n <Message.Body>{t('observability description')}</Message.Body>\n </Message.Root>\n }\n >\n <Input.Switch\n checked={settings.enabled}\n onCheckedChange={(checked) => dispatch(createIntent(ObservabilityAction.Toggle, { state: !!checked }))}\n />\n </DeprecatedFormInput>\n </DeprecatedFormContainer>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,2BAA2B;AAClD,SAASC,SAAS;AAClB,SAASC,OAAOC,SAASC,sBAAsB;AAC/C,SAASC,yBAAyBC,2BAA2B;AAKtD,IAAMC,8BAA8BC,EAAEC,QAC3CD,EAAEE,OAAO;EACPC,SAASH,EAAEI;AAKb,CAAA,CAAA;AAKK,IAAMC,wBAAwB,CAAC,EAAEC,SAAQ,MAA4C;AAC1F,QAAM,EAAEC,EAAC,IAAKC,eAAeC,oBAAAA;AAC7B,QAAM,EAAEC,iBAAiBC,SAAQ,IAAKC,oBAAAA;AAEtC,SACE,sBAAA,cAACC,yBAAAA,MACC,sBAAA,cAACC,qBAAAA;IACCC,OAAOR,EAAE,6BAAA;IACTS,WACE,sBAAA,cAACC,QAAQC,MAAI;MAACC,SAAQ;OACpB,sBAAA,cAACF,QAAQG,MAAI,MAAEb,EAAE,2BAAA,CAAA,CAAA;KAIrB,sBAAA,cAACc,MAAMC,QAAM;IACXC,SAASjB,SAASH;IAClBqB,iBAAiB,CAACD,YAAYZ,SAASc,aAAaC,oBAAoBC,QAAQ;MAAEC,OAAO,CAAC,CAACL;IAAQ,CAAA,CAAA;;AAK7G;",
|
|
6
|
+
"names": ["React", "createIntent", "useIntentDispatcher", "S", "Input", "Message", "useTranslation", "DeprecatedFormContainer", "DeprecatedFormInput", "ObservabilitySettingsSchema", "S", "mutable", "Struct", "enabled", "Boolean", "ObservabilitySettings", "settings", "t", "useTranslation", "OBSERVABILITY_PLUGIN", "dispatchPromise", "dispatch", "useIntentDispatcher", "DeprecatedFormContainer", "DeprecatedFormInput", "label", "secondary", "Message", "Root", "valence", "Body", "Input", "Switch", "checked", "onCheckedChange", "createIntent", "ObservabilityAction", "Toggle", "state"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OBSERVABILITY_PLUGIN
|
|
3
|
+
} from "./chunk-BMBRX6IW.mjs";
|
|
4
|
+
|
|
5
|
+
// packages/plugins/plugin-observability/src/capabilities/capabilities.ts
|
|
6
|
+
import { defineCapability } from "@dxos/app-framework";
|
|
7
|
+
var ObservabilityCapabilities;
|
|
8
|
+
(function(ObservabilityCapabilities2) {
|
|
9
|
+
ObservabilityCapabilities2.State = defineCapability(`${OBSERVABILITY_PLUGIN}/capability/state`);
|
|
10
|
+
ObservabilityCapabilities2.Observability = defineCapability(`${OBSERVABILITY_PLUGIN}/capability/observability`);
|
|
11
|
+
})(ObservabilityCapabilities || (ObservabilityCapabilities = {}));
|
|
12
|
+
var ClientCapability = defineCapability("dxos.org/plugin/client/capability/client");
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
ObservabilityCapabilities,
|
|
16
|
+
ClientCapability
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=chunk-WEVYEGVJ.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/capabilities.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type Client } from '@dxos/client';\nimport { type Observability } from '@dxos/observability';\n\nimport { OBSERVABILITY_PLUGIN } from '../meta';\n\nexport namespace ObservabilityCapabilities {\n export type State = {\n group?: string;\n notified?: boolean;\n };\n export const State = defineCapability<State>(`${OBSERVABILITY_PLUGIN}/capability/state`);\n\n export const Observability = defineCapability<Observability>(`${OBSERVABILITY_PLUGIN}/capability/observability`);\n}\n\n// NOTE: This is cloned from the client plugin to avoid circular dependencies.\nexport const ClientCapability = defineCapability<Client>('dxos.org/plugin/client/capability/client');\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SAASA,wBAAwB;;UAMhBC,4BAAAA;6BAKFC,QAAQC,iBAAwB,GAAGC,oBAAAA,mBAAuC;6BAE1EC,gBAAgBF,iBAAgC,GAAGC,oBAAAA,2BAA+C;AACjH,GARiBH,8BAAAA,4BAAAA,CAAAA,EAAAA;AAWV,IAAMK,mBAAmBH,iBAAyB,0CAAA;",
|
|
6
|
+
"names": ["defineCapability", "ObservabilityCapabilities", "State", "defineCapability", "OBSERVABILITY_PLUGIN", "Observability", "ClientCapability"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ObservabilityAction
|
|
3
|
+
} from "./chunk-LJICNNK4.mjs";
|
|
4
|
+
import {
|
|
5
|
+
ClientCapability,
|
|
6
|
+
ObservabilityCapabilities
|
|
7
|
+
} from "./chunk-WEVYEGVJ.mjs";
|
|
8
|
+
import {
|
|
9
|
+
OBSERVABILITY_PLUGIN
|
|
10
|
+
} from "./chunk-BMBRX6IW.mjs";
|
|
11
|
+
|
|
12
|
+
// packages/plugins/plugin-observability/src/capabilities/client-ready.ts
|
|
13
|
+
import { Capabilities, contributes, createIntent, LayoutAction, SettingsAction } from "@dxos/app-framework";
|
|
14
|
+
import { setupTelemetryListeners } from "@dxos/observability";
|
|
15
|
+
var client_ready_default = async ({ context, namespace, observability }) => {
|
|
16
|
+
const manager = context.requestCapability(Capabilities.PluginManager);
|
|
17
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
18
|
+
const state = context.requestCapability(ObservabilityCapabilities.State);
|
|
19
|
+
const client = context.requestCapability(ClientCapability);
|
|
20
|
+
const sendPrivacyNotice = async () => {
|
|
21
|
+
const environment = client?.config?.values.runtime?.app?.env?.DX_ENVIRONMENT;
|
|
22
|
+
const notify = environment && environment !== "ci" && !environment.endsWith(".local") && !environment.endsWith(".lan");
|
|
23
|
+
if (!state.notified && notify) {
|
|
24
|
+
await dispatch(createIntent(LayoutAction.AddToast, {
|
|
25
|
+
part: "toast",
|
|
26
|
+
subject: {
|
|
27
|
+
id: `${OBSERVABILITY_PLUGIN}/notice`,
|
|
28
|
+
title: [
|
|
29
|
+
"observability toast label",
|
|
30
|
+
{
|
|
31
|
+
ns: OBSERVABILITY_PLUGIN
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
description: [
|
|
35
|
+
"observability toast description",
|
|
36
|
+
{
|
|
37
|
+
ns: OBSERVABILITY_PLUGIN
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
duration: Infinity,
|
|
41
|
+
icon: "ph--info--regular",
|
|
42
|
+
actionLabel: [
|
|
43
|
+
"observability toast action label",
|
|
44
|
+
{
|
|
45
|
+
ns: OBSERVABILITY_PLUGIN
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
actionAlt: [
|
|
49
|
+
"observability toast action alt",
|
|
50
|
+
{
|
|
51
|
+
ns: OBSERVABILITY_PLUGIN
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
closeLabel: [
|
|
55
|
+
"observability toast close label",
|
|
56
|
+
{
|
|
57
|
+
ns: OBSERVABILITY_PLUGIN
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
onAction: () => dispatch(createIntent(SettingsAction.Open, {
|
|
61
|
+
plugin: OBSERVABILITY_PLUGIN
|
|
62
|
+
}))
|
|
63
|
+
}
|
|
64
|
+
}));
|
|
65
|
+
state.notified = true;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
manager.enabled.map((plugin) => observability?.setTag(`pluginEnabled-${plugin}`, "true", "errors"));
|
|
69
|
+
await dispatch(createIntent(ObservabilityAction.SendEvent, {
|
|
70
|
+
name: "page.load",
|
|
71
|
+
properties: {
|
|
72
|
+
href: window.location.href,
|
|
73
|
+
// TODO(wittjosiah): These apis are deprecated. Is there a better way to find this information?
|
|
74
|
+
loadDuration: window.performance.timing.loadEventEnd - window.performance.timing.loadEventStart
|
|
75
|
+
}
|
|
76
|
+
}));
|
|
77
|
+
const cleanup = setupTelemetryListeners(namespace, client, observability);
|
|
78
|
+
await Promise.all([
|
|
79
|
+
observability.setIdentityTags(client.services.services),
|
|
80
|
+
observability.startRuntimeMetrics(client),
|
|
81
|
+
observability.startNetworkMetrics(client.services.services),
|
|
82
|
+
observability.startSpacesMetrics(client, namespace)
|
|
83
|
+
]);
|
|
84
|
+
if (client.halo.identity.get()) {
|
|
85
|
+
await sendPrivacyNotice();
|
|
86
|
+
} else {
|
|
87
|
+
const subscription = client.halo.identity.subscribe(async (identity) => {
|
|
88
|
+
if (identity && observability) {
|
|
89
|
+
await sendPrivacyNotice();
|
|
90
|
+
await observability.setIdentityTags(client.services.services);
|
|
91
|
+
subscription.unsubscribe();
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return contributes(ObservabilityCapabilities.Observability, observability, async () => {
|
|
96
|
+
cleanup();
|
|
97
|
+
await observability.close();
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
export {
|
|
101
|
+
client_ready_default as default
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=client-ready-G43SJ5KX.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/client-ready.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n Capabilities,\n contributes,\n createIntent,\n LayoutAction,\n SettingsAction,\n type PluginsContext,\n} from '@dxos/app-framework';\nimport { setupTelemetryListeners, type Observability } from '@dxos/observability';\n\nimport { ClientCapability, ObservabilityCapabilities } from './capabilities';\nimport { OBSERVABILITY_PLUGIN } from '../meta';\nimport { ObservabilityAction } from '../types';\n\ntype ClientReadyOptions = {\n context: PluginsContext;\n namespace: string;\n observability: Observability;\n};\n\nexport default async ({ context, namespace, observability }: ClientReadyOptions) => {\n const manager = context.requestCapability(Capabilities.PluginManager);\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n const state = context.requestCapability(ObservabilityCapabilities.State);\n const client = context.requestCapability(ClientCapability);\n\n const sendPrivacyNotice = async () => {\n const environment = client?.config?.values.runtime?.app?.env?.DX_ENVIRONMENT;\n const notify =\n environment && environment !== 'ci' && !environment.endsWith('.local') && !environment.endsWith('.lan');\n if (!state.notified && notify) {\n await dispatch(\n createIntent(LayoutAction.AddToast, {\n part: 'toast',\n subject: {\n id: `${OBSERVABILITY_PLUGIN}/notice`,\n title: ['observability toast label', { ns: OBSERVABILITY_PLUGIN }],\n description: ['observability toast description', { ns: OBSERVABILITY_PLUGIN }],\n duration: Infinity,\n icon: 'ph--info--regular',\n actionLabel: ['observability toast action label', { ns: OBSERVABILITY_PLUGIN }],\n actionAlt: ['observability toast action alt', { ns: OBSERVABILITY_PLUGIN }],\n closeLabel: ['observability toast close label', { ns: OBSERVABILITY_PLUGIN }],\n onAction: () => dispatch(createIntent(SettingsAction.Open, { plugin: OBSERVABILITY_PLUGIN })),\n },\n }),\n );\n\n state.notified = true;\n }\n };\n\n // Ensure errors are tagged with enabled plugins to help with reproductions.\n manager.enabled.map((plugin) => observability?.setTag(`pluginEnabled-${plugin}`, 'true', 'errors'));\n\n await dispatch(\n createIntent(ObservabilityAction.SendEvent, {\n name: 'page.load',\n properties: {\n href: window.location.href,\n // TODO(wittjosiah): These apis are deprecated. Is there a better way to find this information?\n loadDuration: window.performance.timing.loadEventEnd - window.performance.timing.loadEventStart,\n },\n }),\n );\n\n // Start client observability (i.e. not running as shared worker)\n // TODO(nf): how to prevent multiple instances for single shared worker?\n const cleanup = setupTelemetryListeners(namespace, client, observability);\n\n await Promise.all([\n observability.setIdentityTags(client.services.services),\n observability.startRuntimeMetrics(client),\n observability.startNetworkMetrics(client.services.services),\n observability.startSpacesMetrics(client, namespace),\n ]);\n\n if (client.halo.identity.get()) {\n await sendPrivacyNotice();\n } else {\n const subscription = client.halo.identity.subscribe(async (identity) => {\n if (identity && observability) {\n await sendPrivacyNotice();\n await observability.setIdentityTags(client.services.services);\n subscription.unsubscribe();\n }\n });\n }\n\n return contributes(ObservabilityCapabilities.Observability, observability, async () => {\n cleanup();\n await observability.close();\n });\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAIA,SACEA,cACAC,aACAC,cACAC,cACAC,sBAEK;AACP,SAASC,+BAAmD;AAY5D,IAAA,uBAAe,OAAO,EAAEC,SAASC,WAAWC,cAAa,MAAsB;AAC7E,QAAMC,UAAUH,QAAQI,kBAAkBC,aAAaC,aAAa;AACpE,QAAM,EAAEC,iBAAiBC,SAAQ,IAAKR,QAAQI,kBAAkBC,aAAaI,gBAAgB;AAC7F,QAAMC,QAAQV,QAAQI,kBAAkBO,0BAA0BC,KAAK;AACvE,QAAMC,SAASb,QAAQI,kBAAkBU,gBAAAA;AAEzC,QAAMC,oBAAoB,YAAA;AACxB,UAAMC,cAAcH,QAAQI,QAAQC,OAAOC,SAASC,KAAKC,KAAKC;AAC9D,UAAMC,SACJP,eAAeA,gBAAgB,QAAQ,CAACA,YAAYQ,SAAS,QAAA,KAAa,CAACR,YAAYQ,SAAS,MAAA;AAClG,QAAI,CAACd,MAAMe,YAAYF,QAAQ;AAC7B,YAAMf,SACJkB,aAAaC,aAAaC,UAAU;QAClCC,MAAM;QACNC,SAAS;UACPC,IAAI,GAAGC,oBAAAA;UACPC,OAAO;YAAC;YAA6B;cAAEC,IAAIF;YAAqB;;UAChEG,aAAa;YAAC;YAAmC;cAAED,IAAIF;YAAqB;;UAC5EI,UAAUC;UACVC,MAAM;UACNC,aAAa;YAAC;YAAoC;cAAEL,IAAIF;YAAqB;;UAC7EQ,WAAW;YAAC;YAAkC;cAAEN,IAAIF;YAAqB;;UACzES,YAAY;YAAC;YAAmC;cAAEP,IAAIF;YAAqB;;UAC3EU,UAAU,MAAMlC,SAASkB,aAAaiB,eAAeC,MAAM;YAAEC,QAAQb;UAAqB,CAAA,CAAA;QAC5F;MACF,CAAA,CAAA;AAGFtB,YAAMe,WAAW;IACnB;EACF;AAGAtB,UAAQ2C,QAAQC,IAAI,CAACF,WAAW3C,eAAe8C,OAAO,iBAAiBH,MAAAA,IAAU,QAAQ,QAAA,CAAA;AAEzF,QAAMrC,SACJkB,aAAauB,oBAAoBC,WAAW;IAC1CC,MAAM;IACNC,YAAY;MACVC,MAAMC,OAAOC,SAASF;;MAEtBG,cAAcF,OAAOG,YAAYC,OAAOC,eAAeL,OAAOG,YAAYC,OAAOE;IACnF;EACF,CAAA,CAAA;AAKF,QAAMC,UAAUC,wBAAwB7D,WAAWY,QAAQX,aAAAA;AAE3D,QAAM6D,QAAQC,IAAI;IAChB9D,cAAc+D,gBAAgBpD,OAAOqD,SAASA,QAAQ;IACtDhE,cAAciE,oBAAoBtD,MAAAA;IAClCX,cAAckE,oBAAoBvD,OAAOqD,SAASA,QAAQ;IAC1DhE,cAAcmE,mBAAmBxD,QAAQZ,SAAAA;GAC1C;AAED,MAAIY,OAAOyD,KAAKC,SAASC,IAAG,GAAI;AAC9B,UAAMzD,kBAAAA;EACR,OAAO;AACL,UAAM0D,eAAe5D,OAAOyD,KAAKC,SAASG,UAAU,OAAOH,aAAAA;AACzD,UAAIA,YAAYrE,eAAe;AAC7B,cAAMa,kBAAAA;AACN,cAAMb,cAAc+D,gBAAgBpD,OAAOqD,SAASA,QAAQ;AAC5DO,qBAAaE,YAAW;MAC1B;IACF,CAAA;EACF;AAEA,SAAOC,YAAYjE,0BAA0BkE,eAAe3E,eAAe,YAAA;AACzE2D,YAAAA;AACA,UAAM3D,cAAc4E,MAAK;EAC3B,CAAA;AACF;",
|
|
6
|
+
"names": ["Capabilities", "contributes", "createIntent", "LayoutAction", "SettingsAction", "setupTelemetryListeners", "context", "namespace", "observability", "manager", "requestCapability", "Capabilities", "PluginManager", "dispatchPromise", "dispatch", "IntentDispatcher", "state", "ObservabilityCapabilities", "State", "client", "ClientCapability", "sendPrivacyNotice", "environment", "config", "values", "runtime", "app", "env", "DX_ENVIRONMENT", "notify", "endsWith", "notified", "createIntent", "LayoutAction", "AddToast", "part", "subject", "id", "OBSERVABILITY_PLUGIN", "title", "ns", "description", "duration", "Infinity", "icon", "actionLabel", "actionAlt", "closeLabel", "onAction", "SettingsAction", "Open", "plugin", "enabled", "map", "setTag", "ObservabilityAction", "SendEvent", "name", "properties", "href", "window", "location", "loadDuration", "performance", "timing", "loadEventEnd", "loadEventStart", "cleanup", "setupTelemetryListeners", "Promise", "all", "setIdentityTags", "services", "startRuntimeMetrics", "startNetworkMetrics", "startSpacesMetrics", "halo", "identity", "get", "subscription", "subscribe", "unsubscribe", "contributes", "Observability", "close"]
|
|
7
|
+
}
|
|
@@ -1,40 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
ObservabilityCapabilities
|
|
3
|
+
} from "./chunk-WEVYEGVJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
OBSERVABILITY_PLUGIN,
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
meta
|
|
7
|
+
} from "./chunk-BMBRX6IW.mjs";
|
|
8
8
|
|
|
9
|
-
// packages/plugins/plugin-observability/src/
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import { getTelemetryIdentifier, setupTelemetryListeners, isObservabilityDisabled, storeObservabilityDisabled, getObservabilityGroup } from "@dxos/observability";
|
|
9
|
+
// packages/plugins/plugin-observability/src/capabilities/index.ts
|
|
10
|
+
import { lazy } from "@dxos/app-framework";
|
|
11
|
+
var ClientReady = lazy(() => import("./client-ready-G43SJ5KX.mjs"));
|
|
12
|
+
var IntentResolver = lazy(() => import("./intents-resolver-SSLETJX6.mjs"));
|
|
13
|
+
var ReactSurface = lazy(() => import("./react-surface-TRXHCMO5.mjs"));
|
|
14
|
+
var ObservabilitySettings = lazy(() => import("./settings-3DXJFOJA.mjs"));
|
|
15
|
+
var ObservabilityState = lazy(() => import("./state-LG42JNIS.mjs"));
|
|
17
16
|
|
|
18
|
-
// packages/plugins/plugin-observability/src/
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
secondary: /* @__PURE__ */ React.createElement(Message.Root, {
|
|
29
|
-
valence: "info"
|
|
30
|
-
}, /* @__PURE__ */ React.createElement(Message.Body, null, t("observability description")))
|
|
31
|
-
}, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
32
|
-
checked: settings.enabled,
|
|
33
|
-
onCheckedChange: (checked) => dispatch(createIntent(ObservabilityAction.Toggle, {
|
|
34
|
-
state: !!checked
|
|
35
|
-
}))
|
|
36
|
-
})));
|
|
37
|
-
};
|
|
17
|
+
// packages/plugins/plugin-observability/src/events.ts
|
|
18
|
+
import { defineEvent, Events } from "@dxos/app-framework";
|
|
19
|
+
var ObservabilityEvents;
|
|
20
|
+
(function(ObservabilityEvents2) {
|
|
21
|
+
ObservabilityEvents2.StateReady = Events.createStateEvent(OBSERVABILITY_PLUGIN);
|
|
22
|
+
})(ObservabilityEvents || (ObservabilityEvents = {}));
|
|
23
|
+
var ClientReadyEvent = defineEvent("dxos.org/plugin/client/event/client-ready");
|
|
24
|
+
|
|
25
|
+
// packages/plugins/plugin-observability/src/ObservabilityPlugin.ts
|
|
26
|
+
import { allOf, Capabilities, contributes, defineModule, definePlugin, Events as Events2 } from "@dxos/app-framework";
|
|
38
27
|
|
|
39
28
|
// packages/plugins/plugin-observability/src/translations.ts
|
|
40
29
|
var translations_default = [
|
|
@@ -49,189 +38,70 @@ var translations_default = [
|
|
|
49
38
|
"observability toast close label": "Okay",
|
|
50
39
|
"observability enabled label": "Enable telemetry",
|
|
51
40
|
// TODO: Add link about telemetry privacy. Make it clearer that user data is not collected.
|
|
52
|
-
"observability description": "When enabled, basic usage data will
|
|
41
|
+
"observability description": "When enabled, basic usage data will used to improve the product. This may include 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."
|
|
53
42
|
}
|
|
54
43
|
}
|
|
55
44
|
}
|
|
56
45
|
];
|
|
57
46
|
|
|
58
|
-
// packages/plugins/plugin-observability/src/ObservabilityPlugin.
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
void options.observability().then(async (obs) => {
|
|
110
|
-
observability = obs;
|
|
111
|
-
plugins.map((plugin) => observability?.setTag(`pluginEnabled-${plugin.meta.id}`, "true", "errors"));
|
|
112
|
-
if (!client) {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
await dispatch(createIntent2(ObservabilityAction.SendEvent, {
|
|
116
|
-
name: "page.load",
|
|
117
|
-
properties: {
|
|
118
|
-
href: window.location.href,
|
|
119
|
-
// TODO(wittjosiah): These apis are deprecated. Is there a better way to find this information?
|
|
120
|
-
loadDuration: window.performance.timing.loadEventEnd - window.performance.timing.loadEventStart
|
|
121
|
-
}
|
|
122
|
-
}));
|
|
123
|
-
setupTelemetryListeners(options.namespace, client, observability);
|
|
124
|
-
await Promise.all([
|
|
125
|
-
observability.setIdentityTags(client.services.services),
|
|
126
|
-
observability.startRuntimeMetrics(client),
|
|
127
|
-
observability.startNetworkMetrics(client.services.services),
|
|
128
|
-
observability.startSpacesMetrics(client, options.namespace)
|
|
129
|
-
]);
|
|
130
|
-
if (client.halo.identity.get()) {
|
|
131
|
-
await sendPrivacyNotice();
|
|
132
|
-
} else {
|
|
133
|
-
const subscription = client.halo.identity.subscribe(async (identity) => {
|
|
134
|
-
if (identity && observability) {
|
|
135
|
-
await sendPrivacyNotice();
|
|
136
|
-
await observability.setIdentityTags(client.services.services);
|
|
137
|
-
subscription.unsubscribe();
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
}
|
|
47
|
+
// packages/plugins/plugin-observability/src/ObservabilityPlugin.ts
|
|
48
|
+
var ObservabilityPlugin = (options) => definePlugin(meta, [
|
|
49
|
+
defineModule({
|
|
50
|
+
id: `${meta.id}/module/observability`,
|
|
51
|
+
activatesOn: Events2.Startup,
|
|
52
|
+
activate: async () => contributes(ObservabilityCapabilities.Observability, await options.observability())
|
|
53
|
+
}),
|
|
54
|
+
defineModule({
|
|
55
|
+
id: `${meta.id}/module/settings`,
|
|
56
|
+
activatesOn: Events2.SetupSettings,
|
|
57
|
+
activate: ObservabilitySettings
|
|
58
|
+
}),
|
|
59
|
+
defineModule({
|
|
60
|
+
id: `${meta.id}/module/state`,
|
|
61
|
+
activatesOn: Events2.Startup,
|
|
62
|
+
activatesAfter: [
|
|
63
|
+
ObservabilityEvents.StateReady
|
|
64
|
+
],
|
|
65
|
+
activate: () => ObservabilityState({
|
|
66
|
+
namespace: options.namespace
|
|
67
|
+
})
|
|
68
|
+
}),
|
|
69
|
+
defineModule({
|
|
70
|
+
id: `${meta.id}/module/translations`,
|
|
71
|
+
activatesOn: Events2.SetupTranslations,
|
|
72
|
+
activate: () => contributes(Capabilities.Translations, translations_default)
|
|
73
|
+
}),
|
|
74
|
+
defineModule({
|
|
75
|
+
id: `${meta.id}/module/intent-resolver`,
|
|
76
|
+
activatesOn: Events2.SetupIntents,
|
|
77
|
+
activate: (context) => IntentResolver({
|
|
78
|
+
context,
|
|
79
|
+
namespace: options.namespace
|
|
80
|
+
})
|
|
81
|
+
}),
|
|
82
|
+
defineModule({
|
|
83
|
+
id: `${meta.id}/module/react-surface`,
|
|
84
|
+
activatesOn: Events2.SetupSurfaces,
|
|
85
|
+
activate: ReactSurface
|
|
86
|
+
}),
|
|
87
|
+
defineModule({
|
|
88
|
+
id: `${meta.id}/module/client-ready`,
|
|
89
|
+
activatesOn: allOf(Events2.DispatcherReady, ObservabilityEvents.StateReady, ClientReadyEvent),
|
|
90
|
+
activate: async (context) => {
|
|
91
|
+
const observability = await options.observability();
|
|
92
|
+
return ClientReady({
|
|
93
|
+
context,
|
|
94
|
+
observability,
|
|
95
|
+
namespace: options.namespace
|
|
141
96
|
});
|
|
142
|
-
},
|
|
143
|
-
unload: async () => {
|
|
144
|
-
subscriptions.clear();
|
|
145
|
-
await observability?.close();
|
|
146
|
-
},
|
|
147
|
-
provides: {
|
|
148
|
-
intent: {
|
|
149
|
-
resolvers: ({ plugins }) => {
|
|
150
|
-
const client = findPlugin(plugins, "dxos.org/plugin/client")?.provides.client;
|
|
151
|
-
if (!client || !observability) {
|
|
152
|
-
return [];
|
|
153
|
-
}
|
|
154
|
-
return [
|
|
155
|
-
createResolver(ObservabilityAction.Toggle, async ({ state: state2 }) => {
|
|
156
|
-
invariant(observability, "Observability instance not available", {
|
|
157
|
-
F: __dxlog_file,
|
|
158
|
-
L: 170,
|
|
159
|
-
S: void 0,
|
|
160
|
-
A: [
|
|
161
|
-
"observability",
|
|
162
|
-
"'Observability instance not available'"
|
|
163
|
-
]
|
|
164
|
-
});
|
|
165
|
-
settings.enabled = state2 ?? !settings.enabled;
|
|
166
|
-
observability.event({
|
|
167
|
-
identityId: getTelemetryIdentifier(client),
|
|
168
|
-
name: `${options.namespace}.observability.toggle`,
|
|
169
|
-
properties: {
|
|
170
|
-
enabled: settings.enabled
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
observability.setMode(settings.enabled ? "basic" : "disabled");
|
|
174
|
-
await storeObservabilityDisabled(options.namespace, !settings.enabled);
|
|
175
|
-
return {
|
|
176
|
-
data: settings.enabled
|
|
177
|
-
};
|
|
178
|
-
}),
|
|
179
|
-
createResolver(ObservabilityAction.SendEvent, async (data) => {
|
|
180
|
-
invariant(observability, "Observability instance not available", {
|
|
181
|
-
F: __dxlog_file,
|
|
182
|
-
L: 184,
|
|
183
|
-
S: void 0,
|
|
184
|
-
A: [
|
|
185
|
-
"observability",
|
|
186
|
-
"'Observability instance not available'"
|
|
187
|
-
]
|
|
188
|
-
});
|
|
189
|
-
const event = {
|
|
190
|
-
identityId: getTelemetryIdentifier(client),
|
|
191
|
-
name: `${options.namespace}.${data.name}`,
|
|
192
|
-
properties: {
|
|
193
|
-
...data.properties
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
observability.event(event);
|
|
197
|
-
}),
|
|
198
|
-
createResolver(ObservabilityAction.CaptureUserFeedback, async (data) => {
|
|
199
|
-
invariant(observability, "Observability instance not available", {
|
|
200
|
-
F: __dxlog_file,
|
|
201
|
-
L: 195,
|
|
202
|
-
S: void 0,
|
|
203
|
-
A: [
|
|
204
|
-
"observability",
|
|
205
|
-
"'Observability instance not available'"
|
|
206
|
-
]
|
|
207
|
-
});
|
|
208
|
-
observability.captureUserFeedback(data.email, data.name, data.message);
|
|
209
|
-
})
|
|
210
|
-
];
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
observability: state.values,
|
|
214
|
-
settings,
|
|
215
|
-
surface: {
|
|
216
|
-
definitions: () => createSurface({
|
|
217
|
-
id: OBSERVABILITY_PLUGIN,
|
|
218
|
-
role: "settings",
|
|
219
|
-
filter: (data) => data.subject === OBSERVABILITY_PLUGIN,
|
|
220
|
-
component: () => /* @__PURE__ */ React2.createElement(ObservabilitySettings, {
|
|
221
|
-
settings
|
|
222
|
-
})
|
|
223
|
-
})
|
|
224
|
-
},
|
|
225
|
-
translations: translations_default
|
|
226
97
|
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
// packages/plugins/plugin-observability/src/index.ts
|
|
231
|
-
var src_default = ObservabilityPlugin;
|
|
98
|
+
})
|
|
99
|
+
]);
|
|
232
100
|
export {
|
|
101
|
+
OBSERVABILITY_PLUGIN,
|
|
102
|
+
ObservabilityCapabilities,
|
|
103
|
+
ObservabilityEvents,
|
|
233
104
|
ObservabilityPlugin,
|
|
234
|
-
|
|
235
|
-
parseObservabilityPlugin
|
|
105
|
+
meta
|
|
236
106
|
};
|
|
237
107
|
//# sourceMappingURL=index.mjs.map
|