b3

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpanExtractor

func SpanExtractor(req *http.Request) wtracing.SpanExtractor

SpanExtractor returns a SpanExtractor that returns a wtracing.SpanContext based on the header content of the provided *http.Request. If the values in the provided header do not constitute a valid SpanContext (for example, if it is missing a TraceID or SpanID, has an unsupported "Sampled" value, etc.), the "Err" field of the returned SpanContext will be non-nil and will contain an error that describes why the values were invalid. However, even if the "Err" field is set, all of the values that could be extracted from the header and set on the returned context.

func SpanInjector

func SpanInjector(req *http.Request) wtracing.SpanInjector

SpanInjector returns a SpanInjector that injects a wtracing.SpanContext in the header of the provided *http.Request. The injector will only set a TraceID and SpanID if both values are non-empty, and will also only set a ParentID if it is non-empty and the TraceID and SpanID are also non-empty. If the provided span is in debug mode, the flags header will be set, but the sampled header will not be. If the provided span is not in debug mode, then the sampled header will explicitly be set to "0" or "1".

Types

This section is empty.

Jump to

Keyboard shortcuts

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