Skip to content

feat!: remove issue creation from logging integrations#1340

Open
giortzisg wants to merge 2 commits into
masterfrom
feat/issue-1238-remove-logging-events
Open

feat!: remove issue creation from logging integrations#1340
giortzisg wants to merge 2 commits into
masterfrom
feat/issue-1238-remove-logging-events

Conversation

@giortzisg

Copy link
Copy Markdown
Contributor

Description

This removes all deprecated issue creation functionality to prepare for 0.48.0.

Issues

Changelog Entry Instructions

To add a custom changelog entry, uncomment the section above. Supports:

  • Single entry: just write text
  • Multiple entries: use bullet points
  • Nested bullets: indent 4+ spaces

For more details: custom changelog entries

Reminders

Co-Authored-By: GPT-5 <agent-email-or-noreply@example.com>
@giortzisg giortzisg self-assigned this Jul 1, 2026
@linear-code

linear-code Bot commented Jul 1, 2026

Copy link
Copy Markdown

GO-130

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Semver Impact of This PR

🔴 Major (breaking changes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Breaking Changes 🛠

  • Remove issue creation from logging integrations by giortzisg in #1340

New Features ✨

  • PushScope shorthand now returns the new scope reference by DoctorJohn in #1335

Bug Fixes 🐛

  • Isolate event processor across clones by giortzisg in #1337

Internal Changes 🔧

  • Move limited buffer under utils by giortzisg in #1338

🤖 This preview updates automatically when you update the PR.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9afe9a6. Configure here.

Comment thread slog/sentryslog.go

type SentryHandler struct {
eventHandler *eventHandler
logHandler *logHandler

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AttrFromContext never applied

Medium Severity

Removing the event handler dropped the only call to contextExtractor for Option.AttrFromContext, while the option and README still promise context-derived attributes on log entries. logHandler.Handle builds attributes from the record only, so configured extractors never run and context metadata is silently omitted from Sentry logs.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9afe9a6. Configure here.

Comment thread logrus/logrusentry.go
Comment on lines -196 to -206
errorDepth = client.Options().MaxErrorDepth
}
}
s.SetException(err, errorDepth)
}

key = h.key(FieldUser)
switch user := extra[key].(type) {
case sentry.User:
delete(extra, key)
s.User = user

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: After SetHubProvider is called, Flush uses the new hub's client, while the logger still uses the original client. This prevents buffered logs from being flushed.
Severity: HIGH

Suggested Fix

The sentryLogger should not store a static reference to the hub. Instead, it should use the hubProvider from the hook to get the current hub whenever it needs to log a message. This ensures that both logging and flushing operations use the same, up-to-date hub and client, even if the provider is changed after initialization.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: logrus/logrusentry.go#L196-L206

Potential issue: The `sentryLogger` within the `logHook` is initialized with a hub and
its associated client, and log entries are buffered in this client. The `Flush` method
uses a `hubProvider` to get the hub and client to flush. If a user calls
`SetHubProvider` to change the hub after initialization, `Flush` will attempt to flush
the new client. However, the logger retains its reference to the original client where
the logs are buffered. This discrepancy causes `Flush` to operate on a different client
than the one holding the logs, leading to silent data loss as buffered logs are never
sent.

Did we get this right? 👍 / 👎 to inform future reviews.

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.

Remove issue creation functionality from logging integrations

1 participant