@fluidframework/runtime-definitions 2.0.0-internal.3.0.5 → 2.0.0-internal.3.0.6

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/summary.d.ts CHANGED
@@ -290,7 +290,7 @@ export interface ITelemetryContext {
290
290
  * @param property - property name of the telemetry data being tracked (ex: "Options")
291
291
  * @param values - A set of values to attribute to this summary telemetry data.
292
292
  */
293
- setAll(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
293
+ setMultiple(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
294
294
  /**
295
295
  * Get the telemetry data being tracked
296
296
  * @param prefix - unique prefix for this data (ex: "fluid:map:")
@@ -1 +1 @@
1
- {"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EACH,WAAW,EACX,YAAY,EACZ,yBAAyB,EACzB,aAAa,EACb,KAAK,EACR,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACH,sBAAsB,EACtB,6BAA6B,EAChC,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IAClC;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC;IACrB;;;OAGG;IACH,OAAO,EAAE,YAAY,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;CACxB;AAED;;;;;;;;;;;;;GAaG;AACH,MA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,CAAC,sBAAsB,CAAC,CAAC;IAE7D;;OAEG;IACH,YAAY,IAAI,OAAO,CAAC;IAExB;;;;;;OAMG;IACH,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAE5C;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;OAKG;IACH,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,0BAA0B,GAAG,IAAI,CAAC;IAE/E;;;;;OAKG;IACH,WAAW,CACP,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,GACnD,IAAI,CAAC;IAER;;;;;OAKG;IACH,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,0BAA0B,CAAC;IAElE;;;OAGG;IACH,SAAS,IAAI,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,qBAAqB,cAAc,CAAC;AAEjD,eAAO,MAAM,yBAAyB,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwJH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IAClC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACT,CAAC,EAJW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAIrC;AA6JY,QAAA,gBAAgB,GAAG,WAAW,CAAC;AA0C/B,QAAA,qBAAqB,GAAG,WAAW,CAAC;AAEpC,QAAA,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TelemetryEventPropertyType } from \"@fluidframework/common-definitions\";\nimport {\n SummaryTree,\n ISummaryTree,\n ISequencedDocumentMessage,\n ISnapshotTree,\n ITree,\n} from \"@fluidframework/protocol-definitions\";\nimport {\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n} from \"./garbageCollection\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n */\nexport interface ISummaryStats {\n treeNodeCount: number;\n blobNodeCount: number;\n handleNodeCount: number;\n totalBlobSize: number;\n unreferencedBlobSize: number;\n}\n\n/**\n * Represents the summary tree for a node along with the statistics for that tree.\n * For example, for a given data store, it contains the data for data store along with a subtree for\n * each of its DDS.\n * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject\n * will be taking part of the summarization process.\n */\nexport interface ISummaryTreeWithStats {\n /**\n * Represents an aggregation of node counts and blob sizes associated to the current summary information\n */\n stats: ISummaryStats;\n /**\n * A recursive data structure that will be converted to a snapshot tree and uploaded\n * to the backend.\n */\n summary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n */\nexport interface ISummarizeResult {\n stats: ISummaryStats;\n summary: SummaryTree;\n}\n\n/**\n * Contains the same data as ISummaryResult but in order to avoid naming collisions,\n * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.\n *\n * @example\n * ```\n * id:\"\"\n * pathPartsForChildren: [\"path1\"]\n * stats: ...\n * summary:\n * ...\n * \"path1\":\n * ```\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n id: string;\n /**\n * Additional path parts between this node's ID and its children's IDs.\n */\n pathPartsForChildren?: string[];\n}\n\n/**\n * The garbage collection data of each node in the reference graph.\n */\nexport interface IGarbageCollectionNodeData {\n /**\n * The set of routes to other nodes in the graph.\n */\n outboundRoutes: string[];\n /**\n * If the node is unreferenced, the timestamp of when it was marked unreferenced.\n */\n unreferencedTimestampMs?: number;\n}\n\n/**\n * The garbage collection state of the reference graph. It contains a list of all the nodes in the graph and their\n * GC data.\n */\nexport interface IGarbageCollectionState {\n gcNodes: { [ id: string ]: IGarbageCollectionNodeData; };\n}\n\n/**\n * @deprecated - IGarbageCollectionState is written in the root of the summary now.\n * Legacy GC details from when the GC details were written at the data store's summary tree.\n */\nexport interface IGarbageCollectionSummaryDetailsLegacy {\n /** A list of routes to Fluid objects that are used in this node. */\n usedRoutes?: string[];\n /** The GC data of this node. */\n gcData?: IGarbageCollectionData;\n /** If this node is unreferenced, the time when it was marked as such. */\n unrefTimestamp?: number;\n}\n\n/**\n * The GC data that is read from a snapshot. It contains the Garbage CollectionState state and tombstone state.\n */\nexport interface IGarbageCollectionSnapshotData {\n gcState: IGarbageCollectionState;\n tombstones: string[] | undefined;\n deletedNodes: string[] | undefined;\n}\n\n\nexport type SummarizeInternalFn = (\n fullTree: boolean,\n trackState: boolean,\n telemetryContext?: ITelemetryContext,\n) => Promise<ISummarizeInternalResult>;\n\nexport interface ISummarizerNodeConfig {\n /**\n * True to reuse previous handle when unchanged since last acked summary.\n * Defaults to true.\n */\n readonly canReuseHandle?: boolean;\n /**\n * True to always stop execution on error during summarize, or false to\n * attempt creating a summary that is a pointer ot the last acked summary\n * plus outstanding ops in case of internal summarize failure.\n * Defaults to false.\n *\n * BUG BUG: Default to true while we investigate problem\n * with differential summaries\n */\n readonly throwOnFailure?: true;\n}\n\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n /**\n * True if GC is disabled. If so, don't track GC related state for a summary.\n * This is propagated to all child nodes.\n */\n readonly gcDisabled?: boolean;\n}\n\nexport enum CreateSummarizerNodeSource {\n FromSummary,\n FromAttach,\n Local,\n}\nexport type CreateChildSummarizerNodeParam = {\n type: CreateSummarizerNodeSource.FromSummary;\n} | {\n type: CreateSummarizerNodeSource.FromAttach;\n sequenceNumber: number;\n snapshot: ITree;\n} | {\n type: CreateSummarizerNodeSource.Local;\n};\n\nexport interface ISummarizerNode {\n /**\n * Latest successfully acked summary reference sequence number\n */\n readonly referenceSequenceNumber: number;\n /**\n * Marks the node as having a change with the given sequence number.\n * @param sequenceNumber - sequence number of change\n */\n invalidate(sequenceNumber: number): void;\n /**\n * Calls the internal summarize function and handles internal state tracking.\n * If unchanged and fullTree is false, it will reuse previous summary subtree.\n * If an error is encountered and throwOnFailure is false, it will try to make\n * a summary with a pointer to the previous summary + a blob of outstanding ops.\n * @param fullTree - true to skip optimizations and always generate the full tree\n * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n * @param telemetryContext - summary data passed through the layers for telemetry purposes\n */\n summarize(\n fullTree: boolean,\n trackState?: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummarizeResult>;\n /**\n * Checks if there are any additional path parts for children that need to\n * be loaded from the base summary. Additional path parts represent parts\n * of the path between this SummarizerNode and any child SummarizerNodes\n * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n * @param snapshot - the base summary to parse\n */\n updateBaseSummaryState(snapshot: ISnapshotTree): void;\n /**\n * Records an op representing a change to this node/subtree.\n * @param op - op of change to record\n */\n recordChange(op: ISequencedDocumentMessage): void;\n\n createChild(\n /**\n * Summarize function\n */\n summarizeInternalFn: SummarizeInternalFn,\n /**\n * Initial id or path part of this node\n */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n /**\n * Optional configuration affecting summarize behavior\n */\n config?: ISummarizerNodeConfig,\n ): ISummarizerNode;\n\n getChild(id: string): ISummarizerNode | undefined;\n\n /** True if a summary is currently in progress */\n isSummaryInProgress?(): boolean;\n}\n\n/**\n * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:\n *\n * `usedRoutes`: The routes in this node that are currently in use.\n *\n * `getGCData`: A new API that can be used to get the garbage collection data for this node.\n *\n * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the\n * summary or not.\n *\n * `createChild`: Added the following params:\n *\n * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.\n *\n * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.\n *\n * `deleteChild`: Deletes a child node.\n *\n * `isReferenced`: This tells whether this node is referenced in the document or not.\n *\n * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.\n */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n createChild(\n /**\n * Summarize function\n */\n summarizeInternalFn: SummarizeInternalFn,\n /**\n * Initial id or path part of this node\n */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n /**\n * Optional configuration affecting summarize behavior\n */\n config?: ISummarizerNodeConfigWithGC,\n getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n /**\n * @deprecated - The functionality to update child's base GC details is incorporated in the summarizer node.\n */\n getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n ): ISummarizerNodeWithGC;\n\n /**\n * Delete the child with the given id..\n */\n deleteChild(id: string): void;\n\n getChild(id: string): ISummarizerNodeWithGC | undefined;\n\n /**\n * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n * this node. Each node has a set of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /**\n * Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd\n */\n isReferenced(): boolean;\n\n /**\n * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n * 1. To identify if this node is being referenced in the document or not.\n * 2. To identify if this node or any of its children's used routes changed since last summary.\n *\n * @param usedRoutes - The routes that are used in this node.\n */\n updateUsedRoutes(usedRoutes: string[]): void;\n}\n\nexport const channelsTreeName = \".channels\";\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object is expected to be modified directly by various summarize methods.\n */\nexport interface ITelemetryContext {\n /**\n * Sets value for telemetry data being tracked.\n * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n * @param value - value to attribute to this summary telemetry data\n */\n set(prefix: string, property: string, value: TelemetryEventPropertyType): void;\n\n /**\n * Sets a set of values for telemetry data being tracked.\n * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n * @param values - A set of values to attribute to this summary telemetry data.\n */\n setAll(\n prefix: string,\n property: string,\n values: Record<string, TelemetryEventPropertyType>,\n ): void;\n\n /**\n * Get the telemetry data being tracked\n * @param prefix - unique prefix for this data (ex: \"fluid:map:\")\n * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n * @returns undefined if item not found\n */\n get(prefix: string, property: string): TelemetryEventPropertyType;\n\n /**\n * Returns a serialized version of all the telemetry data.\n * Should be used when logging in telemetry events.\n */\n serialize(): string;\n}\n\nexport const blobCountPropertyName = \"BlobCount\";\n\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
1
+ {"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwJH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IAClC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACT,CAAC,EAJW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAIrC;AA6JY,QAAA,gBAAgB,GAAG,WAAW,CAAC;AA0C/B,QAAA,qBAAqB,GAAG,WAAW,CAAC;AAEpC,QAAA,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TelemetryEventPropertyType } from \"@fluidframework/common-definitions\";\nimport {\n SummaryTree,\n ISummaryTree,\n ISequencedDocumentMessage,\n ISnapshotTree,\n ITree,\n} from \"@fluidframework/protocol-definitions\";\nimport {\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n} from \"./garbageCollection\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n */\nexport interface ISummaryStats {\n treeNodeCount: number;\n blobNodeCount: number;\n handleNodeCount: number;\n totalBlobSize: number;\n unreferencedBlobSize: number;\n}\n\n/**\n * Represents the summary tree for a node along with the statistics for that tree.\n * For example, for a given data store, it contains the data for data store along with a subtree for\n * each of its DDS.\n * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject\n * will be taking part of the summarization process.\n */\nexport interface ISummaryTreeWithStats {\n /**\n * Represents an aggregation of node counts and blob sizes associated to the current summary information\n */\n stats: ISummaryStats;\n /**\n * A recursive data structure that will be converted to a snapshot tree and uploaded\n * to the backend.\n */\n summary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n */\nexport interface ISummarizeResult {\n stats: ISummaryStats;\n summary: SummaryTree;\n}\n\n/**\n * Contains the same data as ISummaryResult but in order to avoid naming collisions,\n * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.\n *\n * @example\n * ```\n * id:\"\"\n * pathPartsForChildren: [\"path1\"]\n * stats: ...\n * summary:\n * ...\n * \"path1\":\n * ```\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n id: string;\n /**\n * Additional path parts between this node's ID and its children's IDs.\n */\n pathPartsForChildren?: string[];\n}\n\n/**\n * The garbage collection data of each node in the reference graph.\n */\nexport interface IGarbageCollectionNodeData {\n /**\n * The set of routes to other nodes in the graph.\n */\n outboundRoutes: string[];\n /**\n * If the node is unreferenced, the timestamp of when it was marked unreferenced.\n */\n unreferencedTimestampMs?: number;\n}\n\n/**\n * The garbage collection state of the reference graph. It contains a list of all the nodes in the graph and their\n * GC data.\n */\nexport interface IGarbageCollectionState {\n gcNodes: { [ id: string ]: IGarbageCollectionNodeData; };\n}\n\n/**\n * @deprecated - IGarbageCollectionState is written in the root of the summary now.\n * Legacy GC details from when the GC details were written at the data store's summary tree.\n */\nexport interface IGarbageCollectionSummaryDetailsLegacy {\n /** A list of routes to Fluid objects that are used in this node. */\n usedRoutes?: string[];\n /** The GC data of this node. */\n gcData?: IGarbageCollectionData;\n /** If this node is unreferenced, the time when it was marked as such. */\n unrefTimestamp?: number;\n}\n\n/**\n * The GC data that is read from a snapshot. It contains the Garbage CollectionState state and tombstone state.\n */\nexport interface IGarbageCollectionSnapshotData {\n gcState: IGarbageCollectionState;\n tombstones: string[] | undefined;\n deletedNodes: string[] | undefined;\n}\n\n\nexport type SummarizeInternalFn = (\n fullTree: boolean,\n trackState: boolean,\n telemetryContext?: ITelemetryContext,\n) => Promise<ISummarizeInternalResult>;\n\nexport interface ISummarizerNodeConfig {\n /**\n * True to reuse previous handle when unchanged since last acked summary.\n * Defaults to true.\n */\n readonly canReuseHandle?: boolean;\n /**\n * True to always stop execution on error during summarize, or false to\n * attempt creating a summary that is a pointer ot the last acked summary\n * plus outstanding ops in case of internal summarize failure.\n * Defaults to false.\n *\n * BUG BUG: Default to true while we investigate problem\n * with differential summaries\n */\n readonly throwOnFailure?: true;\n}\n\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n /**\n * True if GC is disabled. If so, don't track GC related state for a summary.\n * This is propagated to all child nodes.\n */\n readonly gcDisabled?: boolean;\n}\n\nexport enum CreateSummarizerNodeSource {\n FromSummary,\n FromAttach,\n Local,\n}\nexport type CreateChildSummarizerNodeParam = {\n type: CreateSummarizerNodeSource.FromSummary;\n} | {\n type: CreateSummarizerNodeSource.FromAttach;\n sequenceNumber: number;\n snapshot: ITree;\n} | {\n type: CreateSummarizerNodeSource.Local;\n};\n\nexport interface ISummarizerNode {\n /**\n * Latest successfully acked summary reference sequence number\n */\n readonly referenceSequenceNumber: number;\n /**\n * Marks the node as having a change with the given sequence number.\n * @param sequenceNumber - sequence number of change\n */\n invalidate(sequenceNumber: number): void;\n /**\n * Calls the internal summarize function and handles internal state tracking.\n * If unchanged and fullTree is false, it will reuse previous summary subtree.\n * If an error is encountered and throwOnFailure is false, it will try to make\n * a summary with a pointer to the previous summary + a blob of outstanding ops.\n * @param fullTree - true to skip optimizations and always generate the full tree\n * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n * @param telemetryContext - summary data passed through the layers for telemetry purposes\n */\n summarize(\n fullTree: boolean,\n trackState?: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummarizeResult>;\n /**\n * Checks if there are any additional path parts for children that need to\n * be loaded from the base summary. Additional path parts represent parts\n * of the path between this SummarizerNode and any child SummarizerNodes\n * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n * @param snapshot - the base summary to parse\n */\n updateBaseSummaryState(snapshot: ISnapshotTree): void;\n /**\n * Records an op representing a change to this node/subtree.\n * @param op - op of change to record\n */\n recordChange(op: ISequencedDocumentMessage): void;\n\n createChild(\n /**\n * Summarize function\n */\n summarizeInternalFn: SummarizeInternalFn,\n /**\n * Initial id or path part of this node\n */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n /**\n * Optional configuration affecting summarize behavior\n */\n config?: ISummarizerNodeConfig,\n ): ISummarizerNode;\n\n getChild(id: string): ISummarizerNode | undefined;\n\n /** True if a summary is currently in progress */\n isSummaryInProgress?(): boolean;\n}\n\n/**\n * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:\n *\n * `usedRoutes`: The routes in this node that are currently in use.\n *\n * `getGCData`: A new API that can be used to get the garbage collection data for this node.\n *\n * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the\n * summary or not.\n *\n * `createChild`: Added the following params:\n *\n * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.\n *\n * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.\n *\n * `deleteChild`: Deletes a child node.\n *\n * `isReferenced`: This tells whether this node is referenced in the document or not.\n *\n * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.\n */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n createChild(\n /**\n * Summarize function\n */\n summarizeInternalFn: SummarizeInternalFn,\n /**\n * Initial id or path part of this node\n */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n /**\n * Optional configuration affecting summarize behavior\n */\n config?: ISummarizerNodeConfigWithGC,\n getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n /**\n * @deprecated - The functionality to update child's base GC details is incorporated in the summarizer node.\n */\n getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n ): ISummarizerNodeWithGC;\n\n /**\n * Delete the child with the given id..\n */\n deleteChild(id: string): void;\n\n getChild(id: string): ISummarizerNodeWithGC | undefined;\n\n /**\n * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n * this node. Each node has a set of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /**\n * Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd\n */\n isReferenced(): boolean;\n\n /**\n * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n * 1. To identify if this node is being referenced in the document or not.\n * 2. To identify if this node or any of its children's used routes changed since last summary.\n *\n * @param usedRoutes - The routes that are used in this node.\n */\n updateUsedRoutes(usedRoutes: string[]): void;\n}\n\nexport const channelsTreeName = \".channels\";\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object is expected to be modified directly by various summarize methods.\n */\nexport interface ITelemetryContext {\n /**\n * Sets value for telemetry data being tracked.\n * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n * @param value - value to attribute to this summary telemetry data\n */\n set(prefix: string, property: string, value: TelemetryEventPropertyType): void;\n\n /**\n * Sets a set of values for telemetry data being tracked.\n * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n * @param values - A set of values to attribute to this summary telemetry data.\n */\n setMultiple(\n prefix: string,\n property: string,\n values: Record<string, TelemetryEventPropertyType>,\n ): void;\n\n /**\n * Get the telemetry data being tracked\n * @param prefix - unique prefix for this data (ex: \"fluid:map:\")\n * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n * @returns undefined if item not found\n */\n get(prefix: string, property: string): TelemetryEventPropertyType;\n\n /**\n * Returns a serialized version of all the telemetry data.\n * Should be used when logging in telemetry events.\n */\n serialize(): string;\n}\n\nexport const blobCountPropertyName = \"BlobCount\";\n\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/runtime-definitions",
3
- "version": "2.0.0-internal.3.0.5",
3
+ "version": "2.0.0-internal.3.0.6",
4
4
  "description": "Fluid Runtime definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -36,9 +36,9 @@
36
36
  "dependencies": {
37
37
  "@fluidframework/common-definitions": "^0.20.1",
38
38
  "@fluidframework/common-utils": "^1.0.0",
39
- "@fluidframework/container-definitions": ">=2.0.0-internal.3.0.5 <2.0.0-internal.4.0.0",
40
- "@fluidframework/core-interfaces": ">=2.0.0-internal.3.0.5 <2.0.0-internal.4.0.0",
41
- "@fluidframework/driver-definitions": ">=2.0.0-internal.3.0.5 <2.0.0-internal.4.0.0",
39
+ "@fluidframework/container-definitions": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
40
+ "@fluidframework/core-interfaces": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
41
+ "@fluidframework/driver-definitions": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
42
42
  "@fluidframework/protocol-definitions": "^1.1.0"
43
43
  },
44
44
  "devDependencies": {
package/src/summary.ts CHANGED
@@ -335,7 +335,7 @@ export interface ITelemetryContext {
335
335
  * @param property - property name of the telemetry data being tracked (ex: "Options")
336
336
  * @param values - A set of values to attribute to this summary telemetry data.
337
337
  */
338
- setAll(
338
+ setMultiple(
339
339
  prefix: string,
340
340
  property: string,
341
341
  values: Record<string, TelemetryEventPropertyType>,