Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DevProxy.Abstractions/Proxy/ProxyEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public class RequestLog
public MessageType MessageType { get; set; }
public string? Method { get; init; }
public string? PluginName { get; set; }
public DateTimeOffset Timestamp { get; init; } = DateTimeOffset.UtcNow;
public string? Url { get; init; }

public RequestLog(string message, MessageType messageType, LoggingContext? context) :
Expand Down
3 changes: 1 addition & 2 deletions DevProxy.Plugins/Generation/HarGeneratorPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,10 @@ private HarEntry CreateHarEntry(RequestLog log)

var request = log.Context.Session.HttpClient.Request;
var response = log.Context.Session.HttpClient.Response;
var currentTime = DateTime.UtcNow;

var entry = new HarEntry
{
StartedDateTime = currentTime.ToString("o"),
StartedDateTime = log.Timestamp.ToString("o"),
Copy link
Copy Markdown
Collaborator Author

@waldekmastykarz waldekmastykarz Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Does this apply even if log.Timestamp is set to DateTimeOffset.UtcNow?

Time = 0, // We don't have actual timing data in RequestLog
Comment on lines +109 to 110
Request = new HarRequest
{
Expand Down
Loading