MCPcopy Create free account
hub / github.com/cortexproject/cortex / New

Function New

pkg/util/spanlogger/spanlogger.go:33–35  ·  view source on GitHub ↗

New makes a new SpanLogger, where logs will be sent to the global logger.

(ctx context.Context, method string, kvps ...any)

Source from the content-addressed store, hash-verified

31
32// New makes a new SpanLogger, where logs will be sent to the global logger.
33func New(ctx context.Context, method string, kvps ...any) (*SpanLogger, context.Context) {
34 return NewWithLogger(ctx, util_log.Logger, method, kvps...)
35}
36
37// NewWithLogger makes a new SpanLogger with a custom log.Logger to send logs
38// to. The provided context will have the logger attached to it and can be

Callers 15

SeriesMethod · 0.92
LabelNamesMethod · 0.92
LabelValuesMethod · 0.92
SeriesMethod · 0.92
LabelNamesMethod · 0.92
LabelValuesMethod · 0.92
SeriesMethod · 0.92
LabelNamesMethod · 0.92
LabelValuesMethod · 0.92
SelectMethod · 0.92
LabelNamesMethod · 0.92
LabelValuesMethod · 0.92

Calls 1

NewWithLoggerFunction · 0.85

Tested by 3

SelectMethod · 0.74
TestSpanLogger_LogFunction · 0.56
createSpanFunction · 0.56