Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MuxHTTPMiddleware ¶
func MuxHTTPMiddleware(service string) mux.MiddlewareFunc
MuxHTTPMiddleware sets up a handler to start tracing the incoming requests. The service parameter should describe the name of the (virtual) server handling the request.
func SetTraceInRequest ¶
SetTraceInRequest will put the trace in @r headers
func SetTraceInResponse ¶
func SetTraceInResponse(ctx context.Context, r http.ResponseWriter)
SetTraceInResponse will put the trace in @r headers
func Setup ¶
func Setup(c Config) app.ShutdownFunc
Setup use Config to setup an trace exporter and returns a shutdown handler
Types ¶
type Config ¶
type Config struct { Exporter string `default:""` ProbabilitySample float64 `default:"0"` Stackdriver struct { ProjectID string } }
Config represents all trace's configuration
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
Span is the individual component of a trace. It represents a single named and timed operation of a workflow that is traced
type TraceInfo ¶
TraceInfo carries the trace informations
func GetTraceInfoFromContext ¶
GetTraceInfoFromContext returns a TraceInfo from the context @ctx or logs if there is no TraceInfo in context
func (TraceInfo) MarshalZerologObject ¶
MarshalZerologObject implements the zerolog marshaler so it can be logged using: log.With().EmbededObject(t).Msg("Some message")