Skip to content

Conversation

@mcastorina
Copy link
Contributor

@mcastorina mcastorina commented Feb 6, 2026

Description:

Refactor some parts of the log package to simplify the internals. NB this is a breaking change for WithSentry and AddSentry functions.

  • Replace logConfig with zapcore.Core
  • Add SyncFunc type and tests
  • Change Sentry functions to accept a *sentry.Client
  • Rename newCoreConfig to newCore

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@mcastorina mcastorina requested a review from a team February 6, 2026 20:02
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

func WithCore(core zapcore.Core) logConfig {
return logConfig{core: core}
func WithCore(core zapcore.Core) zapcore.Core {
return core
Copy link

Choose a reason for hiding this comment

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

WithCore is now a redundant identity function

Low Severity

WithCore previously wrapped a zapcore.Core in a logConfig struct, which was meaningful. After this refactoring, since functions now return zapcore.Core directly, WithCore just returns its argument unchanged — it's a pure identity function. It's also unused anywhere in the codebase.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm okay with this redundancy, but if a human objects I can remove it.

@rosecodym rosecodym requested a review from a team February 6, 2026 20:21
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