ppbeego

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package ppbeego instruments the beego/v2 package (https://github.com/beego/beego).

This package instruments inbound requests handled by a beego instance. Register the ServerFilterChain as the filter chain of the router to trace all handlers:

web.InsertFilterChain("/*", ppbeego.ServerFilterChain())

This package instruments outbound requests and add distributed tracing headers. Add the ClientFilterChain as the filter chain of the request:

req := httplib.Get("http://localhost:9090/")
req.AddFilters(ppbeego.ClientFilterChain(tracer))

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientFilterChain added in v1.3.0

func ClientFilterChain(tracer pinpoint.Tracer) func(httplib.Filter) httplib.Filter

ClientFilterChain returns filter function that will trace the outgoing requests.

func DoRequest

func DoRequest(tracer pinpoint.Tracer, req *httplib.BeegoHTTPRequest) (resp *http.Response, err error)

DoRequest is deprecated. Use ClientFilterChain.

func Middleware

func Middleware() func(http.Handler) http.Handler

Middleware is deprecated. Use ServerFilterChain.

func ServerFilterChain added in v1.3.0

func ServerFilterChain() func(web.FilterFunc) web.FilterFunc

ServerFilterChain returns filter function that will trace the incoming requests.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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