trace

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func NewStartTraceService

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

Types

type StartTraceProvider

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

func (*StartTraceProvider) Boot

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

Boot will called when the service instantiate

func (*StartTraceProvider) IsDefer

func (provider *StartTraceProvider) IsDefer() bool

IsDefer define whether the service instantiate when first make or register

func (*StartTraceProvider) Name

func (provider *StartTraceProvider) Name() string

/ Name define the name for this service

func (*StartTraceProvider) Params

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

Params define the necessary params for NewInstance

func (*StartTraceProvider) Register

Register registe a new function for make a service instance

type StartTraceService

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

func (*StartTraceService) ExtractHTTP

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

GetTrace By Http

func (*StartTraceService) GetTrace

GetTrace From trace context

func (*StartTraceService) InjectHTTP

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

Set Trace to Http

func (*StartTraceService) NewTrace

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

NewTrace generate a new trace

func (*StartTraceService) StartSpan

ChildSpan instance a sub trace with new span id

func (*StartTraceService) ToMap

func (*StartTraceService) 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