@fluidframework/fluid-telemetry 2.0.0-dev-rc.3.0.0.253463 → 2.0.0-dev-rc.3.0.0.254274

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/README.md CHANGED
@@ -22,7 +22,7 @@ Before you can get telemetry sent to Azure App Insights, you'll need to create a
22
22
  import { ApplicationInsights } from "@microsoft/applicationinsights-web";
23
23
  import { IFluidContainer } from "@fluidframework/fluid-static";
24
24
  import { ITelemetryConsumer , TelemetryConfig, startTelemetry, IFluidTelemetry } from "@fluidframework/fluid-telemetry"
25
- import { AppInsightsTelemetryConsumer } from "@fluidframework/fluid-telemetry/app-insights"
25
+ import { AppInsightsTelemetryConsumer } from "@fluidframework/fluid-telemetry"
26
26
 
27
27
  // 1: This is supposed to be your code for creating/loading a Fluid Container
28
28
  let myAppContainer: IFluidContainer;
@@ -4,9 +4,16 @@
4
4
 
5
5
  ```ts
6
6
 
7
+ import { ApplicationInsights } from '@microsoft/applicationinsights-web';
7
8
  import { ICriticalContainerError } from '@fluidframework/container-definitions';
8
9
  import type { IFluidContainer } from '@fluidframework/fluid-static';
9
10
 
11
+ // @beta
12
+ export class AppInsightsTelemetryConsumer implements ITelemetryConsumer {
13
+ constructor(appInsightsClient: ApplicationInsights);
14
+ consume(event: IFluidTelemetry): void;
15
+ }
16
+
10
17
  // @beta
11
18
  export interface ContainerConnectedTelemetry extends IContainerTelemetry {
12
19
  eventName: "fluidframework.container.connected";
@@ -7,10 +7,15 @@ import type { IFluidTelemetry, ITelemetryConsumer } from "../common/index.js";
7
7
  /**
8
8
  * An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights
9
9
  * in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.
10
+ *
11
+ * @beta
10
12
  */
11
13
  export declare class AppInsightsTelemetryConsumer implements ITelemetryConsumer {
12
14
  private readonly appInsightsClient;
13
15
  constructor(appInsightsClient: ApplicationInsights);
16
+ /**
17
+ * Takes the incoming {@link IFluidTelemetry} and sends it to Azure App Insights
18
+ */
14
19
  consume(event: IFluidTelemetry): void;
15
20
  }
16
21
  //# sourceMappingURL=appInsightsTelemetryConsumer.d.ts.map
@@ -1 +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"}
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;;;;;GAKG;AACH,qBAAa,4BAA6B,YAAW,kBAAkB;IACnD,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,mBAAmB;IAE1E;;OAEG;IACI,OAAO,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;CAM5C"}
@@ -8,11 +8,16 @@ exports.AppInsightsTelemetryConsumer = void 0;
8
8
  /**
9
9
  * An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights
10
10
  * in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.
11
+ *
12
+ * @beta
11
13
  */
12
14
  class AppInsightsTelemetryConsumer {
13
15
  constructor(appInsightsClient) {
14
16
  this.appInsightsClient = appInsightsClient;
15
17
  }
18
+ /**
19
+ * Takes the incoming {@link IFluidTelemetry} and sends it to Azure App Insights
20
+ */
16
21
  consume(event) {
17
22
  this.appInsightsClient.trackEvent({
18
23
  name: event.eventName,
@@ -1 +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"]}
1
+ {"version":3,"file":"appInsightsTelemetryConsumer.js","sourceRoot":"","sources":["../../src/app-insights/appInsightsTelemetryConsumer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH;;;;;GAKG;AACH,MAAa,4BAA4B;IACxC,YAAoC,iBAAsC;QAAtC,sBAAiB,GAAjB,iBAAiB,CAAqB;IAAG,CAAC;IAE9E;;OAEG;IACI,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;AAZD,oEAYC","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 *\n * @beta\n */\nexport class AppInsightsTelemetryConsumer implements ITelemetryConsumer {\n\tpublic constructor(private readonly appInsightsClient: ApplicationInsights) {}\n\n\t/**\n\t * Takes the incoming {@link IFluidTelemetry} and sends it to Azure App Insights\n\t */\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"]}
@@ -3,9 +3,25 @@
3
3
  * @packageDocumentation
4
4
  */
5
5
 
6
+ import { ApplicationInsights } from '@microsoft/applicationinsights-web';
6
7
  import { ICriticalContainerError } from '@fluidframework/container-definitions';
7
8
  import type { IFluidContainer } from '@fluidframework/fluid-static';
8
9
 
10
+ /**
11
+ * An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights
12
+ * in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.
13
+ *
14
+ * @beta
15
+ */
16
+ export declare class AppInsightsTelemetryConsumer implements ITelemetryConsumer {
17
+ private readonly appInsightsClient;
18
+ constructor(appInsightsClient: ApplicationInsights);
19
+ /**
20
+ * Takes the incoming {@link IFluidTelemetry} and sends it to Azure App Insights
21
+ */
22
+ consume(event: IFluidTelemetry): void;
23
+ }
24
+
9
25
  /**
10
26
  * The container "connected" telemetry event.
11
27
  * It is produced from an internal Fluid container system event {@link @fluidframework/container-definitions#IContainerEvents} which is emitted when the {@link @fluidframework/container-definitions#IContainer} completes connecting to the Fluid service.
@@ -3,9 +3,25 @@
3
3
  * @packageDocumentation
4
4
  */
5
5
 
6
+ import { ApplicationInsights } from '@microsoft/applicationinsights-web';
6
7
  import { ICriticalContainerError } from '@fluidframework/container-definitions';
7
8
  import type { IFluidContainer } from '@fluidframework/fluid-static';
8
9
 
10
+ /**
11
+ * An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights
12
+ * in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.
13
+ *
14
+ * @beta
15
+ */
16
+ export declare class AppInsightsTelemetryConsumer implements ITelemetryConsumer {
17
+ private readonly appInsightsClient;
18
+ constructor(appInsightsClient: ApplicationInsights);
19
+ /**
20
+ * Takes the incoming {@link IFluidTelemetry} and sends it to Azure App Insights
21
+ */
22
+ consume(event: IFluidTelemetry): void;
23
+ }
24
+
9
25
  /**
10
26
  * The container "connected" telemetry event.
11
27
  * It is produced from an internal Fluid container system event {@link @fluidframework/container-definitions#IContainerEvents} which is emitted when the {@link @fluidframework/container-definitions#IContainer} completes connecting to the Fluid service.
@@ -3,9 +3,12 @@
3
3
  * @packageDocumentation
4
4
  */
5
5
 
6
+ import { ApplicationInsights } from '@microsoft/applicationinsights-web';
6
7
  import { ICriticalContainerError } from '@fluidframework/container-definitions';
7
8
  import type { IFluidContainer } from '@fluidframework/fluid-static';
8
9
 
10
+ /* Excluded from this release type: AppInsightsTelemetryConsumer */
11
+
9
12
  /* Excluded from this release type: ContainerConnectedTelemetry */
10
13
 
11
14
  /* Excluded from this release type: ContainerDisconnectedTelemetry */
@@ -3,9 +3,25 @@
3
3
  * @packageDocumentation
4
4
  */
5
5
 
6
+ import { ApplicationInsights } from '@microsoft/applicationinsights-web';
6
7
  import { ICriticalContainerError } from '@fluidframework/container-definitions';
7
8
  import type { IFluidContainer } from '@fluidframework/fluid-static';
8
9
 
10
+ /**
11
+ * An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights
12
+ * in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.
13
+ *
14
+ * @beta
15
+ */
16
+ export declare class AppInsightsTelemetryConsumer implements ITelemetryConsumer {
17
+ private readonly appInsightsClient;
18
+ constructor(appInsightsClient: ApplicationInsights);
19
+ /**
20
+ * Takes the incoming {@link IFluidTelemetry} and sends it to Azure App Insights
21
+ */
22
+ consume(event: IFluidTelemetry): void;
23
+ }
24
+
9
25
  /**
10
26
  * The container "connected" telemetry event.
11
27
  * It is produced from an internal Fluid container system event {@link @fluidframework/container-definitions#IContainerEvents} which is emitted when the {@link @fluidframework/container-definitions#IContainer} completes connecting to the Fluid service.
package/dist/index.d.ts CHANGED
@@ -9,5 +9,6 @@
9
9
  export { type ICriticalContainerError } from "@fluidframework/container-definitions";
10
10
  export { type IFluidTelemetry, type FluidTelemetryEventName, type ITelemetryConsumer, } from "./common/index.js";
11
11
  export { type IContainerTelemetry, type ContainerTelemetryEventName, ContainerTelemetryEventNames, type ContainerConnectedTelemetry, type ContainerDisconnectedTelemetry, type ContainerDisposedTelemetry, } from "./container/index.js";
12
+ export { AppInsightsTelemetryConsumer } from "./app-insights/index.js";
12
13
  export { startTelemetry, type TelemetryConfig } from "./factory/index.js";
13
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,4BAA4B,EAC5B,KAAK,2BAA2B,EAChC,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,GAC/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,4BAA4B,EAC5B,KAAK,2BAA2B,EAChC,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,GAC/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -4,9 +4,11 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.startTelemetry = exports.ContainerTelemetryEventNames = void 0;
7
+ exports.startTelemetry = exports.AppInsightsTelemetryConsumer = exports.ContainerTelemetryEventNames = void 0;
8
8
  var index_js_1 = require("./container/index.js");
9
9
  Object.defineProperty(exports, "ContainerTelemetryEventNames", { enumerable: true, get: function () { return index_js_1.ContainerTelemetryEventNames; } });
10
- var index_js_2 = require("./factory/index.js");
11
- Object.defineProperty(exports, "startTelemetry", { enumerable: true, get: function () { return index_js_2.startTelemetry; } });
10
+ var index_js_2 = require("./app-insights/index.js");
11
+ Object.defineProperty(exports, "AppInsightsTelemetryConsumer", { enumerable: true, get: function () { return index_js_2.AppInsightsTelemetryConsumer; } });
12
+ var index_js_3 = require("./factory/index.js");
13
+ Object.defineProperty(exports, "startTelemetry", { enumerable: true, get: function () { return index_js_3.startTelemetry; } });
12
14
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH,iDAO8B;AAJ7B,wHAAA,4BAA4B,OAAA;AAK7B,+CAA0E;AAAjE,0GAAA,cAAc,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This package provides an implementation and types for producing and consuming telemetry for Fluid Framework applications\n * @packageDocumentation\n */\nexport { type ICriticalContainerError } from \"@fluidframework/container-definitions\";\nexport {\n\ttype IFluidTelemetry,\n\ttype FluidTelemetryEventName,\n\ttype ITelemetryConsumer,\n} from \"./common/index.js\";\nexport {\n\ttype IContainerTelemetry,\n\ttype ContainerTelemetryEventName,\n\tContainerTelemetryEventNames,\n\ttype ContainerConnectedTelemetry,\n\ttype ContainerDisconnectedTelemetry,\n\ttype ContainerDisposedTelemetry,\n} from \"./container/index.js\";\nexport { startTelemetry, type TelemetryConfig } from \"./factory/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH,iDAO8B;AAJ7B,wHAAA,4BAA4B,OAAA;AAK7B,oDAAuE;AAA9D,wHAAA,4BAA4B,OAAA;AACrC,+CAA0E;AAAjE,0GAAA,cAAc,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This package provides an implementation and types for producing and consuming telemetry for Fluid Framework applications\n * @packageDocumentation\n */\nexport { type ICriticalContainerError } from \"@fluidframework/container-definitions\";\nexport {\n\ttype IFluidTelemetry,\n\ttype FluidTelemetryEventName,\n\ttype ITelemetryConsumer,\n} from \"./common/index.js\";\nexport {\n\ttype IContainerTelemetry,\n\ttype ContainerTelemetryEventName,\n\tContainerTelemetryEventNames,\n\ttype ContainerConnectedTelemetry,\n\ttype ContainerDisconnectedTelemetry,\n\ttype ContainerDisposedTelemetry,\n} from \"./container/index.js\";\nexport { AppInsightsTelemetryConsumer } from \"./app-insights/index.js\";\nexport { startTelemetry, type TelemetryConfig } from \"./factory/index.js\";\n"]}
@@ -7,10 +7,15 @@ import type { IFluidTelemetry, ITelemetryConsumer } from "../common/index.js";
7
7
  /**
8
8
  * An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights
9
9
  * in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.
10
+ *
11
+ * @beta
10
12
  */
11
13
  export declare class AppInsightsTelemetryConsumer implements ITelemetryConsumer {
12
14
  private readonly appInsightsClient;
13
15
  constructor(appInsightsClient: ApplicationInsights);
16
+ /**
17
+ * Takes the incoming {@link IFluidTelemetry} and sends it to Azure App Insights
18
+ */
14
19
  consume(event: IFluidTelemetry): void;
15
20
  }
16
21
  //# sourceMappingURL=appInsightsTelemetryConsumer.d.ts.map
@@ -1 +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"}
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;;;;;GAKG;AACH,qBAAa,4BAA6B,YAAW,kBAAkB;IACnD,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,mBAAmB;IAE1E;;OAEG;IACI,OAAO,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;CAM5C"}
@@ -5,11 +5,16 @@
5
5
  /**
6
6
  * An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights
7
7
  * in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.
8
+ *
9
+ * @beta
8
10
  */
9
11
  export class AppInsightsTelemetryConsumer {
10
12
  constructor(appInsightsClient) {
11
13
  this.appInsightsClient = appInsightsClient;
12
14
  }
15
+ /**
16
+ * Takes the incoming {@link IFluidTelemetry} and sends it to Azure App Insights
17
+ */
13
18
  consume(event) {
14
19
  this.appInsightsClient.trackEvent({
15
20
  name: event.eventName,
@@ -1 +1 @@
1
- {"version":3,"file":"appInsightsTelemetryConsumer.js","sourceRoot":"","sources":["../../src/app-insights/appInsightsTelemetryConsumer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;;GAGG;AACH,MAAM,OAAO,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","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"]}
1
+ {"version":3,"file":"appInsightsTelemetryConsumer.js","sourceRoot":"","sources":["../../src/app-insights/appInsightsTelemetryConsumer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;;;;GAKG;AACH,MAAM,OAAO,4BAA4B;IACxC,YAAoC,iBAAsC;QAAtC,sBAAiB,GAAjB,iBAAiB,CAAqB;IAAG,CAAC;IAE9E;;OAEG;IACI,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","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 *\n * @beta\n */\nexport class AppInsightsTelemetryConsumer implements ITelemetryConsumer {\n\tpublic constructor(private readonly appInsightsClient: ApplicationInsights) {}\n\n\t/**\n\t * Takes the incoming {@link IFluidTelemetry} and sends it to Azure App Insights\n\t */\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"]}
@@ -3,9 +3,25 @@
3
3
  * @packageDocumentation
4
4
  */
5
5
 
6
+ import { ApplicationInsights } from '@microsoft/applicationinsights-web';
6
7
  import { ICriticalContainerError } from '@fluidframework/container-definitions';
7
8
  import type { IFluidContainer } from '@fluidframework/fluid-static';
8
9
 
10
+ /**
11
+ * An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights
12
+ * in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.
13
+ *
14
+ * @beta
15
+ */
16
+ export declare class AppInsightsTelemetryConsumer implements ITelemetryConsumer {
17
+ private readonly appInsightsClient;
18
+ constructor(appInsightsClient: ApplicationInsights);
19
+ /**
20
+ * Takes the incoming {@link IFluidTelemetry} and sends it to Azure App Insights
21
+ */
22
+ consume(event: IFluidTelemetry): void;
23
+ }
24
+
9
25
  /**
10
26
  * The container "connected" telemetry event.
11
27
  * It is produced from an internal Fluid container system event {@link @fluidframework/container-definitions#IContainerEvents} which is emitted when the {@link @fluidframework/container-definitions#IContainer} completes connecting to the Fluid service.
@@ -3,9 +3,25 @@
3
3
  * @packageDocumentation
4
4
  */
5
5
 
6
+ import { ApplicationInsights } from '@microsoft/applicationinsights-web';
6
7
  import { ICriticalContainerError } from '@fluidframework/container-definitions';
7
8
  import type { IFluidContainer } from '@fluidframework/fluid-static';
8
9
 
10
+ /**
11
+ * An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights
12
+ * in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.
13
+ *
14
+ * @beta
15
+ */
16
+ export declare class AppInsightsTelemetryConsumer implements ITelemetryConsumer {
17
+ private readonly appInsightsClient;
18
+ constructor(appInsightsClient: ApplicationInsights);
19
+ /**
20
+ * Takes the incoming {@link IFluidTelemetry} and sends it to Azure App Insights
21
+ */
22
+ consume(event: IFluidTelemetry): void;
23
+ }
24
+
9
25
  /**
10
26
  * The container "connected" telemetry event.
11
27
  * It is produced from an internal Fluid container system event {@link @fluidframework/container-definitions#IContainerEvents} which is emitted when the {@link @fluidframework/container-definitions#IContainer} completes connecting to the Fluid service.
@@ -3,9 +3,12 @@
3
3
  * @packageDocumentation
4
4
  */
5
5
 
6
+ import { ApplicationInsights } from '@microsoft/applicationinsights-web';
6
7
  import { ICriticalContainerError } from '@fluidframework/container-definitions';
7
8
  import type { IFluidContainer } from '@fluidframework/fluid-static';
8
9
 
10
+ /* Excluded from this release type: AppInsightsTelemetryConsumer */
11
+
9
12
  /* Excluded from this release type: ContainerConnectedTelemetry */
10
13
 
11
14
  /* Excluded from this release type: ContainerDisconnectedTelemetry */
@@ -3,9 +3,25 @@
3
3
  * @packageDocumentation
4
4
  */
5
5
 
6
+ import { ApplicationInsights } from '@microsoft/applicationinsights-web';
6
7
  import { ICriticalContainerError } from '@fluidframework/container-definitions';
7
8
  import type { IFluidContainer } from '@fluidframework/fluid-static';
8
9
 
10
+ /**
11
+ * An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights
12
+ * in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.
13
+ *
14
+ * @beta
15
+ */
16
+ export declare class AppInsightsTelemetryConsumer implements ITelemetryConsumer {
17
+ private readonly appInsightsClient;
18
+ constructor(appInsightsClient: ApplicationInsights);
19
+ /**
20
+ * Takes the incoming {@link IFluidTelemetry} and sends it to Azure App Insights
21
+ */
22
+ consume(event: IFluidTelemetry): void;
23
+ }
24
+
9
25
  /**
10
26
  * The container "connected" telemetry event.
11
27
  * It is produced from an internal Fluid container system event {@link @fluidframework/container-definitions#IContainerEvents} which is emitted when the {@link @fluidframework/container-definitions#IContainer} completes connecting to the Fluid service.
package/lib/index.d.ts CHANGED
@@ -9,5 +9,6 @@
9
9
  export { type ICriticalContainerError } from "@fluidframework/container-definitions";
10
10
  export { type IFluidTelemetry, type FluidTelemetryEventName, type ITelemetryConsumer, } from "./common/index.js";
11
11
  export { type IContainerTelemetry, type ContainerTelemetryEventName, ContainerTelemetryEventNames, type ContainerConnectedTelemetry, type ContainerDisconnectedTelemetry, type ContainerDisposedTelemetry, } from "./container/index.js";
12
+ export { AppInsightsTelemetryConsumer } from "./app-insights/index.js";
12
13
  export { startTelemetry, type TelemetryConfig } from "./factory/index.js";
13
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,4BAA4B,EAC5B,KAAK,2BAA2B,EAChC,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,GAC/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,4BAA4B,EAC5B,KAAK,2BAA2B,EAChC,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,GAC/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
package/lib/index.js CHANGED
@@ -3,5 +3,6 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export { ContainerTelemetryEventNames, } from "./container/index.js";
6
+ export { AppInsightsTelemetryConsumer } from "./app-insights/index.js";
6
7
  export { startTelemetry } from "./factory/index.js";
7
8
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH,OAAO,EAGN,4BAA4B,GAI5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAwB,MAAM,oBAAoB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This package provides an implementation and types for producing and consuming telemetry for Fluid Framework applications\n * @packageDocumentation\n */\nexport { type ICriticalContainerError } from \"@fluidframework/container-definitions\";\nexport {\n\ttype IFluidTelemetry,\n\ttype FluidTelemetryEventName,\n\ttype ITelemetryConsumer,\n} from \"./common/index.js\";\nexport {\n\ttype IContainerTelemetry,\n\ttype ContainerTelemetryEventName,\n\tContainerTelemetryEventNames,\n\ttype ContainerConnectedTelemetry,\n\ttype ContainerDisconnectedTelemetry,\n\ttype ContainerDisposedTelemetry,\n} from \"./container/index.js\";\nexport { startTelemetry, type TelemetryConfig } from \"./factory/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH,OAAO,EAGN,4BAA4B,GAI5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAwB,MAAM,oBAAoB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This package provides an implementation and types for producing and consuming telemetry for Fluid Framework applications\n * @packageDocumentation\n */\nexport { type ICriticalContainerError } from \"@fluidframework/container-definitions\";\nexport {\n\ttype IFluidTelemetry,\n\ttype FluidTelemetryEventName,\n\ttype ITelemetryConsumer,\n} from \"./common/index.js\";\nexport {\n\ttype IContainerTelemetry,\n\ttype ContainerTelemetryEventName,\n\tContainerTelemetryEventNames,\n\ttype ContainerConnectedTelemetry,\n\ttype ContainerDisconnectedTelemetry,\n\ttype ContainerDisposedTelemetry,\n} from \"./container/index.js\";\nexport { AppInsightsTelemetryConsumer } from \"./app-insights/index.js\";\nexport { startTelemetry, type TelemetryConfig } from \"./factory/index.js\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/fluid-telemetry",
3
- "version": "2.0.0-dev-rc.3.0.0.253463",
3
+ "version": "2.0.0-dev-rc.3.0.0.254274",
4
4
  "description": "Customer facing Fluid telemetry types and classes for both producing and consuming said telemetry",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -52,31 +52,21 @@
52
52
  "types": "./dist/index.d.ts",
53
53
  "default": "./dist/index.js"
54
54
  }
55
- },
56
- "./app-insights": {
57
- "import": {
58
- "types": "./lib/app-insights/index.d.ts",
59
- "default": "./lib/app-insights/index.js"
60
- },
61
- "require": {
62
- "types": "./dist/app-insights/index.d.ts",
63
- "default": "./dist/app-insights/index.js"
64
- }
65
55
  }
66
56
  },
67
57
  "main": "dist/index.js",
68
58
  "types": "dist/index.d.ts",
69
59
  "dependencies": {
70
- "@fluidframework/container-definitions": "2.0.0-dev-rc.3.0.0.253463",
71
- "@fluidframework/container-loader": "2.0.0-dev-rc.3.0.0.253463",
72
- "@fluidframework/fluid-static": "2.0.0-dev-rc.3.0.0.253463",
60
+ "@fluidframework/container-definitions": "2.0.0-dev-rc.3.0.0.254274",
61
+ "@fluidframework/container-loader": "2.0.0-dev-rc.3.0.0.254274",
62
+ "@fluidframework/fluid-static": "2.0.0-dev-rc.3.0.0.254274",
73
63
  "@microsoft/applicationinsights-web": "^2.8.11",
74
64
  "uuid": "^9.0.0"
75
65
  },
76
66
  "devDependencies": {
77
67
  "@arethetypeswrong/cli": "^0.15.2",
78
- "@fluid-internal/client-utils": "2.0.0-dev-rc.3.0.0.253463",
79
- "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.253463",
68
+ "@fluid-internal/client-utils": "2.0.0-dev-rc.3.0.0.254274",
69
+ "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.254274",
80
70
  "@fluid-tools/build-cli": "^0.34.0",
81
71
  "@fluidframework/build-tools": "^0.34.0",
82
72
  "@microsoft/api-extractor": "^7.42.3",
@@ -9,10 +9,15 @@ import type { IFluidTelemetry, ITelemetryConsumer } from "../common/index.js";
9
9
  /**
10
10
  * An implementation of {@link ITelemetryConsumer} that routes {@link IFluidTelemetry} to Azure App Insights
11
11
  * in a format that is supported by Fluid Framework service offerings such as Cloud dashboards and alarms.
12
+ *
13
+ * @beta
12
14
  */
13
15
  export class AppInsightsTelemetryConsumer implements ITelemetryConsumer {
14
16
  public constructor(private readonly appInsightsClient: ApplicationInsights) {}
15
17
 
18
+ /**
19
+ * Takes the incoming {@link IFluidTelemetry} and sends it to Azure App Insights
20
+ */
16
21
  public consume(event: IFluidTelemetry): void {
17
22
  this.appInsightsClient.trackEvent({
18
23
  name: event.eventName,
package/src/index.ts CHANGED
@@ -21,4 +21,5 @@ export {
21
21
  type ContainerDisconnectedTelemetry,
22
22
  type ContainerDisposedTelemetry,
23
23
  } from "./container/index.js";
24
+ export { AppInsightsTelemetryConsumer } from "./app-insights/index.js";
24
25
  export { startTelemetry, type TelemetryConfig } from "./factory/index.js";
@@ -1,68 +0,0 @@
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
- ```