Documentation ¶
Index ¶
- func Debug(ctx context.Context, msg string, args ...any) context.Context
- func Error(ctx context.Context, msg string, args ...any) context.Context
- func HttpMiddleware() func(next http.Handler) http.Handler
- func HttpUpdateRequest(r *http.Request)
- func Info(ctx context.Context, msg string, args ...any) context.Context
- func NewHttpRequest(ctx context.Context, method string, url string, body io.Reader) (*http.Request, error)
- func Warn(ctx context.Context, msg string, args ...any) context.Context
- func WithBufferSize(size int) httpExporterOptsFn
- func WithInterval(interval time.Duration) httpExporterOptsFn
- type HttpExporter
- func (e *HttpExporter) Close()
- func (e *HttpExporter) Enabled(ctx context.Context, level slog.Level) bool
- func (e *HttpExporter) Handle(ctx context.Context, r slog.Record) error
- func (e *HttpExporter) WithAttrs(attrs []slog.Attr) slog.Handler
- func (e *HttpExporter) WithGroup(name string) slog.Handler
- type Record
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HttpUpdateRequest ¶ added in v0.0.5
HttpUpdateRequest updates the http request with the log parent id added to the header
func NewHttpRequest ¶ added in v0.0.5
func WithBufferSize ¶ added in v0.0.2
func WithBufferSize(size int) httpExporterOptsFn
func WithInterval ¶ added in v0.0.2
Types ¶
type HttpExporter ¶ added in v0.0.2
type HttpExporter struct {
// contains filtered or unexported fields
}
func NewHttpExporter ¶ added in v0.0.2
func NewHttpExporter(addr string, handler slog.Handler, opts ...httpExporterOptsFn) *HttpExporter
func (*HttpExporter) Close ¶ added in v0.0.2
func (e *HttpExporter) Close()
Click to show internal directories.
Click to hide internal directories.