package httptrace

import "go.opentelemetry.io/otel/instrumentation/httptrace"

Index

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 Inject(ctx context.Context, req *http.Request, opts ...Option)

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.9.0
Published
Jul 20, 2020
Platform
linux/amd64
Imports
14 packages
Last checked
6 minutes ago

Tools for package owners.