handler

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is a minimal implementation of the handler and client from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp for demonstration purposes. It handles an incoming http request, and makes an outgoing http request.

func New

func New(next func(r *http.Request)) *Handler

New returns a new Handler that will trace requests before handing them off to next.

func (*Handler) HandleHTTPReq

func (h *Handler) HandleHTTPReq(r *http.Request)

HandleHTTPReq mimics what an instrumented http server does.

Jump to

Keyboard shortcuts

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