Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartSpanFromContext ¶
func StartSpanFromContext(fctx *fasthttp.RequestCtx, operationName string, opts ...tracer.StartSpanOption) tracer.Span
StartSpanFromContext returns a new span with the given operation name and options. If a span is found in the `fctx`, it will be used as the parent of the resulting span. The resulting span is then set on the given `fctx`. This function is similar to tracer.StartSpanFromContext, but it modifies the given fasthttp context directly. If the ChildOf option is passed, it will only be used as the parent if there is no span found in `fctx`.
Types ¶
type HTTPHeadersCarrier ¶ added in v1.60.0
type HTTPHeadersCarrier struct {
ReqHeader *fasthttp.RequestHeader
}
HTTPHeadersCarrier implements tracer.TextMapWriter and tracer.TextMapReader on top of fasthttp's RequestHeader object, allowing it to be used as a span context carrier for distributed tracing.
func (*HTTPHeadersCarrier) ForeachKey ¶ added in v1.60.0
func (f *HTTPHeadersCarrier) ForeachKey(handler func(key, val string) error) error
ForeachKey iterates over fasthttp request header keys and values
func (*HTTPHeadersCarrier) Set ¶ added in v1.60.0
func (f *HTTPHeadersCarrier) Set(key, val string)
Set adds the given value to request header for key. Key will be lowercased to match the metadata implementation.