message: Added an event with GC options and state when garbage collector loads.
diff: @@ -610,14 +610,9 @@ export class GarbageCollector implements IGarbageCollector {
  return baseGCDetailsMap;
  });
  - // Initialize the base state that is used to detect when inactive objects are used.
  - if (this.shouldRunGC) {
  - this.initializeBaseStateP.catch((error) => {
  - const dpe = DataProcessingError.wrapIfUnrecognized(
  - error,
  - "FailedToInitializeGC",
  - );
  - dpe.addTelemetryProperties({
  + // Log all the GC options and the state determined by the garbage collector. This is interesting only for the
  + // summarizer client since it is the only one that runs GC. It also helps keep the telemetry less noisy.
  + const gcConfigProps = JSON.stringify({
  gcEnabled: this.gcEnabled,
  sweepEnabled: this.sweepEnabled,
  runGC: this.shouldRunGC,
  @@ -626,7 +621,24 @@ export class GarbageCollector implements IGarbageCollector {
  testMode: this.testMode,
  sessionExpiry: this.sessionExpiryTimeoutMs,
  inactiveTimeout: this.inactiveTimeoutMs,
  + existing,
  + ...this.gcOptions,
  + });
  + if (this.isSummarizerClient) {
  + this.mc.logger.sendTelemetryEvent({
  + eventName: "GarbageCollectorLoaded",
  + gcConfigs: gcConfigProps,
  });
  + }
  +
  + // Initialize the base state that is used to detect when inactive objects are used.
  + if (this.shouldRunGC) {
  + this.initializeBaseStateP.catch((error) => {
  + const dpe = DataProcessingError.wrapIfUnrecognized(
  + error,
  + "FailedToInitializeGC",
  + );
  + dpe.addTelemetryProperties({ gcConfigs: gcConfigProps });
  throw dpe;
  });
  }
  