Skip to content

Commit

Permalink
import cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sourabh1007 committed Dec 19, 2022
1 parent e804f97 commit 337fcf7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
namespace Microsoft.Azure.Cosmos.Tracing
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.Tracing
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using Castle.Core.Internal;
using Microsoft.Azure.Cosmos.Telemetry;
using Microsoft.Azure.Cosmos.Tests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Expand All @@ -16,7 +18,7 @@ public static void IsValid(Activity activity)
{
Assert.IsTrue(activity.OperationName == activity.DisplayName);

Assert.IsFalse(activity.GetTagItem("db.cosmosdb.connection_mode").ToString().IsNullOrEmpty(), $"connection mode is emtpy for {activity.OperationName}");
Assert.IsFalse(string.IsNullOrEmpty(activity.GetTagItem("db.cosmosdb.connection_mode").ToString()), $"connection mode is emtpy for {activity.OperationName}");

if (activity.GetTagItem("db.cosmosdb.connection_mode").ToString() == ConnectionMode.Gateway.ToString())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Cosmos.Tests
/// <summary>
/// It is a custom listener for Activities and Event. It is used to validate the Activities generated by cosmosDb SDK.
/// </summary>
public class CustomListener :
internal class CustomListener :
EventListener, // Override Event Listener to capture Event source events
IObserver<KeyValuePair<string, object>>, // Override IObserver to capture Activity events
IObserver<DiagnosticListener>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
namespace Microsoft.Azure.Cosmos.EmulatorTests.Tracing
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos.EmulatorTests.Tracing
{
using System;
using System.Collections.Generic;
Expand Down

0 comments on commit 337fcf7

Please sign in to comment.