trace

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: MIT Imports: 6 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContextKey = TraceKey("trace-key")

Functions

func NewHadeTraceService

func NewHadeTraceService(params ...interface{}) (interface{}, error)

Types

type HadeTraceProvider

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

func (*HadeTraceProvider) Boot

func (provider *HadeTraceProvider) Boot(c framework.Container) error

Boot will called when the service instantiate

func (*HadeTraceProvider) IsDefer

func (provider *HadeTraceProvider) IsDefer() bool

IsDefer define whether the service instantiate when first make or register

func (*HadeTraceProvider) Name

func (provider *HadeTraceProvider) Name() string

/ Name define the name for this service

func (*HadeTraceProvider) Params

func (provider *HadeTraceProvider) Params(c framework.Container) []interface{}

Params define the necessary params for NewInstance

func (*HadeTraceProvider) Register

Register registe a new function for make a service instance

type HadeTraceService

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

func (*HadeTraceService) ExtractHTTP

func (t *HadeTraceService) ExtractHTTP(req *http.Request) *contract.TraceContext

GetTrace By Http

func (*HadeTraceService) GetTrace

GetTrace From trace context

func (*HadeTraceService) InjectHTTP

func (t *HadeTraceService) InjectHTTP(req *http.Request, tc *contract.TraceContext) *http.Request

Set Trace to Http

func (*HadeTraceService) NewTrace

func (t *HadeTraceService) NewTrace() *contract.TraceContext

NewTrace generate a new trace

func (*HadeTraceService) StartSpan

ChildSpan instance a sub trace with new span id

func (*HadeTraceService) ToMap

func (*HadeTraceService) WithTrace

WithTrace register new trace to context

type TraceKey

type TraceKey string

Jump to

Keyboard shortcuts

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