Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithSpan ¶
func ContextWithSpan(ctx *fasthttp.RequestCtx, span opentracing.Span) *fasthttp.RequestCtx
ContextWithSpan returns a new `*fasthttp.RequestCtx` that holds a reference to the span. If span is nil, a new context without an active span is returned.
func SpanFromContext ¶
func SpanFromContext(ctx *fasthttp.RequestCtx) opentracing.Span
SpanFromContext returns the `opentracing.Span` previously associated with `ctx`, or `nil` if no such `opentracing.Span` could be found.
Types ¶
type Carrier ¶
type Carrier struct {
// contains filtered or unexported fields
}
Carrier satisfies both TextMapWriter and TextMapReader.
Example usage for server side:
carrier := opentracefasthttp.New(&ctx.Request.Header) clientContext, err := tracer.Extract(opentracing.HTTPHeaders, carrier)
Example usage for client side:
carrier := opentracefasthttp.New(&req.Header) err := tracer.Inject( span.Context(), opentracing.HTTPHeaders, carrier)
func New ¶
func New(h *fasthttp.RequestHeader) Carrier
func (Carrier) ForeachKey ¶
ForeachKey conforms to the TextMapReader interface.
Click to show internal directories.
Click to hide internal directories.