fix(otelzap): write core.ctx only when init by okhowang · Pull Request #7368 · open-telemetry/opentelemetry-go-contrib (original) (raw)
The committers listed above are authorized under a signed CLA.
- ✅ login: okhowang (8bb35fe)
- ✅ login: dmathieu / name: Damien Mathieu (efbaed5)
- ✅ login: pellared / name: Robert Pająk (f4a5cff)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a changelog entry?
Codecov Report
All modified and coverable lines are covered by tests ✅
Project coverage is 81.6%. Comparing base (b2aa398) to head (efbaed5).
Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@ ## main #7368 +/- ##
Coverage 81.6% 81.6%
Files 205 205
Lines 18186 18187 +1
- Hits 14840 14844 +4
- Misses 2924 2922 -2
- Partials 422 421 -1
| Files with missing lines | Coverage Δ | |
|---|---|---|
| bridges/otelzap/core.go | 97.9% <100.0%> (+<0.1%) | ⬆️ |
... and 1 file with indirect coverage changes
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this!
Could this be tested?
it can be found by go test -race, and adding a test to call Write with context.Context field in two goroutine.
Sure, but the CI does run go test with -race and doesn't fail on the main branch.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, we now only need a changelog entry 😸
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})