Skip to content

Commit 101ef66

Browse files
authored
removing timestamp field since as it is duplicate (#8379)
1 parent f23688b commit 101ef66

File tree

4 files changed

+1
-5
lines changed

4 files changed

+1
-5
lines changed

src/WebJobs.Script.WebHost/Diagnostics/DiagnosticEvent.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ public DiagnosticEvent(string hostId, DateTime timestamp)
1717
{
1818
RowKey = TableStorageHelpers.GetRowKey(timestamp);
1919
PartitionKey = $"{hostId}-{timestamp:yyyyMMdd}";
20+
Timestamp = timestamp;
2021
}
2122

2223
public int HitCount { get; set; }
2324

24-
public DateTimeOffset TimeStamp { get; set; }
25-
2625
public string Message { get; set; }
2726

2827
public string ErrorCode { get; set; }

src/WebJobs.Script.WebHost/Diagnostics/DiagnosticEventTableStorageRepository.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ public void WriteDiagnosticEvent(DateTime timestamp, string errorCode, LogLevel
184184
{
185185
ErrorCode = errorCode,
186186
HelpLink = helpLink,
187-
TimeStamp = timestamp,
188187
Message = message,
189188
LogLevel = level,
190189
Details = exception?.ToFormattedString(),

test/WebJobs.Script.Tests.Integration/Diagnostics/DiagnosticEventTableStorageRepositoryTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ public async Task ExecuteBatchAsync_WritesToTableStorage()
231231

232232
var dateTime = DateTime.UtcNow;
233233
var diagnosticEvent = new DiagnosticEvent("hostId", dateTime);
234-
diagnosticEvent.TimeStamp = dateTime;
235234
var events = new ConcurrentDictionary<string, DiagnosticEvent>();
236235
events.TryAdd("EC123", diagnosticEvent);
237236
await repository.ExecuteBatchAsync(events, table);

test/WebJobs.Script.Tests/Diagnostics/DiagnosticEventLoggerTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ public void WriteDiagnosticEvent(DateTime timestamp, string errorCode, LogLevel
8484
{
8585
_events.Add(new DiagnosticEvent("hostid", timestamp)
8686
{
87-
TimeStamp = timestamp,
8887
ErrorCode = errorCode,
8988
LogLevel = level,
9089
Message = message,

0 commit comments

Comments
 (0)