add partition id to the tracing of client requests

This commit is contained in:
sebastianburckhardt 2023-04-12 10:07:17 -07:00
Родитель 72b865e2d9
Коммит 7acccf5e8c
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -111,11 +111,11 @@ namespace DurableTask.Netherite
{
if (this.logger.IsEnabled(LogLevel.Debug))
{
this.logger.LogDebug("{client} Sending event {eventId}: {event}", this.tracePrefix, @event.EventIdString, @event);
this.logger.LogDebug("{client} Sending event {eventId} to partition {partitionId}: {event}", this.tracePrefix, @event.EventIdString, @event.PartitionId, @event);
}
if (EtwSource.Log.IsEnabled())
{
EtwSource.Log.ClientSentEvent(this.account, this.taskHub, this.clientId, @event.EventIdString, @event.ToString(), TraceUtils.AppName, TraceUtils.ExtensionVersion);
EtwSource.Log.ClientSentEvent(this.account, this.taskHub, this.clientId, (int) @event.PartitionId, @event.EventIdString, @event.ToString(), TraceUtils.AppName, TraceUtils.ExtensionVersion);
}
}
}

Просмотреть файл

@ -243,11 +243,11 @@ namespace DurableTask.Netherite
this.WriteEvent(243, Account, TaskHub, ClientId, PartitionEventId, status, EventInfo, AppName, ExtensionVersion);
}
[Event(244, Level = EventLevel.Verbose, Version = 1)]
public void ClientSentEvent(string Account, string TaskHub, Guid ClientId, string PartitionEventId, string EventInfo, string AppName, string ExtensionVersion)
[Event(244, Level = EventLevel.Verbose, Version = 2)]
public void ClientSentEvent(string Account, string TaskHub, Guid ClientId, int PartitionId, string PartitionEventId, string EventInfo, string AppName, string ExtensionVersion)
{
SetCurrentThreadActivityId(serviceInstanceId);
this.WriteEvent(244, Account, TaskHub, ClientId, PartitionEventId, EventInfo, AppName, ExtensionVersion);
this.WriteEvent(244, Account, TaskHub, ClientId, PartitionId, PartitionEventId, EventInfo, AppName, ExtensionVersion);
}
[Event(245, Level = EventLevel.Informational, Version = 1)]