Skip to content

Commit

Permalink
Rename TelemetryContext::SetAll to SetMultiple
Browse files Browse the repository at this point in the history
  • Loading branch information
agarwal-navin committed Mar 30, 2023
1 parent ee6cd1b commit 0d852e5
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion api-report/runtime-definitions.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ export interface ITelemetryContext {
get(prefix: string, property: string): TelemetryEventPropertyType;
serialize(): string;
set(prefix: string, property: string, value: TelemetryEventPropertyType): void;
setAll(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
setMultiple(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
}

// @public
Expand Down
2 changes: 1 addition & 1 deletion api-report/runtime-utils.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export class TelemetryContext implements ITelemetryContext {
// (undocumented)
set(prefix: string, property: string, value: TelemetryEventPropertyType): void;
// (undocumented)
setAll(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
setMultiple(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
}

// @public (undocumented)
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/container-runtime/src/containerRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2198,7 +2198,7 @@ export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents>

const telemetryContext = new TelemetryContext();
// Add the options that are used to generate this summary to the telemetry context.
telemetryContext.setAll("fluid_Summarize", "Options", {
telemetryContext.setMultiple("fluid_Summarize", "Options", {
fullTree,
trackState,
runGC,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ export class GarbageCollector implements IGarbageCollector {
}

// Add the options that are used to run GC to the telemetry context.
telemetryContext?.setAll("fluid_GC", "Options", { fullGC, runSweep: options.runSweep });
telemetryContext?.setMultiple("fluid_GC", "Options", { fullGC, runSweep: options.runSweep });

return PerformanceEvent.timedExecAsync(logger, { eventName: "GarbageCollection" }, async (event) => {
await this.runPreGCSteps();
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/runtime-definitions/src/summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ export interface ITelemetryContext {
* @param property - property name of the telemetry data being tracked (ex: "Options")
* @param values - A set of values to attribute to this summary telemetry data.
*/
setAll(
setMultiple(
prefix: string,
property: string,
values: Record<string, TelemetryEventPropertyType>,
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/runtime-utils/src/summaryUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ export class TelemetryContext implements ITelemetryContext {
}

/**
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.setAll}
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.setMultiple}
*/
setAll(
setMultiple(
prefix: string,
property: string,
values: Record<string, TelemetryEventPropertyType>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ describe("Summary Utils", () => {
telemetryContext.set("pre2_", "prop1", "10");
telemetryContext.set("pre2_", "prop2", true);
telemetryContext.set("pre1_", "prop2", undefined);
telemetryContext.setAll("pre3_", "obj1", { prop1: "1", prop2: 2, prop3: true });
telemetryContext.setMultiple("pre3_", "obj1", { prop1: "1", prop2: 2, prop3: true });

const serialized = telemetryContext.serialize();

Expand Down

0 comments on commit 0d852e5

Please sign in to comment.