package traces

import 

// Handler receives finished span [Record] values from a [Tracer].
// Implementations must be safe for concurrent use.
type Handler interface {
	// Handle processes a finished span record.
	Handle(ctx context.Context, rec Record) error
}

// HandlerFunc is a function that implements the [Handler] interface.
type HandlerFunc func(ctx context.Context, rec Record) error

// Handle implements the [Handler] interface.
func ( HandlerFunc) ( context.Context,  Record) error {
	return (, )
}

type discardHandler struct{}

func (*discardHandler) (context.Context, Record) error {
	return nil
}

// DiscardHandler returns a [Handler] that discards all span records. Passing
// DiscardHandler() to [New] disables span recording without allocating span
// state.
func () Handler {
	return (*discardHandler)(nil)
}