Code review comment: Need to change toString method so the flag used is logged out.

Code under review:
static void initialize() {
        ImplementationBridgeHelpers.CosmosClientTelemetryConfigHelper.setCosmosClientTelemetryConfigAccessor(
            new ImplementationBridgeHelpers.CosmosClientTelemetryConfigHelper.CosmosClientTelemetryConfigAccessor() {

                @Override
                public Duration getHttpNetworkRequestTimeout(CosmosClientTelemetryConfig config) {
                    return config.getHttpNetworkRequestTimeout();
                }

                @Override
                public int getMaxConnectionPoolSize(CosmosClientTelemetryConfig config) {
                    return config.getMaxConnectionPoolSize();
                }

                @Override
                public Duration getIdleHttpConnectionTimeout(CosmosClientTelemetryConfig config) {
                    return config.getIdleHttpConnectionTimeout();
                }

                @Override
                public ProxyOptions getProxy(CosmosClientTelemetryConfig config) {
                    return config.getProxy();
                }

                @Override
                public EnumSet<MetricCategory> getMetricCategories(CosmosClientTelemetryConfig config) {
                    return config.micrometerMetricsOptions.getMetricCategories();
                }

                @Override
                public EnumSet<TagName> getMetricTagNames(CosmosClientTelemetryConfig config) {
                    return config.micrometerMetricsOptions.getDefaultTagNames();
                }

                @Override
                public CosmosMeterOptions getMeterOptions(
                    CosmosClientTelemetryConfig config,
                    CosmosMetricName name) {
                    if (config != null &&
                        config.micrometerMetricsOptions != null) {

                        return config.micrometerMetricsOptions.getMeterOptions(name);
                    }

                    return createDisabledMeterOptions(name);
                }

                @Override
                public CosmosMeterOptions createDisabledMeterOptions(CosmosMetricName name) {
                    return new CosmosMeterOptions(
                        name,
                        false,
                        new double[0],
                        false,
                        EnumSet.noneOf(TagName.class),
                        false);
                }

                @Override
                public String getClientCorrelationId(CosmosClientTelemetryConfig config) {
                    return config.getClientCorrelationId();
                }

                @Override
                public MeterRegistry getClientMetricRegistry(CosmosClientTelemetryConfig config) {
                    if (!config.isClientMetricsEnabled) {
                        return null;
                    }

                    return config.getClientMetricRegistry();
                }

                @Override
                public Boolean isSendClientTelemetryToServiceEnabled(CosmosClientTelemetryConfig config) {
                    return config.isSendClientTelemetryToServiceEnabled();
                }

                @Override
                public boolean isClientMetricsEnabled(CosmosClientTelemetryConfig config) {
                    return config.isClientMetricsEnabled;
                }

                @Override
                public CosmosClientTelemetryConfig createSnapshot(
                    CosmosClientTelemetryConfig config,
                    boolean effectiveIsClientTelemetryEnabled) {

                    return config.setEffectiveIsClientTelemetryEnabled(effectiveIsClientTelemetryEnabled);
                }

                @Override
                public Collection<CosmosDiagnosticsHandler> getDiagnosticHandlers(CosmosClientTelemetryConfig config) {
                    return config.getDiagnosticHandlers();
                }

                @Override
                public void setAccountName(CosmosClientTelemetryConfig config, String accountName) {
                    config.setAccountName(accountName);
                }

                @Override
                public String getAccountName(CosmosClientTelemetryConfig config) {
                    return config.getAccountName();
                }

                @Override
                public void setClientCorrelationTag(CosmosClientTelemetryConfig config, Tag clientCorrelationTag) {
                    config.setClientCorrelationTag(clientCorrelationTag);
                }

                @Override
                public Tag getClientCorrelationTag(CosmosClientTelemetryConfig config) {
                    return config.getClientCorrelationTag();
                }

                @Override
                public void setClientTelemetry(CosmosClientTelemetryConfig config, ClientTelemetry clientTelemetry) {
                    config.clientTelemetry = clientTelemetry;
                }

                @Override
                public ClientTelemetry getClientTelemetry(CosmosClientTelemetryConfig config) {
                    return config.clientTelemetry;
                }

                @Override
                public void addDiagnosticsHandler(CosmosClientTelemetryConfig config,
                                                  CosmosDiagnosticsHandler handler) {

                    for (CosmosDiagnosticsHandler existingHandler : config.diagnosticHandlers) {
                        if (existingHandler.getClass().getCanonicalName().equals(handler.getClass().getCanonicalName())) {
                            
                            
                            return;
                        }
                    }
                    config.diagnosticHandlers.add(handler);
                }

                @Override
                public void resetIsSendClientTelemetryToServiceEnabled(CosmosClientTelemetryConfig config) {

                    config.resetIsSendClientTelemetryToServiceEnabled();
                }

                @Override
                public CosmosDiagnosticsThresholds getDiagnosticsThresholds(CosmosClientTelemetryConfig config) {
                    return config.diagnosticsThresholds;
                }

                @Override
                public boolean isLegacyTracingEnabled(CosmosClientTelemetryConfig config) {
                    return config.useLegacyOpenTelemetryTracing;
                }

                @Override
                public boolean isTransportLevelTracingEnabled(CosmosClientTelemetryConfig config) {
                    return config.isTransportLevelTracingEnabled;
                }

                @Override
                public Tracer getOrCreateTracer(CosmosClientTelemetryConfig config) {
                    return config.getOrCreateTracer();
                }

                @Override
                public void setUseLegacyTracing(CosmosClientTelemetryConfig config, boolean useLegacyTracing) {
                    config.setUseLegacyOpenTelemetryTracing(useLegacyTracing);
                }

                @Override
                public void setTracer(CosmosClientTelemetryConfig config, Tracer tracer) {
                    if (tracer != null) {
                        config.tracer = tracer;
                    }
                }

                @Override
                public double getSamplingRate(CosmosClientTelemetryConfig config) {
                    return config.samplingRate;
                }

                @Override
                public boolean showQueryStatement(CosmosClientTelemetryConfig config) {
                    return config.showQueryStatement;
                }
       
                @Override
                public double[] getDefaultPercentiles(CosmosClientTelemetryConfig config) {
                    return config.micrometerMetricsOptions.getDefaultPercentiles();
                }

                @Override
                public boolean shouldPublishHistograms(CosmosClientTelemetryConfig config) {
                    return config.micrometerMetricsOptions.shouldPublishHistograms();
                }

                @Override
                public boolean shouldApplyDiagnosticThresholdsForTransportLevelMeters(CosmosClientTelemetryConfig config) {
                    return config.micrometerMetricsOptions.shouldApplyDiagnosticThresholdsForTransportLevelMeters();
                }
            });
    }


