diff --git a/EgwCoreLib.Lux.Data/Services/BaseServ.cs b/EgwCoreLib.Lux.Data/Services/BaseServ.cs
index 49b8e3cf..b60359c6 100644
--- a/EgwCoreLib.Lux.Data/Services/BaseServ.cs
+++ b/EgwCoreLib.Lux.Data/Services/BaseServ.cs
@@ -181,7 +181,10 @@ namespace EgwCoreLib.Lux.Data.Services
///
protected static Activity? StartActivity([CallerMemberName] string? methodName = null)
{
- return ActivitySource.StartActivity(methodName);
+ var activity = ActivitySource.StartActivity(methodName ?? "UNDEF");
+ activity?.SetTag("host.name", Environment.MachineName);
+ return activity;
+ //return ActivitySource.StartActivity(methodName);
}
diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs
index cad30d4c..140b9f2d 100644
--- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs
+++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs
@@ -2467,6 +2467,7 @@ namespace EgwCoreLib.Lux.Data.Services
{
result = new List();
}
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
//activity?.Stop();
LogTrace($"TagsGetAllAsync | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
@@ -2487,6 +2488,7 @@ namespace EgwCoreLib.Lux.Data.Services
// svuoto cache...
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Template:*");
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:TemplateRows:*");
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
LogTrace($"TemplateCloneAsync | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
return fatto;
@@ -2506,6 +2508,7 @@ namespace EgwCoreLib.Lux.Data.Services
// svuoto cache...
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Template:*");
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:TemplateRows:*");
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
LogTrace($"TemplateDeleteAsync | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
return fatto;
@@ -2540,6 +2543,7 @@ namespace EgwCoreLib.Lux.Data.Services
{
result = new List();
}
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
LogTrace($"TemplateGetAllAsync | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
return result;
@@ -2575,6 +2579,7 @@ namespace EgwCoreLib.Lux.Data.Services
{
result = new List();
}
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
LogTrace($"TemplateRowByParentAsync | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
return result;
@@ -2594,6 +2599,7 @@ namespace EgwCoreLib.Lux.Data.Services
// svuoto cache...
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Template:*");
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:TemplateRow:*");
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
LogTrace($"TemplateRowCloneAsync | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
return fatto;
@@ -2613,6 +2619,7 @@ namespace EgwCoreLib.Lux.Data.Services
// svuoto cache...
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Template:*");
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:TemplateRow:*");
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
LogTrace($"TemplateRowDeleteAsync | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
return fatto;
@@ -2633,6 +2640,7 @@ namespace EgwCoreLib.Lux.Data.Services
// svuoto cache...
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Template:*");
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:TemplateRow:*");
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
LogTrace($"TemplateRowFixUid | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
return answ;
@@ -2667,6 +2675,7 @@ namespace EgwCoreLib.Lux.Data.Services
{
result = new List();
}
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
LogTrace($"TemplateRowGetAllAsync | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
return result;
@@ -2691,6 +2700,7 @@ namespace EgwCoreLib.Lux.Data.Services
// svuoto cache...
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:TemplateRow:*");
}
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
LogTrace($"TemplateRowUpdateAwaitStateAsync | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
return fatto;
@@ -2710,6 +2720,7 @@ namespace EgwCoreLib.Lux.Data.Services
// svuoto cache...
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Template:*");
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:TemplateRow:*");
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
LogTrace($"TemplateRowUpdateFileDataAsync | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
return fatto;
@@ -2730,6 +2741,7 @@ namespace EgwCoreLib.Lux.Data.Services
// svuoto cache...
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Template:*");
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:TemplateRow:*");
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
LogTrace($"TemplateRowUpdateSerStructAsync | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
return fatto;
@@ -2749,6 +2761,7 @@ namespace EgwCoreLib.Lux.Data.Services
// svuoto cache...
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Template:*");
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:TemplateRow:*");
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
LogTrace($"TemplateRowUpsertAsync | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
return fatto;
@@ -2768,6 +2781,7 @@ namespace EgwCoreLib.Lux.Data.Services
// svuoto cache...
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Template:*");
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:TemplateRow:*");
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
LogTrace($"TemplateUpdateCostAsync | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
return fatto;
@@ -2787,6 +2801,7 @@ namespace EgwCoreLib.Lux.Data.Services
// svuoto cache...
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Template:*");
await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:TemplateRows:*");
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
activity?.Stop();
LogTrace($"TemplateUpsertAsync | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
@@ -2881,6 +2896,7 @@ namespace EgwCoreLib.Lux.Data.Services
{
LogTrace($"Server REDIS master non trovato", LogLevel.Error);
}
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
activity?.SetTag("param.pat2Flush", pat2Flush);
LogTrace($"ExecFlushRedisPattern | {pat2Flush} | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");
@@ -2959,6 +2975,7 @@ namespace EgwCoreLib.Lux.Data.Services
{
LogTrace($"Server REDIS master non trovato", LogLevel.Error);
}
+ // aggiunta tags + log
activity?.SetTag("data.source", source);
activity?.SetTag("param.pat2Flush", pat2Flush);
LogTrace($"ExecFlushRedisPatternAsync | {pat2Flush} | {source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms");