Skip to content

Commit

Permalink
remove dispose from sampler
Browse files Browse the repository at this point in the history
  • Loading branch information
sourabh1007 committed Mar 15, 2023
1 parent d1a8c35 commit ce3467c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ internal void CollectOperationInfo(CosmosDiagnostics cosmosDiagnostics,
/// <param name="droppedRntbdRequestCount"></param>
private void RecordRntbdResponses(string containerId, string databaseId, List<StoreResponseStatistics> storeResponseStatistics, out int droppedRntbdRequestCount)
{
using IClientTelemetrySampler<RequestInfo> networkRequestSampler
IClientTelemetrySampler<RequestInfo> networkRequestSampler
= new NetworkRequestSampler(ClientTelemetryOptions.NetworkTelemetrySampleSize);

droppedRntbdRequestCount = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.Azure.Cosmos.Telemetry.Sampler
{
using System;

internal interface IClientTelemetrySampler<T> : IDisposable
internal interface IClientTelemetrySampler<T>
{
internal bool ShouldSample(T statisticsObj);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,5 @@ private static bool IsStatusCodeNotExcluded(int statusCode, int subStatusCode)
{
return !(ClientTelemetryOptions.ExcludedStatusCodes.Contains(statusCode) && subStatusCode == 0);
}

public void Dispose()
{
this.TempStorage.Clear();
}
}
}

0 comments on commit ce3467c

Please sign in to comment.