Skip to content

feat: Gleap.stopNetworkLogger, and network logs off in the dashboard means off - #251

Merged
LucaB01 merged 8 commits into
masterfrom
feat/stop-network-logger
Dec 1, 2026
Merged

LucaB01 merged 8 commits into
masterfrom
feat/stop-network-logger

Conversation

@LucaB01

@LucaB01 LucaB01 commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Why

The JS SDK had no way to turn network logging off from code, and with Network logs off in the dashboard it still attached the browser's Resource Timing entries (fetch/XHR URLs with query strings) to tickets. A running logger could not be stopped either.

What changes

  • Gleap.stopNetworkLogger(), also before initialize(): the dashboard can no longer start the logger, captured and attached logs are deleted, and no network data is sent, Resource Timing included.
  • Dashboard off means off (a missing setting counts as off, as the dashboard shows it): a running logger stops, its logs are deleted, Resource Timing is left out. Logs from attachNetworkLogs still go out.
  • startNetworkLogger() wins over the dashboard and ends a stop. Resource Timing entries from before that moment do not come back after a stop or an off from the server.
  • A cached off only holds logs back until the server's config arrives. Before any config is known, Resource Timing is left out.
  • Logs already copied are withdrawn too: reports being sent, 413 resends, capture request logs and the failed requests in a recording timeline.
  • fetch and XMLHttpRequest are restored on stop where our wrapper is still the installed one. A wrapper we removed never records again. Gleap.destroy() stops the logger.

Please review

  • Product decision: the dashboard-off change applies to existing projects on latest without an opt-in, as a minor version. It is listed under Breaking changes. The missing-setting case is an exception to "a missing setting keeps today's behaviour" in AGENTS.md, approved by the owner.
  • Known limit: when a page tool takes our wrapper out of the chain, a restart does not wrap fetch again.
  • Version bumped to 19.10.0, with the rebuilt build/, published/latest and published/19.10.0. Not tagged: the tag after the merge publishes to npm.

Checks

  • npx vitest related <changed files> --run: 760 passed
  • npm run typecheck, npm run build: clean
  • npm run test:smoke: 9 passed
  • node tools/quality/check.mjs --base origin/master: 0 problems, 4 file-size warnings

Not checked: a real browser beyond the smoke tests, and CompressionStream bodies of capture logs.

🤖 Generated with Claude Code

LucaB01 and others added 8 commits December 1, 2026 10:37
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…means off

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stored wrappers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… restore wrappers on stop

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cached off and destroy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LucaB01
LucaB01 merged commit 051d6fb into master Dec 1, 2026
2 checks passed
@LucaB01
LucaB01 deleted the feat/stop-network-logger branch December 1, 2026 10:24
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