We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 376a99b commit 1a4d4b8Copy full SHA for 1a4d4b8
Microsoft.Azure.Cosmos.Encryption.Custom/src/Common/CosmosDiagnosticsContext.cs
@@ -181,13 +181,8 @@ public void Dispose()
181
182
long elapsedTicks = Stopwatch.GetTimestamp() - this.startTicks;
183
184
- // Defensive null check - should never be null if enabled=true,
185
- // but guards against struct manipulation bugs
186
this.owner?.Record(this.name, this.startTicks, elapsedTicks);
187
188
- // Activity.Dispose() is idempotent per .NET framework documentation,
189
- // so multiple calls are safe (though not the intended usage pattern).
190
- // Null-conditional ensures we skip disposal if activity was never created.
191
this.activity?.Dispose();
192
}
193
0 commit comments