Stackdriver Logging / GCP Cloud Logging handler for go the slog package for structured logging introduced in the standard library of go 1.21.
NOTE: slogdriver requires go 1.21.
- Improved performance compared to using the
JSONHandler
withReplaceAttr
to achieve the same purpose. This is achieved by using goldjson under the hood. - Batteries included, e.g. builtin support for labels and traces. The trace information still needs to be provided separately as the library is agnostic as to which telemetry libraries (or versions) you choose to use. It is still highly advised to use OpenTelemetry.
- Minimal dependencies.