Skip to content

feat(otelslog): add WithLevel option to configure minimum log level - #9461

Open
LinPr wants to merge 2 commits into
open-telemetry:mainfrom
LinPr:main
Open

feat(otelslog): add WithLevel option to configure minimum log level#9461
LinPr wants to merge 2 commits into
open-telemetry:mainfrom
LinPr:main

Conversation

@LinPr

@LinPr LinPr commented Aug 12, 2026

Copy link
Copy Markdown

impliment #9460

- Add WithLevel option to set Handler's minimum log level
- Default level is slog.LevelInfo (filters Debug logs by default)
- Add level filtering in Enabled method
- Add comprehensive tests for level filtering behavior
- Update existing tests to work with new default level
@LinPr
LinPr requested review from a team, MrAlias and pellared as code owners August 12, 2026 06:31
@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.5%. Comparing base (0bbc212) to head (6bc27f9).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #9461   +/-   ##
=====================================
  Coverage   84.5%   84.5%           
=====================================
  Files        203     203           
  Lines      16783   16793   +10     
=====================================
+ Hits       14195   14205   +10     
  Misses      2109    2109           
  Partials     479     479           
Files with missing lines Coverage Δ
bridges/otelslog/handler.go 97.2% <100.0%> (+0.1%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Replace duplicate context.Background() calls with shared t.Context()
across subtests for better test context management.
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.

1 participant