Skip to content

feature: add minimum breadcrumb level filtering#211

Merged
KishanPRao merged 19 commits into
masterfrom
feature/min-breadcrumb-level
May 22, 2026
Merged

feature: add minimum breadcrumb level filtering#211
KishanPRao merged 19 commits into
masterfrom
feature/min-breadcrumb-level

Conversation

@KishanPRao
Copy link
Copy Markdown
Contributor

@KishanPRao KishanPRao commented May 19, 2026

Summary

Adds a way to set the global minimum breadcrumb level while enabling breadcrumbs, which allows filtering the breadcrumbs from being added, when below the minimum level.

Changes

  • Breadcrumbs.java: 4 new enableBreadcrumbs backward-compatible overloads with minBreadcrumbLevel argument, plus getMinBreadcrumbLevel().
  • BacktraceBreadcrumbs.java: stores the minBreadcrumbLevel threshold, default DEBUG level, drops below-threshold breadcrumbs during addBreadcrumb, logs the level in the configuration breadcrumb.
  • BacktraceBase.java: forwards the new overloads and getter to the breadcrumb implementation.
  • BacktraceBreadcrumbsTest.java: 5 tests covering below/at/above threshold, default level, re-enable update level, new breadcrumb.level attribute in config.
  • MainActivity.java: example app sets min level to INFO and emits one breadcrumb per level in sendReport to showcase the filter.
  • BreadcrumbsReader.java: included JSON-parse check with existing substring timestamp match; issue exposed by the new breadcrumb.level attribute shifting QueueFile byte alignment.

ref: BT-6699

@KishanPRao KishanPRao self-assigned this May 19, 2026
@KishanPRao KishanPRao requested a review from melekr May 19, 2026 15:21
@KishanPRao KishanPRao changed the title feature: minimum breadcrumb level feature: set global minimum breadcrumb level May 20, 2026
@KishanPRao KishanPRao changed the title feature: set global minimum breadcrumb level feature: add minimum breadcrumb level filtering May 20, 2026
Comment thread backtrace-library/src/main/java/backtraceio/library/interfaces/Breadcrumbs.java Outdated
Copy link
Copy Markdown
Collaborator

@melekr melekr left a comment

Choose a reason for hiding this comment

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

lgtm 🚀

@melekr melekr marked this pull request as ready for review May 22, 2026 17:01
KishanPRao and others added 6 commits May 22, 2026 19:03
Co-authored-by: melek <127785723+melekr@users.noreply.github.com>
Co-authored-by: melek <127785723+melekr@users.noreply.github.com>
Co-authored-by: melek <127785723+melekr@users.noreply.github.com>
Co-authored-by: melek <127785723+melekr@users.noreply.github.com>
Co-authored-by: melek <127785723+melekr@users.noreply.github.com>
@KishanPRao KishanPRao merged commit 76046b4 into master May 22, 2026
3 checks passed
@KishanPRao KishanPRao deleted the feature/min-breadcrumb-level branch May 22, 2026 17:33
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