Revised code:
static void initialize() {
        ImplementationBridgeHelpers.CosmosClientTelemetryConfigHelper.setCosmosClientTelemetryConfigAccessor(
            new ImplementationBridgeHelpers.CosmosClientTelemetryConfigHelper.CosmosClientTelemetryConfigAccessor() {

                @Override
                public Duration getHttpNetworkRequestTimeout(CosmosClientTelemetryConfig config) {
                    return config.getHttpNetworkRequestTimeout();
                }

                @Override
                public int getMaxConnectionPoolSize(CosmosClientTelemetryConfig config) {
                    return config.getMaxConnectionPoolSize();
                }

                @Override
                public Duration getIdleHttpConnectionTimeout(CosmosClientTelemetryConfig config) {
                    return config.getIdleHttpConnectionTimeout();
                }

                @Override
                public ProxyOptions getProxy(CosmosClientTelemetryConfig config) {
                    return config.getProxy();
                }

                @Override
                public EnumSet<MetricCategory> getMetricCategories(CosmosClientTelemetryConfig config) {
                    return config.micrometerMetricsOptions.getMetricCategories();
                }

                @Override
                public EnumSet<TagName> getMetricTagNames(CosmosClientTelemetryConfig config) {
                    return config.micrometerMetricsOptions.getDefaultTagNames();
                }

                @Override
                public CosmosMeterOptions getMeterOptions(
                    CosmosClientTelemetryConfig config,
                    CosmosMetricName name) {
                    if (config != null &&
                        config.micrometerMetricsOptions != null) {

                        return config.micrometerMetricsOptions.getMeterOptions(name);
                    }

                    return createDisabledMeterOptions(name);
                }

                @Override
                public CosmosMeterOptions createDisabledMeterOptions(CosmosMetricName name) {
                    return new CosmosMeterOptions(
                        name,
                        false,
                        new double[0],
                        false,
                        EnumSet.noneOf(TagName.class),
                        false);
                }

                @Override
                public String getClientCorrelationId(CosmosClientTelemetryConfig config) {
                    return config.getClientCorrelationId();
                }

                @Override
                public MeterRegistry getClientMetricRegistry(CosmosClientTelemetryConfig config) {
                    if (!config.isClientMetricsEnabled) {
                        return null;
                    }

                    return config.getClientMetricRegistry();
                }

                @Override
                public Boolean isSendClientTelemetryToServiceEnabled(CosmosClientTelemetryConfig config) {
                    return config.isSendClientTelemetryToServiceEnabled();
                }

                @Override
                public boolean isClientMetricsEnabled(CosmosClientTelemetryConfig config) {
                    return config.isClientMetricsEnabled;
                }

                @Override
                public CosmosClientTelemetryConfig createSnapshot(
                    CosmosClientTelemetryConfig config,
                    boolean effectiveIsClientTelemetryEnabled) {

                    return config.setEffectiveIsClientTelemetryEnabled(effectiveIsClientTelemetryEnabled);
                }

                @Override
                public Collection<CosmosDiagnosticsHandler> getDiagnosticHandlers(CosmosClientTelemetryConfig config) {
                    return config.getDiagnosticHandlers();
                }

                @Override
                public void setAccountName(CosmosClientTelemetryConfig config, String accountName) {
                    config.setAccountName(accountName);
                }

                @Override
                public String getAccountName(CosmosClientTelemetryConfig config) {
                    return config.getAccountName();
                }

                @Override
                public void setClientCorrelationTag(CosmosClientTelemetryConfig config, Tag clientCorrelationTag) {
                    config.setClientCorrelationTag(clientCorrelationTag);
                }

                @Override
                public Tag getClientCorrelationTag(CosmosClientTelemetryConfig config) {
                    return config.getClientCorrelationTag();
                }

                @Override
                public void setClientTelemetry(CosmosClientTelemetryConfig config, ClientTelemetry clientTelemetry) {
                    config.clientTelemetry = clientTelemetry;
                }

                @Override
                public ClientTelemetry getClientTelemetry(CosmosClientTelemetryConfig config) {
                    return config.clientTelemetry;
                }

                @Override
                public void addDiagnosticsHandler(CosmosClientTelemetryConfig config,
                                                  CosmosDiagnosticsHandler handler) {

                    for (CosmosDiagnosticsHandler existingHandler : config.diagnosticHandlers) {
                        if (existingHandler.getClass().getCanonicalName().equals(handler.getClass().getCanonicalName())) {
                            
                            
                            return;
                        }
                    }
                    config.diagnosticHandlers.add(handler);
                }

                @Override
                public void resetIsSendClientTelemetryToServiceEnabled(CosmosClientTelemetryConfig config) {

                    config.resetIsSendClientTelemetryToServiceEnabled();
                }

                @Override
                public CosmosDiagnosticsThresholds getDiagnosticsThresholds(CosmosClientTelemetryConfig config) {
                    return config.diagnosticsThresholds;
                }

                @Override
                public boolean isLegacyTracingEnabled(CosmosClientTelemetryConfig config) {
                    return config.useLegacyOpenTelemetryTracing;
                }

                @Override
                public boolean isTransportLevelTracingEnabled(CosmosClientTelemetryConfig config) {
                    return config.isTransportLevelTracingEnabled;
                }

                @Override
                public Tracer getOrCreateTracer(CosmosClientTelemetryConfig config) {
                    return config.getOrCreateTracer();
                }

                @Override
                public void setUseLegacyTracing(CosmosClientTelemetryConfig config, boolean useLegacyTracing) {
                    config.setUseLegacyOpenTelemetryTracing(useLegacyTracing);
                }

                @Override
                public void setTracer(CosmosClientTelemetryConfig config, Tracer tracer) {
                    if (tracer != null) {
                        config.tracer = tracer;
                    }
                }

                @Override
                public double getSamplingRate(CosmosClientTelemetryConfig config) {
                    return config.samplingRate;
                }

                @Override
                public ShowQueryOptions showQueryOptions(CosmosClientTelemetryConfig config) {
                    return config.showQueryOptions;
                }
       
                @Override
                public double[] getDefaultPercentiles(CosmosClientTelemetryConfig config) {
                    return config.micrometerMetricsOptions.getDefaultPercentiles();
                }

                @Override
                public boolean shouldPublishHistograms(CosmosClientTelemetryConfig config) {
                    return config.micrometerMetricsOptions.shouldPublishHistograms();
                }

                @Override
                public boolean shouldApplyDiagnosticThresholdsForTransportLevelMeters(CosmosClientTelemetryConfig config) {
                    return config.micrometerMetricsOptions.shouldApplyDiagnosticThresholdsForTransportLevelMeters();
                }
            });
    }