Skip to content

Conversation

@kirqz23
Copy link
Contributor

@kirqz23 kirqz23 commented Oct 22, 2025

The AtomicCore.With() method was breaking the atomic chain when fields were applied to the logger, preventing swapping of otel core correctly. The main issue was that d.load().With(fs) was returning totally new noop core disconnected from atomic core.

func (d *AtomicCore) With(fs []zapcore.Field) zapcore.Core {
    return d.load().With(fs) 
}

The fix introduces a weak pointer solution that maintains atomic core connections while preventing memory leaks and tracks child cores created via .With() calls.

@kirqz23 kirqz23 requested review from a team as code owners October 22, 2025 12:50
@kirqz23 kirqz23 added the build-publish Build and Publish image to SDLC label Oct 22, 2025
@kirqz23 kirqz23 marked this pull request as draft October 22, 2025 12:50
@github-actions
Copy link
Contributor

👋 kirqz23, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@kirqz23 kirqz23 changed the title Draft: Test overwritting logger Draft: Test logger Oct 22, 2025
@kirqz23 kirqz23 changed the title Draft: Test logger INFOPLAT-3111: Fix atomic swapper for otel zap core Oct 23, 2025
@kirqz23 kirqz23 removed the build-publish Build and Publish image to SDLC label Oct 23, 2025
@kirqz23 kirqz23 marked this pull request as ready for review October 23, 2025 17:22
@kirqz23 kirqz23 requested a review from a team as a code owner October 23, 2025 17:22
@kirqz23 kirqz23 added the build-publish Build and Publish image to SDLC label Oct 23, 2025
@kirqz23 kirqz23 added build-publish Build and Publish image to SDLC and removed build-publish Build and Publish image to SDLC labels Oct 23, 2025
@kirqz23 kirqz23 requested a review from jmank88 October 23, 2025 19:15
@cl-sonarqube-production
Copy link

@jmank88 jmank88 enabled auto-merge October 23, 2025 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-publish Build and Publish image to SDLC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants