Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2910

ThresholdLoggingTracer only includes KV

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • 3.2.0
    • 3.1.7
    • None
    • 1

    Description

      So, I'm running the following code to experiment and trying to see the traces for multiple services:

       
                  var to = new ThresholdOptions()
                          .WithKvThreshold(TimeSpan.FromTicks(1))
                          .WithQueryThreshold(TimeSpan.FromTicks(1))
                          .WithAnalyticsThreshold(TimeSpan.FromTicks(1))
                          .WithEmitInterval(TimeSpan.FromSeconds(10));
                  to.Enabled = true;
       
                  var options = new ClusterOptions
                  {
                      UserName = "Administrator",
                      Password = "password",
                      ThresholdOptions = to,
                      Logging = loggerFactory
       
                  };
       
                  var cluster = await Cluster.ConnectAsync("127.0.0.1", options);
                  var bucket = await cluster.BucketAsync("travel-sample");
                  var collection = bucket.DefaultCollection();
       
                  var upsertResult = await collection.UpsertAsync("my-document-key", new { Name = "Ted", Age = 31 });
                  while (true)
                  {
                      try
                      {
                          var getResult = await collection.GetAsync("my-document-key");
                          var queryResult = await cluster.QueryAsync<dynamic>("select 1=1", options => options.Metrics(true));
                          var analyticsResult = await cluster.AnalyticsQueryAsync<dynamic>("select 1=1");
                      }
                      catch (Exception e)
                      {
                          // ignored
                      }
                  }
      

      based on the configured thresholds for query, analytics and kv, all three should be included, but only kv is?

      info: Couchbase.Core.Diagnostics.Tracing.ThresholdTracing.ThresholdLoggingTracer[9000]
            [{"service":"kv","count":678,"top":[{"total_duration_us":203,"encode_duration_us":48,"last_dispatch_duration_us":28,"total_dispatch_duration_us":68,"last_server_duration_us":null,"total_server_duration_us":null,"operation_name":"get","last_local_id":"2","operation_id":"1904","last_local_socket":"127.0.0.1:11210:63148","last_remote_socket":"127.0.0.1:11210:63148"},{"total_duration_us":200,"encode_duration_us":48,"last_dispatch_duration_us":28,"total_dispatch_duration_us":66,"last_server_duration_us":null,"total_server_duration_us":null,"operation_name":"get","last_local_id":"2","operation_id":"1905","last_local_socket":"127.0.0.1:11210:63148","last_remote_socket":"127.0.0.1:11210:63148"},{"total_duration_us":207,"encode_duration_us":48,"last_dispatch_duration_us":29,"total_dispatch_duration_us":71,"last_server_duration_us":null,"total_server_duration_us":null,"operation_name":"get","last_local_id":"2","operation_id":"1906","last_local_socket":"127.0.0.1:11210:63148","last_remote_socket":"127.0.0.1:11210:63148"},{"total_duration_us":198,"encode_duration_us":48,"last_dispatch_duration_us":27,"total_dispatch_duration_us":65,"last_server_duration_us":null,"total_server_duration_us":null,"operation_name":"get","last_local_id":"2","operation_id":"1907","last_local_socket":"127.0.0.1:11210:63148","last_remote_socket":"127.0.0.1:11210:63148"},{"total_duration_us":193,"encode_duration_us":47,"last_dispatch_duration_us":31,"total_dispatch_duration_us":75,"last_server_duration_us":null,"total_server_duration_us":null,"operation_name":"get","last_local_id":"2","operation_id":"1908","last_local_socket":"127.0.0.1:11210:63148","last_remote_socket":"127.0.0.1:11210:63148"},{"total_duration_us":211,"encode_duration_us":53,"last_dispatch_duration_us":30,"total_dispatch_duration_us":70,"last_server_duration_us":null,"total_server_duration_us":null,"operation_name":"get","last_local_id":"2","operation_id":"1909","last_local_socket":"127.0.0.1:11210:63148","last_remote_socket":"127.0.0.1:11210:63148"},{"total_duration_us":201,"encode_duration_us":44,"last_dispatch_duration_us":27,"total_dispatch_duration_us":67,"last_server_duration_us":null,"total_server_duration_us":null,"operation_name":"get","last_local_id":"2","operation_id":"1910","last_local_socket":"127.0.0.1:11210:63148","last_remote_socket":"127.0.0.1:11210:63148"},{"total_duration_us":238,"encode_duration_us":63,"last_dispatch_duration_us":38,"total_dispatch_duration_us":92,"last_server_duration_us":null,"total_server_duration_us":null,"operation_name":"get","last_local_id":"2","operation_id":"1911","last_local_socket":"127.0.0.1:11210:63148","last_remote_socket":"127.0.0.1:11210:63148"},{"total_duration_us":221,"encode_duration_us":52,"last_dispatch_duration_us":32,"total_dispatch_duration_us":78,"last_server_duration_us":null,"total_server_duration_us":null,"operation_name":"get","last_local_id":"2","operation_id":"1912","last_local_socket":"127.0.0.1:11210:63148","last_remote_socket":"127.0.0.1:11210:63148"},{"total_duration_us":220,"encode_duration_us":51,"last_dispatch_duration_us":30,"total_dispatch_duration_us":72,"last_server_duration_us":null,"total_server_duration_us":null,"operation_name":"get","last_local_id":"2","operation_id":"1913","last_local_socket":"127.0.0.1:11210:63148","last_remote_socket":"127.0.0.1:11210:63148"}]}]
      

      Any idea why only kv is shown?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jmorris Jeff Morris
            daschl Michael Nitschinger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty