From a090ffcd46ffa600366c7bb43528f12bde84c0eb Mon Sep 17 00:00:00 2001 From: ka3de Date: Mon, 24 Jul 2023 10:11:04 +0200 Subject: [PATCH] Refactor onConsoleAPICalled log fields In order to be consistent with the usage of 'source:browser' log fields across all logs generated from the browser extension, this commit replaces the current 'source' log field for onConsoleAPICalled logger, which was previously set to 'browser-console-api', to 'browser'. Also moves and modifies the previous 'browser-console-api' to be set as 'console-api' for the 'browser_source' keyed field, which is currently also used in the 'onLogEntryAdded' method logger. --- common/frame_session.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/frame_session.go b/common/frame_session.go index 1c33fc8fb..fa954b88d 100644 --- a/common/frame_session.go +++ b/common/frame_session.go @@ -582,7 +582,8 @@ func (fs *FrameSession) navigateFrame(frame *Frame, url, referrer string) (strin func (fs *FrameSession) onConsoleAPICalled(event *cdpruntime.EventConsoleAPICalled) { l := fs.serializer. WithTime(event.Timestamp.Time()). - WithField("source", "browser-console-api") + WithField("source", "browser"). + WithField("browser_source", "console-api") /* accessing the state Group while not on the eventloop is racy if s := fs.vu.State(); s.Group.Path != "" {