telemetry

package
v0.1542.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package telemetry provides functionality for tracing with AWS X-Ray and logging information related to the current web request.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendMiddlewares added in v0.1506.0

func AppendMiddlewares(list *[]func(*middleware.Stack) error)

func NewSlogHandler added in v0.1178.0

func NewSlogHandler(h slog.Handler) slog.Handler

func Setup

func Setup(ctx context.Context, resource *resource.Resource, apiOptions *[]func(*middleware.Stack) error) (func(context.Context) error, error)

func SetupLambda added in v0.1512.0

func SetupLambda(ctx context.Context, apiOptions *[]func(*middleware.Stack) error) (*sdktrace.TracerProvider, error)

SetupLambda requires an ADOT collector lambda extension to be included in the deployed lambda image for the below instrumentation to work

func WrapHandler

func WrapHandler(handler http.Handler) http.HandlerFunc

Types

type SlogHandler added in v0.1178.0

type SlogHandler struct {
	// contains filtered or unexported fields
}

func (*SlogHandler) Enabled added in v0.1178.0

func (h *SlogHandler) Enabled(ctx context.Context, level slog.Level) bool

func (*SlogHandler) Handle added in v0.1178.0

func (h *SlogHandler) Handle(ctx context.Context, record slog.Record) error

func (*SlogHandler) WithAttrs added in v0.1178.0

func (h *SlogHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (*SlogHandler) WithGroup added in v0.1178.0

func (h *SlogHandler) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL