Hi @Wahid_Kazi,
I was able to see last_local_address, last_remote_address, server_us, etc, when I tried this locally. Here’s the code that I ran:
static async Task Main(string[] args)
{
ILoggerFactory loggerFactory = new LoggerFactory();
loggerFactory.AddNLog(new NLogProviderOptions
{
CaptureMessageTemplates = true,
CaptureMessageProperties = true
});
NLog.LogManager.LoadConfiguration("nlog.config");
var tracer = new ThresholdLoggingTracer
{
KvThreshold = 1, // 1 ms
N1qlThreshold = 1,
SearchThreshold = 1,
SampleSize = int.MaxValue,
Interval = 1000 // 1 second
};
var cluster = new Cluster(new ClientConfiguration
{
LoggerFactory = loggerFactory,
Servers = new List<Uri> { new Uri("http://localhost:8091")},
Tracer = tracer
});
cluster.Authenticate("Administrator", "password");
var bucket = cluster.OpenBucket("tests");
for (var i = 0; i < 5; i++)
bucket.Insert<dynamic>(Guid.NewGuid().ToString(), new {foo = "bar"});
Thread.Sleep(TimeSpan.FromMinutes(1));
cluster.Dispose();
}
(I’m using NLog.Extensions.Logging 1.2.0 and CouchbaseNetClient 2.7.18 in a .NET Core 3.1 console app). Here is a relevant snippet from the log file:
2020/07/23 11:29:57.484|INFO|Operations that exceeded service threshold: [{“service”:“kv”,“count”:5,“top”:[{“operation_name”:“Add”,“last_operaion_id”:“0x9”,“last_local_address”:“127.0.0.1:50726”,“last_remote_address”:“127.0.0.1:11210”,“last_local_id”:“18ec8862612f61b2/725447caf44fd5be”,“last_dispatch_us”:436,“total_us”:12721,“encode_us”:61,“dispatch_us”:436,“server_us”:231,“decode_us”:13},{“operation_name”:“Add”,“last_operaion_id”:“0xa”,“last_local_address”:“127.0.0.1:50725”,“last_remote_address”:“127.0.0.1:11210”,“last_local_id”:“18ec8862612f61b2/0846a4a1209d3dd9”,“last_dispatch_us”:331,“total_us”:4683,“encode_us”:39,“dispatch_us”:331,“server_us”:135,“decode_us”:7},{“operation_name”:“Add”,“last_operaion_id”:“0x7”,“last_local_address”:“127.0.0.1:50725”,“last_remote_address”:“127.0.0.1:11210”,“last_local_id”:“18ec8862612f61b2/0846a4a1209d3dd9”,“last_dispatch_us”:336,“total_us”:14665,“encode_us”:4206,“dispatch_us”:336,“server_us”:108,“decode_us”:304}]}]
So, I’m not able to replicate the problem that you’re seeing. Are there any more details that you can provide?