Skip to content

feat: Report k6 timestamp on k6 execution logs#1636

Merged
The-9880 merged 2 commits intomainfrom
report-k6-time
Mar 27, 2026
Merged

feat: Report k6 timestamp on k6 execution logs#1636
The-9880 merged 2 commits intomainfrom
report-k6-time

Conversation

@The-9880
Copy link
Copy Markdown
Contributor

@The-9880 The-9880 commented Dec 1, 2025

For discussion - the time label reports the actual timestamp of the log as k6 encountered it, while the ts label corresponds to when the agent extracted the logs:
image

This change uses the time reported by k6 as the Timestamp for Loki entries, rather than the time of log extraction.

@The-9880 The-9880 requested a review from a team as a code owner December 1, 2025 22:17
@The-9880 The-9880 requested review from mem and nadiamoe December 1, 2025 22:17
Comment thread internal/scraper/scraper.go
@mem
Copy link
Copy Markdown
Contributor

mem commented Jan 7, 2026

@The-9880 is there something else needed for this?

Uses the timestamp reported by k6 during the execution of scripted checks as
the Timestamp for Loki logs, rather than the current timestamp at the time
of extraction.
Adds a test covering the case where k6's 'time=' field appears before
the kit-log 'ts=' field in a log line.
@The-9880 The-9880 requested a review from mem March 24, 2026 19:18
@The-9880
Copy link
Copy Markdown
Contributor Author

@The-9880 is there something else needed for this?

Ready for re-review

@mem mem removed the request for review from nadiamoe March 26, 2026 22:55
@The-9880 The-9880 merged commit f890931 into main Mar 27, 2026
12 checks passed
@The-9880 The-9880 deleted the report-k6-time branch March 27, 2026 00:59
@sm-release-app sm-release-app Bot mentioned this pull request Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants