Documentation ¶
Index ¶
- Variables
- func ErrorStack(msg interface{}, stack interface{}) []byte
- func GetInteractionError(opts []InteractionOption) (name error)
- func GetInteractionKind(opts []InteractionOption) (kind trace.SpanKind)
- func GetInteractionName(opts []InteractionOption) (name string)
- func GetInteractionRequest(opts []InteractionOption) (value *http.Request)
- func GetInteractionTypeType(opts []InteractionOption) (name string)
- func InteractionKindServerToString(kind trace.SpanKind) string
- func SetManual(man map[string]string) map[string]string
- type ContextSpan
- type DefaultLogSpanSave
- type DefaultMsgFormat
- type EncryptionProvider
- type ErrorDetails
- type Interaction
- type InteractionError
- type InteractionKind
- type InteractionName
- type InteractionOption
- type InteractionOptionType
- type InteractionRequest
- type InteractionTypeType
- type Jaeger
- type ModulesTraceId
- type Option
- type Provider
- type SpanKind
- type Tracing
- type TracingConfig
- type TracingConfigCli
- type TracingMessage
- type TracingProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultAllowLogging = []string{
"application/grpc",
"application/grpc-web",
"application/grpc-web-text",
"application/json",
"application/xml",
"application/rabbitmq",
"application/kafka",
}
View Source
var TracingConfigManual = map[string]string{
"tracing:jaeger:enable": `enable jaeger tracing`,
"tracing:jaeger:url": `like 10.10.10.10:6831`,
"tracing:jaeger:endpoint": `like http://10.10.10.10:14268/api/traces`,
}
Functions ¶
func ErrorStack ¶
func ErrorStack(msg interface{}, stack interface{}) []byte
func GetInteractionError ¶
func GetInteractionError(opts []InteractionOption) (name error)
func GetInteractionKind ¶
func GetInteractionKind(opts []InteractionOption) (kind trace.SpanKind)
func GetInteractionName ¶
func GetInteractionName(opts []InteractionOption) (name string)
func GetInteractionRequest ¶
func GetInteractionRequest(opts []InteractionOption) (value *http.Request)
func GetInteractionTypeType ¶
func GetInteractionTypeType(opts []InteractionOption) (name string)
Types ¶
type DefaultLogSpanSave ¶
type DefaultMsgFormat ¶
type EncryptionProvider ¶
type ErrorDetails ¶
type ErrorDetails struct { Msg interface{} `json:"msg"` Stack interface{} `json:"stack"` }
type Interaction ¶
type InteractionError ¶
type InteractionError struct {
// contains filtered or unexported fields
}
func (*InteractionError) Type ¶
func (c *InteractionError) Type() InteractionOptionType
func (*InteractionError) Value ¶
func (c *InteractionError) Value() interface{}
type InteractionKind ¶
type InteractionKind struct {
// contains filtered or unexported fields
}
func (*InteractionKind) Type ¶
func (c *InteractionKind) Type() InteractionOptionType
func (*InteractionKind) Value ¶
func (c *InteractionKind) Value() interface{}
type InteractionName ¶
type InteractionName struct {
// contains filtered or unexported fields
}
func (*InteractionName) Type ¶
func (c *InteractionName) Type() InteractionOptionType
func (*InteractionName) Value ¶
func (c *InteractionName) Value() interface{}
type InteractionOption ¶
type InteractionOption interface { Type() InteractionOptionType Value() interface{} }
func NewInteractionError ¶
func NewInteractionError(name error) InteractionOption
func NewInteractionKind ¶
func NewInteractionKind(kind SpanKind) InteractionOption
func NewInteractionName ¶
func NewInteractionName(name string) InteractionOption
func NewInteractionRequest ¶
func NewInteractionRequest(request *http.Request) InteractionOption
func NewInteractionTypeType ¶
func NewInteractionTypeType(name string) InteractionOption
type InteractionOptionType ¶
type InteractionOptionType int
const ( InteractionOptionTypeName InteractionOptionType = iota + 1 InteractionOptionTypeRequest InteractionOptionTypeType InteractionOptionTypeError InteractionOptionTypeKind )
type InteractionRequest ¶
type InteractionRequest struct {
// contains filtered or unexported fields
}
func (*InteractionRequest) Type ¶
func (c *InteractionRequest) Type() InteractionOptionType
func (*InteractionRequest) Value ¶
func (c *InteractionRequest) Value() interface{}
type InteractionTypeType ¶
type InteractionTypeType struct {
// contains filtered or unexported fields
}
func (*InteractionTypeType) Type ¶
func (c *InteractionTypeType) Type() InteractionOptionType
func (*InteractionTypeType) Value ¶
func (c *InteractionTypeType) Value() interface{}
type ModulesTraceId ¶
type Option ¶
type Option struct { Name string `yaml:"-" json:"-"` Config TracingConfig `yaml:"config" json:"config"` AllowLogging []string `yaml:"allowLogging" json:"allowLogging"` Logger interfaces.Logger `yaml:"-" json:"-"` IsValid func(string) bool `yaml:"-" json:"-"` PrintOperation bool `yaml:"printOperation" json:"printOperation"` Provider Provider `yaml:"-" json:"-"` EncryptSpanLog bool `yaml:"encryptSpanLog" json:"encryptSpanLog"` EncryptionProvider EncryptionProvider `yaml:"-" json:"-"` }
func ParsingConfigCli ¶
func ParsingConfigCli(logger interfaces.Logger, name string, opt TracingConfigCli) Option
type Tracing ¶
type Tracing interface { New() Tracing Init(Option) GetConfig() Option Closing() (err error) GetFormattedTraceID(ctx context.Context) (id string) InjectRootData(ctx context.Context, key string, data interface{}, opts ...InteractionOption) Operation(ctx context.Context, opts ...InteractionOption) Interaction GrpcOperation(ctx context.Context, metadata map[string]string, opts ...InteractionOption) Interaction }
Tracing modules interface, using for dynamic modules
type TracingConfig ¶
type TracingConfig struct {
Jaeger Jaeger `yaml:"jaeger" json:"jaeger"`
}
type TracingConfigCli ¶
type TracingMessage ¶
type TracingMessage struct {
SpanName string
}
type TracingProvider ¶
type TracingProvider interface { Setup() error Closing() error InjectRootData(ctx context.Context, key string, data interface{}, opts ...InteractionOption) Operation(ctx context.Context, opts ...InteractionOption) Interaction GetFormattedTraceID(ctx context.Context) (id string) }
Click to show internal directories.
Click to hide internal directories.