ot_logfmt

package module
v0.0.0-...-51aff88 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2017 License: MIT Imports: 5 Imported by: 0

README

OpenTracing Logging Implementation

OpenTracing compatible logging implementation.

Use the same standard opentracing interface for your structured application logging!

[WORK IN PROGRESS] This project is just getting started and is not yet functional

Usage

Configure ot-logfmt as your tracer:

opentracing.InitGlobalTracer(
        // tracing impl specific:
        ot_logfmt.NewTracer()
    )

Trace and log against the tracer interface:

span := opentracing.StartSpan("request")
span.SetTag("http.method", "GET")

span.LogFields(log.String("event", "finish"), log.String("message", "We have done a request"))

This will have outputted to stdout:

ts=1509745762970 event=finish message="We have done a request" http.method=GET operation=request

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTracer

func NewTracer() opentracing.Tracer

Types

This section is empty.

Jump to

Keyboard shortcuts

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