package zap
import "github.com/uber/jaeger-client-go/log/zap"
Index ¶
- func Context(sc jaeger.SpanContext) zapcore.Field
- func NewLoggingTracer(logger *zap.Logger, tracer opentracing.Tracer) opentracing.Tracer
- func Span(s opentracing.Span) zapcore.Field
- func Trace(ctx context.Context) zapcore.Field
- type Logger
Functions ¶
func Context ¶
func Context(sc jaeger.SpanContext) zapcore.Field
Context creates a zap.Field which marshals all information contained in a jaeger context
func NewLoggingTracer ¶
NewLoggingTracer creates a new tracer that logs all span interactions
func Span ¶
func Span(s opentracing.Span) zapcore.Field
Span creates a zap.Field that marshals all information contained in a jaeger span
func Trace ¶
Trace creates a field that extracts tracing information from a context and includes it under the "trace" key.
Because the opentracing APIs don't expose this information, the returned zap.Field is a no-op for contexts that don't contain a span or contain a non-Jaeger span. TODO: delegate to `spanContext`
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is an adapter from zap Logger to jaeger-lib Logger.
func NewLogger ¶
NewLogger creates a new Logger.
func (*Logger) Debugf ¶
Debugf logs a message at debug priority. TODO: treat the last arg specially similar to Slf4J - cast to zap.Span/etc if type assertion succeeds
func (*Logger) Error ¶
Error logs a message at error priority
func (*Logger) Infof ¶
Infof logs a message at info priority
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
log/zap/mock_opentracing | Package mock_opentracing is a generated GoMock package. |
- Version
- v2.29.1+incompatible
- Published
- May 24, 2021
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 2 hours ago –
Tools for package owners.