package httptrace
import "go.opentelemetry.io/otel/instrumentation/httptrace"
Index ¶
- Variables
- func Extract(ctx context.Context, req *http.Request, opts ...Option) ([]kv.KeyValue, []kv.KeyValue, trace.SpanContext)
- func Inject(ctx context.Context, req *http.Request, opts ...Option)
- func NewClientTrace(ctx context.Context) *httptrace.ClientTrace
- func W3C(ctx context.Context, req *http.Request) (context.Context, *http.Request)
- type Option
Variables ¶
var ( HTTPStatus = kv.Key("http.status") HTTPHeaderMIME = kv.Key("http.mime") HTTPRemoteAddr = kv.Key("http.remote") HTTPLocalAddr = kv.Key("http.local") )
Functions ¶
func Extract ¶
func Extract(ctx context.Context, req *http.Request, opts ...Option) ([]kv.KeyValue, []kv.KeyValue, trace.SpanContext)
Returns the Attributes, Context Entries, and SpanContext that were encoded by Inject.
func Inject ¶
func NewClientTrace ¶
func NewClientTrace(ctx context.Context) *httptrace.ClientTrace
func W3C ¶
Client
Types ¶
type Option ¶
type Option func(*config)
Option is a function that allows configuration of the httptrace Extract() and Inject() functions
func WithPropagators ¶
func WithPropagators(props propagation.Propagators) Option
WithPropagators sets the propagators to use for Extraction and Injection
Source Files ¶
api.go clienttrace.go httptrace.go
- Version
- v0.8.0
- Published
- Jul 10, 2020
- Platform
- linux/amd64
- Imports
- 14 packages
- Last checked
- 1 minute ago –
Tools for package owners.