spanlogger

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TenantIDsTagName is the tenant IDs tag name.
	TenantIDsTagName = spanlogger.TenantIDsTagName
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LazyJoin

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

func (*LazyJoin) String

func (l *LazyJoin) String() string

type LogSpanParametersWrapper

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

type QueryStats added in v2.1.0

type QueryStats struct {
	ObjectStorageBytes uint64
	MetastoreBytes     uint64
	// EstimatedBytes is the pre-execution metadata size estimate (weight.Total())
	// derived from block dataset section offsets before the backend is invoked.
	EstimatedBytes uint64
}

QueryStats is populated by the query-frontend during query execution and read by LogSpanParametersWrapper after the call returns, so that bytes fetched can be included in the query log line.

func ContextWithQueryStats added in v2.1.0

func ContextWithQueryStats(ctx context.Context) (context.Context, *QueryStats)

ContextWithQueryStats attaches a fresh QueryStats to ctx and returns both the enriched context and a pointer to the stats struct.

func QueryStatsFromContext added in v2.1.0

func QueryStatsFromContext(ctx context.Context) *QueryStats

QueryStatsFromContext returns the QueryStats stored in ctx, or nil if none.

type SpanLogger

type SpanLogger = spanlogger.SpanLogger

SpanLogger unifies tracing and logging, to reduce repetition.

func FromContext

func FromContext(ctx context.Context, fallback log.Logger) *SpanLogger

FromContext returns a SpanLogger using the current parent span. If there is no parent span, the SpanLogger will only log to the logger within the context. If the context doesn't have a logger, the fallback logger is used.

func NewWithLogger

func NewWithLogger(ctx context.Context, logger log.Logger, method string, kvps ...interface{}) (*SpanLogger, context.Context)

NewWithLogger is like New but allows to pass a logger.

Jump to

Keyboard shortcuts

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