telem

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerFrom added in v0.6.0

func LoggerFrom(ctx context.Context, keyvals ...interface{}) kitlog.Logger

LoggerFrom retrieves the stashed logger from a context, as put there by WithLogger

func StartSpan added in v0.6.0

func StartSpan(ctx context.Context, name string, opts ...trace.StartOption) (context.Context, *trace.Span, kitlog.Logger)

StartSpan extends the opencensus method so it stashes a logger into the context, and annotates the logger with the current trace ID. If a logger was never provided, we use a no-op logger.

func WithLogger added in v0.6.0

func WithLogger(ctx context.Context, logger kitlog.Logger, keyvals ...interface{}) (context.Context, kitlog.Logger)

WithLogger configures a logger that can be retrived with LoggerFrom.

Types

This section is empty.

Jump to

Keyboard shortcuts

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