@fluidframework/fluid-telemetry 2.0.0-dev-rc.3.0.0.253463
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/.eslintrc.cjs +11 -0
- package/.mocharc.cjs +12 -0
- package/LICENSE +21 -0
- package/README.md +118 -0
- package/api-extractor-cjs.json +30 -0
- package/api-extractor-lint.json +4 -0
- package/api-extractor.json +26 -0
- package/api-report/external-telemetry.api.md +68 -0
- package/api-report/fluid-telemetry.api.md +68 -0
- package/dist/app-insights/appInsightsTelemetryConsumer.d.ts +16 -0
- package/dist/app-insights/appInsightsTelemetryConsumer.d.ts.map +1 -0
- package/dist/app-insights/appInsightsTelemetryConsumer.js +24 -0
- package/dist/app-insights/appInsightsTelemetryConsumer.js.map +1 -0
- package/dist/app-insights/index.d.ts +6 -0
- package/dist/app-insights/index.d.ts.map +1 -0
- package/dist/app-insights/index.js +10 -0
- package/dist/app-insights/index.js.map +1 -0
- package/dist/common/consumers/index.d.ts +35 -0
- package/dist/common/consumers/index.d.ts.map +1 -0
- package/dist/common/consumers/index.js +7 -0
- package/dist/common/consumers/index.js.map +1 -0
- package/dist/common/index.d.ts +7 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +7 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/telemetry/index.d.ts +31 -0
- package/dist/common/telemetry/index.d.ts.map +1 -0
- package/dist/common/telemetry/index.js +7 -0
- package/dist/common/telemetry/index.js.map +1 -0
- package/dist/container/containerSystemEvents.d.ts +21 -0
- package/dist/container/containerSystemEvents.d.ts.map +1 -0
- package/dist/container/containerSystemEvents.js +20 -0
- package/dist/container/containerSystemEvents.js.map +1 -0
- package/dist/container/containerTelemetry.d.ts +118 -0
- package/dist/container/containerTelemetry.d.ts.map +1 -0
- package/dist/container/containerTelemetry.js +36 -0
- package/dist/container/containerTelemetry.js.map +1 -0
- package/dist/container/index.d.ts +9 -0
- package/dist/container/index.d.ts.map +1 -0
- package/dist/container/index.js +16 -0
- package/dist/container/index.js.map +1 -0
- package/dist/container/telemetryManager.d.ts +34 -0
- package/dist/container/telemetryManager.d.ts.map +1 -0
- package/dist/container/telemetryManager.js +62 -0
- package/dist/container/telemetryManager.js.map +1 -0
- package/dist/container/telemetryProducer.d.ts +25 -0
- package/dist/container/telemetryProducer.d.ts.map +1 -0
- package/dist/container/telemetryProducer.js +68 -0
- package/dist/container/telemetryProducer.js.map +1 -0
- package/dist/factory/index.d.ts +36 -0
- package/dist/factory/index.d.ts.map +1 -0
- package/dist/factory/index.js +20 -0
- package/dist/factory/index.js.map +1 -0
- package/dist/fluid-telemetry-alpha.d.ts +213 -0
- package/dist/fluid-telemetry-beta.d.ts +213 -0
- package/dist/fluid-telemetry-public.d.ts +32 -0
- package/dist/fluid-telemetry-untrimmed.d.ts +213 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +3 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/lib/app-insights/appInsightsTelemetryConsumer.d.ts +16 -0
- package/lib/app-insights/appInsightsTelemetryConsumer.d.ts.map +1 -0
- package/lib/app-insights/appInsightsTelemetryConsumer.js +20 -0
- package/lib/app-insights/appInsightsTelemetryConsumer.js.map +1 -0
- package/lib/app-insights/index.d.ts +6 -0
- package/lib/app-insights/index.d.ts.map +1 -0
- package/lib/app-insights/index.js +6 -0
- package/lib/app-insights/index.js.map +1 -0
- package/lib/common/consumers/index.d.ts +35 -0
- package/lib/common/consumers/index.d.ts.map +1 -0
- package/lib/common/consumers/index.js +6 -0
- package/lib/common/consumers/index.js.map +1 -0
- package/lib/common/index.d.ts +7 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +6 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/telemetry/index.d.ts +31 -0
- package/lib/common/telemetry/index.d.ts.map +1 -0
- package/lib/common/telemetry/index.js +6 -0
- package/lib/common/telemetry/index.js.map +1 -0
- package/lib/container/containerSystemEvents.d.ts +21 -0
- package/lib/container/containerSystemEvents.d.ts.map +1 -0
- package/lib/container/containerSystemEvents.js +17 -0
- package/lib/container/containerSystemEvents.js.map +1 -0
- package/lib/container/containerTelemetry.d.ts +118 -0
- package/lib/container/containerTelemetry.d.ts.map +1 -0
- package/lib/container/containerTelemetry.js +33 -0
- package/lib/container/containerTelemetry.js.map +1 -0
- package/lib/container/index.d.ts +9 -0
- package/lib/container/index.d.ts.map +1 -0
- package/lib/container/index.js +9 -0
- package/lib/container/index.js.map +1 -0
- package/lib/container/telemetryManager.d.ts +34 -0
- package/lib/container/telemetryManager.d.ts.map +1 -0
- package/lib/container/telemetryManager.js +58 -0
- package/lib/container/telemetryManager.js.map +1 -0
- package/lib/container/telemetryProducer.d.ts +25 -0
- package/lib/container/telemetryProducer.d.ts.map +1 -0
- package/lib/container/telemetryProducer.js +64 -0
- package/lib/container/telemetryProducer.js.map +1 -0
- package/lib/factory/index.d.ts +36 -0
- package/lib/factory/index.d.ts.map +1 -0
- package/lib/factory/index.js +16 -0
- package/lib/factory/index.js.map +1 -0
- package/lib/fluid-telemetry-alpha.d.ts +213 -0
- package/lib/fluid-telemetry-beta.d.ts +213 -0
- package/lib/fluid-telemetry-public.d.ts +32 -0
- package/lib/fluid-telemetry-untrimmed.d.ts +213 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -0
- package/lib/test/containerTelemetry.spec.d.ts +2 -0
- package/lib/test/containerTelemetry.spec.d.ts.map +1 -0
- package/lib/test/containerTelemetry.spec.js +138 -0
- package/lib/test/containerTelemetry.spec.js.map +1 -0
- package/lib/tsdoc-metadata.json +11 -0
- package/package.json +145 -0
- package/src/app-insights/appInsightsTelemetryConsumer.ts +22 -0
- package/src/app-insights/index.ts +6 -0
- package/src/common/consumers/index.ts +36 -0
- package/src/common/index.ts +7 -0
- package/src/common/telemetry/index.ts +33 -0
- package/src/container/containerSystemEvents.ts +23 -0
- package/src/container/containerTelemetry.ts +126 -0
- package/src/container/index.ts +22 -0
- package/src/container/telemetryManager.ts +85 -0
- package/src/container/telemetryProducer.ts +87 -0
- package/src/factory/index.ts +42 -0
- package/src/index.ts +24 -0
- package/tsconfig.cjs.json +8 -0
- package/tsconfig.json +12 -0
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
extends: [require.resolve("@fluidframework/eslint-config-fluid/strict"), "prettier"],
|
|
8
|
+
parserOptions: {
|
|
9
|
+
project: ["./tsconfig.json"],
|
|
10
|
+
},
|
|
11
|
+
};
|
package/.mocharc.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
|
|
8
|
+
const getFluidTestMochaConfig = require("@fluid-internal/mocha-test-setup/mocharc-common");
|
|
9
|
+
|
|
10
|
+
const packageDir = __dirname;
|
|
11
|
+
const config = getFluidTestMochaConfig(packageDir);
|
|
12
|
+
module.exports = config;
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Description
|
|
2
|
+
|
|
3
|
+
This package contains code enabling the production and consumption of typed telemetry for Fluid Framework applications. The typed telemetry from this package is used as the backbone for different Fluid Framework cloud offerings such as dashboards and alarms for Fluid applications. This package can also be used as a reference for customizing and creating your own telemetry solution if desired.
|
|
4
|
+
|
|
5
|
+
At this time, the package enables collection of Fluid Container related telemetry. In the future more areas may be added as needed by customers.
|
|
6
|
+
|
|
7
|
+
# Getting Started
|
|
8
|
+
|
|
9
|
+
Let's walk through some simple examples for getting started with Fluid telemetry for containers using the @fluidframework/fluid-telemetry package, we'll have to write some code.
|
|
10
|
+
|
|
11
|
+
## Example 1: Logging container telemetry to Azure App Insights
|
|
12
|
+
|
|
13
|
+
Before you can get telemetry sent to Azure App Insights, you'll need to create an Instance of App Insights on Azure. Then you'll be able to create an Azure App Insights client that you can easily turn into a ITelemetryConsumer and finally hook it up to container telemetry. [Learn more about Azure App Insights](https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview)
|
|
14
|
+
|
|
15
|
+
### Step 1: Install the @fluidframework/fluid-telemetry package and Azure App Insights package dependencies
|
|
16
|
+
|
|
17
|
+
- Using NPM: `npm install @fluidframework/fluid-telemetry @microsoft/applicationinsights-web`
|
|
18
|
+
|
|
19
|
+
#### Step 2: Now, let's start the telemetry production by initializing our telemetry collection where we initialize our containers:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { ApplicationInsights } from "@microsoft/applicationinsights-web";
|
|
23
|
+
import { IFluidContainer } from "@fluidframework/fluid-static";
|
|
24
|
+
import { ITelemetryConsumer , TelemetryConfig, startTelemetry, IFluidTelemetry } from "@fluidframework/fluid-telemetry"
|
|
25
|
+
import { AppInsightsTelemetryConsumer } from "@fluidframework/fluid-telemetry/app-insights"
|
|
26
|
+
|
|
27
|
+
// 1: This is supposed to be your code for creating/loading a Fluid Container
|
|
28
|
+
let myAppContainer: IFluidContainer;
|
|
29
|
+
let myAppContainerId: string;
|
|
30
|
+
if (containerExists) {
|
|
31
|
+
myAppContainerId = {...your code to get the id of the existing container}
|
|
32
|
+
myAppContainer = {...your code to load a Fluid Container from myAppContainerId}
|
|
33
|
+
} else {
|
|
34
|
+
myAppContainer = {...your code to create a new Fluid Container}
|
|
35
|
+
myAppContainerId = await myAppContainer.attach();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 2a: Instantiate our Azure App Insights Client
|
|
39
|
+
const appInsightsClient = new ApplicationInsights({
|
|
40
|
+
config: {
|
|
41
|
+
connectionString:
|
|
42
|
+
// Edit this with your app insights instance connection string (this is an example string)
|
|
43
|
+
"InstrumentationKey=abcdefgh-ijkl-mnop-qrst-uvwxyz6ffd9c;IngestionEndpoint=https://westus2-2.in.applicationinsights.azure.com/;LiveEndpoint=https://westus2.livediagnostics.monitor.azure.com/",
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// 2b: Initializes the App Insights client. Without this, logs will not be sent to Azure.
|
|
48
|
+
appInsightsClient.loadAppInsights();
|
|
49
|
+
|
|
50
|
+
// 3: Next, we'll create the telemetry config object.
|
|
51
|
+
// Note that we have to obtain the containerId before we can do this.
|
|
52
|
+
const telemetryConfig: TelemetryConfig = {
|
|
53
|
+
container: myAppContainer,
|
|
54
|
+
containerId: myAppContainerId,
|
|
55
|
+
// We import AppInsightsTelemetryConsumer from the fluid-telemetry package
|
|
56
|
+
consumers: [new AppInsightsTelemetryConsumer(appInsightsClient)],
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// 4. Start Telemetry
|
|
60
|
+
startTelemetry(telemetryConfig);
|
|
61
|
+
|
|
62
|
+
// Done! Your container telemetry is now being created and sent to your Telemetry Consumer which will forward it to Azure App Insights.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Congrats, that's it for now! If you've decided to use Azure App Insights, we have designed useful prebuilt queries for you that utilize the generated telemetry
|
|
66
|
+
|
|
67
|
+
## Example 2: Extending ITelemetryConsumer to send Fluid telemetry to a custom destination
|
|
68
|
+
|
|
69
|
+
In this example, you'll walk through the basic setup process to start getting container telemetry to be produced and logging it to the console.
|
|
70
|
+
|
|
71
|
+
### Step 1: Install the @fluidframework/fluid-telemetry package dependency
|
|
72
|
+
|
|
73
|
+
- Using NPM: `npm install @fluidframework/fluid-telemetry`
|
|
74
|
+
|
|
75
|
+
### Step 2: First, we'll have to create our own telemetry consumer which extends the ITelemetryConsumer interface. Let's look at an example that will simply console.log the telemetry.
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
import { ITelemetryConsumer, IFluidTelemetry } from "@fluidframework/fluid-telemetry";
|
|
79
|
+
|
|
80
|
+
class MySimpleTelemetryConsumer implements ITelemetryConsumer {
|
|
81
|
+
consume(event: IFluidTelemetry) {
|
|
82
|
+
console.log(event);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Step 3: Now, let's start the telemetry production and hook in our telemetry consumer from step 2. We will be initializing our telemetry collection where we initialize our containers:
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
import { IFluidContainer } from "@fluidframework/fluid-static";
|
|
91
|
+
import { ITelemetryConsumer , TelemetryConfig, startTelemetry, IFluidTelemetry } from "@fluidframework/external-telemetry"
|
|
92
|
+
// 1: import our implementation of MySimpleTelemetryConsumer from step 1
|
|
93
|
+
import { MySimpleTelemetryConsumer } from "./mySimpleTelmetryConsumer"
|
|
94
|
+
|
|
95
|
+
// 2: This is supposed to be your code for creating/loading a Fluid Container
|
|
96
|
+
let myAppContainer: IFluidContainer;
|
|
97
|
+
let myAppContainerId: string;
|
|
98
|
+
if (containerExists) {
|
|
99
|
+
myAppContainerId = {...your code to get the id of the existing container}
|
|
100
|
+
myAppContainer = {...your code to load a Fluid Container from myAppContainerId}
|
|
101
|
+
} else {
|
|
102
|
+
myAppContainer = {...your code to create a new Fluid Container}
|
|
103
|
+
myAppContainerId = await myAppContainer.attach();
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// 3. Next, we'll create the telemetry config object.
|
|
107
|
+
// Note that we have to obtain the containerId before we can do this.
|
|
108
|
+
const telemetryConfig: TelemetryConfig = {
|
|
109
|
+
container: myAppContainer,
|
|
110
|
+
containerId: myAppContainerId,
|
|
111
|
+
consumers: [new MySimpleTelemetryConsumer(appInsightsClient)],
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
// 4. Start Telemetry
|
|
115
|
+
startTelemetry(telemetryConfig);
|
|
116
|
+
|
|
117
|
+
// Done! Your container telemetry is now being created and sent to your Telemetry Consumer
|
|
118
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "../../../../common/build/build-common/api-extractor-base.cjs.primary.json",
|
|
4
|
+
// CJS is actually secondary; so, no report.
|
|
5
|
+
"apiReport": {
|
|
6
|
+
"enabled": false
|
|
7
|
+
},
|
|
8
|
+
"messages": {
|
|
9
|
+
// The following overrides are workarounds for API-Extractor incorrectly running analysis on our application
|
|
10
|
+
// insights dependency.
|
|
11
|
+
"tsdocMessageReporting": {
|
|
12
|
+
"tsdoc-escape-right-brace": {
|
|
13
|
+
"logLevel": "none"
|
|
14
|
+
},
|
|
15
|
+
"tsdoc-malformed-inline-tag": {
|
|
16
|
+
"logLevel": "none"
|
|
17
|
+
},
|
|
18
|
+
"tsdoc-undefined-tag": {
|
|
19
|
+
"logLevel": "none"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"extractorMessageReporting": {
|
|
23
|
+
// Require documentation on all package-exported API items.
|
|
24
|
+
"ae-undocumented": {
|
|
25
|
+
"logLevel": "error",
|
|
26
|
+
"addToApiReportFile": false
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "../../../../common/build/build-common/api-extractor-base.esm.primary.json",
|
|
4
|
+
"messages": {
|
|
5
|
+
// The following overrides are workarounds for API-Extractor incorrectly running analysis on our application
|
|
6
|
+
// insights dependency.
|
|
7
|
+
"tsdocMessageReporting": {
|
|
8
|
+
"tsdoc-escape-right-brace": {
|
|
9
|
+
"logLevel": "none"
|
|
10
|
+
},
|
|
11
|
+
"tsdoc-malformed-inline-tag": {
|
|
12
|
+
"logLevel": "none"
|
|
13
|
+
},
|
|
14
|
+
"tsdoc-undefined-tag": {
|
|
15
|
+
"logLevel": "none"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"extractorMessageReporting": {
|
|
19
|
+
// Require documentation on all package-exported API items.
|
|
20
|
+
"ae-undocumented": {
|
|
21
|
+
"logLevel": "error",
|
|
22
|
+
"addToApiReportFile": false
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
## API Report File for "@fluidframework/external-telemetry"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { ICriticalContainerError } from '@fluidframework/container-definitions';
|
|
8
|
+
import type { IFluidContainer } from '@fluidframework/fluid-static';
|
|
9
|
+
|
|
10
|
+
// @beta
|
|
11
|
+
export interface ContainerConnectedTelemetry extends IContainerTelemetry {
|
|
12
|
+
eventName: "fluidframework.container.connected";
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// @beta
|
|
16
|
+
export interface ContainerDisconnectedTelemetry extends IContainerTelemetry {
|
|
17
|
+
eventName: "fluidframework.container.disconnected";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// @beta
|
|
21
|
+
export interface ContainerDisposedTelemetry extends IContainerTelemetry {
|
|
22
|
+
error?: ICriticalContainerError;
|
|
23
|
+
eventName: "fluidframework.container.disposed";
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// @beta
|
|
27
|
+
export type ContainerTelemetryEventName = (typeof ContainerTelemetryEventNames)[keyof typeof ContainerTelemetryEventNames];
|
|
28
|
+
|
|
29
|
+
// @beta
|
|
30
|
+
export const ContainerTelemetryEventNames: {
|
|
31
|
+
readonly CONNECTED: "fluidframework.container.connected";
|
|
32
|
+
readonly DISCONNECTED: "fluidframework.container.disconnected";
|
|
33
|
+
readonly DISPOSED: "fluidframework.container.disposed";
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// @beta
|
|
37
|
+
export type FluidTelemetryEventName = ContainerTelemetryEventName;
|
|
38
|
+
|
|
39
|
+
// @beta
|
|
40
|
+
export interface IContainerTelemetry extends IFluidTelemetry {
|
|
41
|
+
containerId?: string;
|
|
42
|
+
containerInstanceId: string;
|
|
43
|
+
eventName: ContainerTelemetryEventName;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// @beta
|
|
47
|
+
export interface IFluidTelemetry {
|
|
48
|
+
eventName: FluidTelemetryEventName;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// @beta
|
|
52
|
+
export interface ITelemetryConsumer {
|
|
53
|
+
consume(event: IFluidTelemetry): any;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// @beta
|
|
57
|
+
export const startTelemetry: (config: TelemetryConfig) => void;
|
|
58
|
+
|
|
59
|
+
// @beta
|
|
60
|
+
export interface TelemetryConfig {
|
|
61
|
+
consumers: ITelemetryConsumer[];
|
|
62
|
+
container: IFluidContainer;
|
|
63
|
+
containerId: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// (No @packageDocumentation comment for this package)
|
|
67
|
+
|
|
68
|
+
```
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
## API Report File for "@fluidframework/fluid-telemetry"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { ICriticalContainerError } from '@fluidframework/container-definitions';
|
|
8
|
+
import type { IFluidContainer } from '@fluidframework/fluid-static';
|
|
9
|
+
|
|
10
|
+
// @beta
|
|
11
|
+
export interface ContainerConnectedTelemetry extends IContainerTelemetry {
|
|
12
|
+
eventName: "fluidframework.container.connected";
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// @beta
|
|
16
|
+
export interface ContainerDisconnectedTelemetry extends IContainerTelemetry {
|
|
17
|
+
eventName: "fluidframework.container.disconnected";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// @beta
|
|
21
|
+
export interface ContainerDisposedTelemetry extends IContainerTelemetry {
|
|
22
|
+
error?: ICriticalContainerError;
|
|
23
|
+
eventName: "fluidframework.container.disposed";
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// @beta
|
|
27
|
+
export type ContainerTelemetryEventName = (typeof ContainerTelemetryEventNames)[keyof typeof ContainerTelemetryEventNames];
|
|
28
|
+
|
|
29
|
+
// @beta
|
|
30
|
+
export const ContainerTelemetryEventNames: {
|
|
31
|
+
readonly CONNECTED: "fluidframework.container.connected";
|
|
32
|
+
readonly DISCONNECTED: "fluidframework.container.disconnected";
|
|
33
|
+
readonly DISPOSED: "fluidframework.container.disposed";
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// @beta
|
|
37
|
+
export type FluidTelemetryEventName = ContainerTelemetryEventName;
|
|
38
|
+
|
|
39
|
+
// @beta
|
|
40
|
+
export interface IContainerTelemetry extends IFluidTelemetry {
|
|
41
|
+
containerId?: string;
|
|
42
|
+
containerInstanceId: string;
|
|
43
|
+
eventName: ContainerTelemetryEventName;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { ICriticalContainerError }
|
|
47
|
+
|
|
48
|
+
// @beta
|
|
49
|
+
export interface IFluidTelemetry {
|
|
50
|
+
eventName: FluidTelemetryEventName;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// @beta
|
|
54
|
+
export interface ITelemetryConsumer {
|
|
55
|
+
consume(event: IFluidTelemetry): any;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// @beta
|
|
59
|
+
export const startTelemetry: (config: TelemetryConfig) => void;
|
|
60
|
+
|
|
61
|
+
// @beta
|
|
62
|
+
export interface TelemetryConfig {
|
|
63
|
+
consumers: ITelemetryConsumer[];
|
|
64
|
+
container: IFluidContainer;
|
|
65
|
+
containerId: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { type ApplicationInsights } from "@microsoft/applicationinsights-web";
|
|
6
|
+
import type { IFluidTelemetry, ITelemetryConsumer } from "../common/index.js";
|
|
7
|
+
/**
|
|
8
|
+
* An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights
|
|
9
|
+
* in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.
|
|
10
|
+
*/
|
|
11
|
+
export declare class AppInsightsTelemetryConsumer implements ITelemetryConsumer {
|
|
12
|
+
private readonly appInsightsClient;
|
|
13
|
+
constructor(appInsightsClient: ApplicationInsights);
|
|
14
|
+
consume(event: IFluidTelemetry): void;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=appInsightsTelemetryConsumer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appInsightsTelemetryConsumer.d.ts","sourceRoot":"","sources":["../../src/app-insights/appInsightsTelemetryConsumer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE9E;;;GAGG;AACH,qBAAa,4BAA6B,YAAW,kBAAkB;IACnD,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,mBAAmB;IAEnE,OAAO,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;CAM5C"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.AppInsightsTelemetryConsumer = void 0;
|
|
8
|
+
/**
|
|
9
|
+
* An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights
|
|
10
|
+
* in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.
|
|
11
|
+
*/
|
|
12
|
+
class AppInsightsTelemetryConsumer {
|
|
13
|
+
constructor(appInsightsClient) {
|
|
14
|
+
this.appInsightsClient = appInsightsClient;
|
|
15
|
+
}
|
|
16
|
+
consume(event) {
|
|
17
|
+
this.appInsightsClient.trackEvent({
|
|
18
|
+
name: event.eventName,
|
|
19
|
+
properties: event,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.AppInsightsTelemetryConsumer = AppInsightsTelemetryConsumer;
|
|
24
|
+
//# sourceMappingURL=appInsightsTelemetryConsumer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appInsightsTelemetryConsumer.js","sourceRoot":"","sources":["../../src/app-insights/appInsightsTelemetryConsumer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH;;;GAGG;AACH,MAAa,4BAA4B;IACxC,YAAoC,iBAAsC;QAAtC,sBAAiB,GAAjB,iBAAiB,CAAqB;IAAG,CAAC;IAEvE,OAAO,CAAC,KAAsB;QACpC,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC;YACjC,IAAI,EAAE,KAAK,CAAC,SAAS;YACrB,UAAU,EAAE,KAAK;SACjB,CAAC,CAAC;IACJ,CAAC;CACD;AATD,oEASC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ApplicationInsights } from \"@microsoft/applicationinsights-web\";\nimport type { IFluidTelemetry, ITelemetryConsumer } from \"../common/index.js\";\n\n/**\n * An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights\n * in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.\n */\nexport class AppInsightsTelemetryConsumer implements ITelemetryConsumer {\n\tpublic constructor(private readonly appInsightsClient: ApplicationInsights) {}\n\n\tpublic consume(event: IFluidTelemetry): void {\n\t\tthis.appInsightsClient.trackEvent({\n\t\t\tname: event.eventName,\n\t\t\tproperties: event,\n\t\t});\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app-insights/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.AppInsightsTelemetryConsumer = void 0;
|
|
8
|
+
var appInsightsTelemetryConsumer_js_1 = require("./appInsightsTelemetryConsumer.js");
|
|
9
|
+
Object.defineProperty(exports, "AppInsightsTelemetryConsumer", { enumerable: true, get: function () { return appInsightsTelemetryConsumer_js_1.AppInsightsTelemetryConsumer; } });
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app-insights/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { AppInsightsTelemetryConsumer } from \"./appInsightsTelemetryConsumer.js\";\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import type { IFluidTelemetry } from "../index.js";
|
|
6
|
+
/**
|
|
7
|
+
* Base interface for all telemetry consumers.
|
|
8
|
+
* Conusmers are intended to take incoming produced {@link IFluidTelemetry} and do something of your choice with it.
|
|
9
|
+
* This could be sending the telemetry to a cloud platform or just console logging.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* Here is an example of how we construct a consumer to send telemetry to Azure App Insights, a cloud logging platform:
|
|
13
|
+
* ```ts
|
|
14
|
+
* class AppInsightsTelemetryConsumer implements ITelemetryConsumer {
|
|
15
|
+
* constructor(private readonly appInsightsClient: ApplicationInsights) {}
|
|
16
|
+
*
|
|
17
|
+
* consume(event: IFluidTelemetry) {
|
|
18
|
+
* this.appInsightsClient.trackEvent({
|
|
19
|
+
* name: event.eventName,
|
|
20
|
+
* properties: event,
|
|
21
|
+
* });
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
*```
|
|
25
|
+
*
|
|
26
|
+
* @beta
|
|
27
|
+
*/
|
|
28
|
+
export interface ITelemetryConsumer {
|
|
29
|
+
/**
|
|
30
|
+
* This method is intended to take created {@link IFluidTelemetry} and do something with it.
|
|
31
|
+
* This could be sending the telemetry to a cloud platform, just console logging or something else of your choice.
|
|
32
|
+
*/
|
|
33
|
+
consume(event: IFluidTelemetry): any;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/consumers/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,kBAAkB;IAClC;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,eAAe,OAAE;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/consumers/index.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidTelemetry } from \"../index.js\";\n\n/**\n * Base interface for all telemetry consumers.\n * Conusmers are intended to take incoming produced {@link IFluidTelemetry} and do something of your choice with it.\n * This could be sending the telemetry to a cloud platform or just console logging.\n *\n * @example\n * Here is an example of how we construct a consumer to send telemetry to Azure App Insights, a cloud logging platform:\n * ```ts\n * class AppInsightsTelemetryConsumer implements ITelemetryConsumer {\n *\t constructor(private readonly appInsightsClient: ApplicationInsights) {}\n *\n *\t consume(event: IFluidTelemetry) {\n *\t\t this.appInsightsClient.trackEvent({\n *\t\t\t name: event.eventName,\n *\t\t\t properties: event,\n *\t\t });\n *\t }\n * }\n *```\n *\n * @beta\n */\nexport interface ITelemetryConsumer {\n\t/**\n\t * This method is intended to take created {@link IFluidTelemetry} and do something with it.\n\t * This could be sending the telemetry to a cloud platform, just console logging or something else of your choice.\n\t */\n\tconsume(event: IFluidTelemetry);\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
export { type ITelemetryConsumer } from "./consumers/index.js";
|
|
6
|
+
export { type IFluidTelemetry, type FluidTelemetryEventName } from "./telemetry/index.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { type ITelemetryConsumer } from \"./consumers/index.js\";\nexport { type IFluidTelemetry, type FluidTelemetryEventName } from \"./telemetry/index.js\";\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import type { ContainerTelemetryEventName } from "../../container/index.js";
|
|
6
|
+
/**
|
|
7
|
+
* The base interface extended by all Fluid telemetry
|
|
8
|
+
*
|
|
9
|
+
* @see {@link @fluidframework/fluid-telemetry#IContainerTelemetry} for an extension of this interface for all container related telemetry.
|
|
10
|
+
*
|
|
11
|
+
* @beta
|
|
12
|
+
*/
|
|
13
|
+
export interface IFluidTelemetry {
|
|
14
|
+
/**
|
|
15
|
+
* The unique name of the telemetry event. The event name contains scope concatenated together
|
|
16
|
+
* with periods to enable more granular log searching
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* "fluidframework.container.connected"
|
|
20
|
+
*/
|
|
21
|
+
eventName: FluidTelemetryEventName;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Aggregate type for all the different types of Fluid telemetry event names.
|
|
25
|
+
*
|
|
26
|
+
* @privateremarks This only looks odd right now because {@link ContainerTelemetryEventName} is the only aggregation at the moment.
|
|
27
|
+
*
|
|
28
|
+
* @beta
|
|
29
|
+
*/
|
|
30
|
+
export type FluidTelemetryEventName = ContainerTelemetryEventName;
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/telemetry/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAE5E;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC/B;;;;;;OAMG;IACH,SAAS,EAAE,uBAAuB,CAAC;CACnC;AAED;;;;;;GAMG;AACH,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/telemetry/index.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ContainerTelemetryEventName } from \"../../container/index.js\";\n\n/**\n * The base interface extended by all Fluid telemetry\n *\n * @see {@link @fluidframework/fluid-telemetry#IContainerTelemetry} for an extension of this interface for all container related telemetry.\n *\n * @beta\n */\nexport interface IFluidTelemetry {\n\t/**\n\t * The unique name of the telemetry event. The event name contains scope concatenated together\n\t * with periods to enable more granular log searching\n\t *\n\t * @example\n\t * \"fluidframework.container.connected\"\n\t */\n\teventName: FluidTelemetryEventName;\n}\n\n/**\n * Aggregate type for all the different types of Fluid telemetry event names.\n *\n * @privateremarks This only looks odd right now because {@link ContainerTelemetryEventName} is the only aggregation at the moment.\n *\n * @beta\n */\nexport type FluidTelemetryEventName = ContainerTelemetryEventName;\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* This object contains a non-exhaustive set of the unique event names of raw {@link @fluidframework/fluid-static#IFluidContainerEvents | system events } produced by Fluid containers.
|
|
7
|
+
* It's important to note that each actual system events is a function signature such as `(event: "readonly", listener: (readonly: boolean) => void): void;`
|
|
8
|
+
* but this object only captures the event name in each function.
|
|
9
|
+
*
|
|
10
|
+
* @privateremarks This should probably exist within IContainer itself instead of being defined here.
|
|
11
|
+
*/
|
|
12
|
+
export declare const IFluidContainerSystemEventNames: {
|
|
13
|
+
readonly CONNECTED: "connected";
|
|
14
|
+
readonly DISCONNECTED: "disconnected";
|
|
15
|
+
readonly DISPOSED: "disposed";
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The type for all values within {@link IFluidContainerSystemEventNames}
|
|
19
|
+
*/
|
|
20
|
+
export type IFluidContainerSystemEventName = (typeof IFluidContainerSystemEventNames)[keyof typeof IFluidContainerSystemEventNames];
|
|
21
|
+
//# sourceMappingURL=containerSystemEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containerSystemEvents.d.ts","sourceRoot":"","sources":["../../src/container/containerSystemEvents.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B;;;;CAIlC,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACzC,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,OAAO,+BAA+B,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.IFluidContainerSystemEventNames = void 0;
|
|
8
|
+
/**
|
|
9
|
+
* This object contains a non-exhaustive set of the unique event names of raw {@link @fluidframework/fluid-static#IFluidContainerEvents | system events } produced by Fluid containers.
|
|
10
|
+
* It's important to note that each actual system events is a function signature such as `(event: "readonly", listener: (readonly: boolean) => void): void;`
|
|
11
|
+
* but this object only captures the event name in each function.
|
|
12
|
+
*
|
|
13
|
+
* @privateremarks This should probably exist within IContainer itself instead of being defined here.
|
|
14
|
+
*/
|
|
15
|
+
exports.IFluidContainerSystemEventNames = {
|
|
16
|
+
CONNECTED: "connected",
|
|
17
|
+
DISCONNECTED: "disconnected",
|
|
18
|
+
DISPOSED: "disposed",
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=containerSystemEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containerSystemEvents.js","sourceRoot":"","sources":["../../src/container/containerSystemEvents.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;GAMG;AACU,QAAA,+BAA+B,GAAG;IAC9C,SAAS,EAAE,WAAW;IACtB,YAAY,EAAE,cAAc;IAC5B,QAAQ,EAAE,UAAU;CACX,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This object contains a non-exhaustive set of the unique event names of raw {@link @fluidframework/fluid-static#IFluidContainerEvents | system events } produced by Fluid containers.\n * It's important to note that each actual system events is a function signature such as `(event: \"readonly\", listener: (readonly: boolean) => void): void;`\n * but this object only captures the event name in each function.\n *\n * @privateremarks This should probably exist within IContainer itself instead of being defined here.\n */\nexport const IFluidContainerSystemEventNames = {\n\tCONNECTED: \"connected\",\n\tDISCONNECTED: \"disconnected\",\n\tDISPOSED: \"disposed\",\n} as const;\n\n/**\n * The type for all values within {@link IFluidContainerSystemEventNames}\n */\nexport type IFluidContainerSystemEventName =\n\t(typeof IFluidContainerSystemEventNames)[keyof typeof IFluidContainerSystemEventNames];\n"]}
|