trace

package
v0.7.13 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: BSD-3-Clause Imports: 9 Imported by: 0

README

Open Tracing Support for Pasing

Open Tracing is used to aggregate distributes tracing information on a Jaeger server. With its GUI a reguest can be traced even if it hops along multiple services.

Ressources

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ID

func ID(span opentracing.Span) string

ID extraxts the jaeger TraceID as a hex string, which in turn can be fed into the Jaeger UI

func Initialize

func Initialize(servicename string, lg *log.Logger) (opentracing.Tracer, io.Closer, error)

Initialize sets up an FSE DSL standard tracer and makes it global. It is the responsibility of the caller to Close the returned closer, if no error was returned. Jaeger is basically configured from environment vars, as listed on https://github.com/jaegertracing/jaeger-client-go#environment-variables However we override the servicename and set the sampler to every span.

func Middleware

func Middleware(tr opentracing.Tracer) func(h http.Handler) http.Handler

Middleware returns a gorilla mux compatible http middleware, that extracts from r or starts a new open tracing span and puts it into the request's context via opentracing.ContextWithSpan(). Use it by opentracing.SpanFromContext(). A Pasing-suitable operation name is formed from the request and nethttp Std tags are added to the span.

Types

This section is empty.

Jump to

Keyboard shortcuts

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