k6 icon indicating copy to clipboard operation
k6 copied to clipboard

Log metrics & traces flush to cloud as 'trace'

Open joanlopez opened this issue 7 months ago • 4 comments

What?

It creates log lines that announce that metrics and traces have been flushed to the cloud at the trace level instead of debug.

Why?

Because these operations are executed many times per test execution, these lines are repeated repeatedly, generating noise rather than bringing value. We generally use debug as the "default" log level when monitoring our systems and/or in integration tests, but these log lines are generally filtered out.

In case of error while flushing, the error will be handled and reported as such (with error log level).

Checklist

  • [X] I have performed a self-review of my code.
  • [ ] I have commented on my code, particularly in hard-to-understand areas.
  • [ ] I have added tests for my changes.
  • [X] I have run linter and tests locally (make check) and all pass.

Checklist: Documentation (only for k6 maintainers and if relevant)

Please do not merge this PR until the following items are filled out.

  • [ ] I have added the correct milestone and labels to the PR.
  • [ ] I have updated the release notes: link
  • [ ] I have updated or added an issue to the k6-documentation: grafana/k6-docs#NUMBER if applicable
  • [ ] I have updated or added an issue to the TypeScript definitions: grafana/k6-DefinitelyTyped#NUMBER if applicable

Related PR(s)/Issue(s)

N/A

joanlopez avatar Apr 01 '25 23:04 joanlopez