Documentation
¶
Index ¶
- func GCPReplacer(groups []string, a slog.Attr) slog.Attr
- func TraceHandler(h http.Handler, opts ...otelhttp.Option) http.Handler
- type CloudLoggingHandler
- func (h *CloudLoggingHandler) Enabled(ctx context.Context, level slog.Level) bool
- func (h *CloudLoggingHandler) Handle(ctx context.Context, record slog.Record) error
- func (h *CloudLoggingHandler) WithAttrs(attrs []slog.Attr) slog.Handler
- func (h *CloudLoggingHandler) WithGroup(name string) slog.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CloudLoggingHandler ¶
type CloudLoggingHandler struct {
// contains filtered or unexported fields
}
func NewCloudLoggingHandler ¶
func NewCloudLoggingHandler(projectID string, opts *slog.HandlerOptions) *CloudLoggingHandler
CloudLoggingHandler is a slog.Handler which adds attributes from the span context.
func (*CloudLoggingHandler) Handle ¶
Handle overrides slog.Handler's Handle method. This adds attributes from the span context to the slog.Record.
Click to show internal directories.
Click to hide internal directories.