Skip to content

Conversation

@muratmirgun
Copy link
Contributor

@muratmirgun muratmirgun commented Jan 16, 2026

Title
feat: Add Zap logger integration

Description
This PR introduces official support for the Zap logging library, allowing oops.OopsError to be logged with structured context and stack traces using Zap's high-performance field system.

Changes:

Implemented loggers/zap package with OopsMarshalFunc and OopsStackMarshaller.
Added comprehensive unit tests and benchmarks for the Zap formatter.
Added a full usage example in examples/zap.
Updated go.work to include the new modules.
Fixed a brittle test in stacktrace_test.go that failed when the build path didn't contain the module name.

@samber samber merged commit cb93271 into samber:main Jan 18, 2026
6 checks passed
@codecov
Copy link

codecov bot commented Jan 18, 2026

Codecov Report

❌ Patch coverage is 68.96552% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.08%. Comparing base (2abf8f2) to head (9c99cb0).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
loggers/zap/formatter.go 68.96% 7 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #97      +/-   ##
==========================================
- Coverage   85.57%   85.08%   -0.50%     
==========================================
  Files          13       14       +1     
  Lines         943      972      +29     
==========================================
+ Hits          807      827      +20     
- Misses        112      119       +7     
- Partials       24       26       +2     
Flag Coverage Δ
unittests 85.08% <68.96%> (-0.50%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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