Create an exp/slog.Handler
The Go team have released an experimental structured logger. It is very likely to become a part of the standard library in the future. As a Sentry user, I would like any errors that I log with slog.Error to be sent to Sentry.
The simplest way for this to happen that I can think of is for Sentry to release some kind of slog.Handler that intercepts certain log calls and sends some Sentry before writing them to an underlying wrapped slog.Handler for output to stderr, etc.
Go 1.21 was released a few days ago and the standard library now contains the structured logger: https://pkg.go.dev/log/slog
Someone wrote a client adapting Sentry to work with slog: https://github.com/samber/slog-sentry. For now, my plan is to integrate that, but ISTM, it should be merged in here.