http

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransport

func NewTransport(opts ...Option) trace.TracerProvider

NewTransport should be used with go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.NewTransport. Also use TransportSpanNameFormatter with [otelhttp.WithSpanNameFormatter] for a better span name.

func TransportSpanNameFormatter

func TransportSpanNameFormatter(_ string, r *http.Request) string

TransportSpanNameFormatter should be used with [otelhttp.WithSpanNameFormatter] because the default formatter only outputs "HTTP <method>"

Types

type Option

type Option func(*options)

func WithOperationName

func WithOperationName(name string) Option

func WithTracerProvider

func WithTracerProvider(tracerProvider trace.TracerProvider) Option

Jump to

Keyboard shortcuts

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