Documentation ¶
Index ¶
- Constants
- func ConvertTraceIDToDatadogFormat(id string) string
- func GetContentType(ctx context.Context, request *http.Request) (contentType string)
- func GetID(ctx context.Context) (id string, haveParent bool)
- func NewLib() interfaces.Tracing
- func NewOpenTelemetryOperation(env, serviceName string, ctx context.Context, option interfaces.Option, ...) interfaces.Interaction
- type Datadog
- func (c *Datadog) Closing() (err error)
- func (c *Datadog) GetFormattedTraceID(ctx context.Context) (id string)
- func (c *Datadog) InjectRootData(ctx context.Context, key string, data interface{}, ...)
- func (c *Datadog) Log(msg string)
- func (c *Datadog) Operation(ctx context.Context, opts ...interfaces.InteractionOption) interfaces.Interaction
- func (c *Datadog) SetDefaultLogs(span *OpenTelemetryOperation, skip int)
- func (c *Datadog) Setup() (err error)
- type HttpRequestInterceptor
- type Jaeger
- func (c *Jaeger) Closing() (err error)
- func (c *Jaeger) GetFormattedTraceID(ctx context.Context) (id string)
- func (c *Jaeger) InjectRootData(ctx context.Context, key string, data interface{}, ...)
- func (c *Jaeger) Operation(ctx context.Context, opts ...interfaces.InteractionOption) interfaces.Interaction
- func (c *Jaeger) Setup() (err error)
- type Modules
- func (c *Modules) Closing() (err error)
- func (c *Modules) GetConfig() interfaces.Option
- func (c *Modules) GetFormattedTraceID(ctx context.Context) (id string)
- func (c *Modules) GrpcOperation(ctx context.Context, m map[string]string, opts ...interfaces.InteractionOption) interfaces.Interaction
- func (c *Modules) Init(option interfaces.Option)
- func (c *Modules) InjectRootData(ctx context.Context, key string, data interface{}, ...)
- func (c *Modules) New() interfaces.Tracing
- func (c *Modules) Operation(ctx context.Context, opts ...interfaces.InteractionOption) interfaces.Interaction
- type OpenTelemetryOperation
- func (c *OpenTelemetryOperation) Error(err error)
- func (c *OpenTelemetryOperation) Fatal()
- func (c *OpenTelemetryOperation) Finish()
- func (c *OpenTelemetryOperation) IncomingContext() context.Context
- func (c *OpenTelemetryOperation) OutgoingContext() context.Context
- func (c *OpenTelemetryOperation) Save(request *http.Request)
- func (c *OpenTelemetryOperation) SetDefaultLogs(skip int)
- func (c *OpenTelemetryOperation) SetLog(key string, val interface{})
- func (c *OpenTelemetryOperation) SetTagBool(key string, value bool)
- func (c *OpenTelemetryOperation) SetTagInt(key string, value int)
- func (c *OpenTelemetryOperation) SetTagString(key, value string)
- func (c *OpenTelemetryOperation) StatusOK(des string)
- type Operation
- func (c *Operation) Error(err error)
- func (c *Operation) Fatal()
- func (c *Operation) Finish()
- func (c *Operation) IncomingContext() context.Context
- func (c *Operation) OutgoingContext() context.Context
- func (c *Operation) SetLog(name string, data interface{})
- func (c *Operation) SetTagBool(key string, value bool)
- func (c *Operation) SetTagInt(key string, value int)
- func (c *Operation) SetTagString(key, value string)
- func (c *Operation) StatusOK(data string)
- type Storages
Constants ¶
View Source
const MaxSpanSize = 1000 * 50
Variables ¶
This section is empty.
Functions ¶
func GetContentType ¶
func NewLib ¶
func NewLib() interfaces.Tracing
func NewOpenTelemetryOperation ¶
func NewOpenTelemetryOperation(env, serviceName string, ctx context.Context, option interfaces.Option, storage *Storages, pbr propagation.TextMapPropagator, tracer trace.Tracer, opts ...interfaces.InteractionOption) interfaces.Interaction
Types ¶
type Datadog ¶
type Datadog struct {
// contains filtered or unexported fields
}
func NewDatadog ¶
func NewDatadog(option interfaces.Option) *Datadog
func (*Datadog) GetFormattedTraceID ¶
func (*Datadog) InjectRootData ¶
func (c *Datadog) InjectRootData(ctx context.Context, key string, data interface{}, opts ...interfaces.InteractionOption)
func (*Datadog) Operation ¶
func (c *Datadog) Operation(ctx context.Context, opts ...interfaces.InteractionOption) interfaces.Interaction
func (*Datadog) SetDefaultLogs ¶
func (c *Datadog) SetDefaultLogs(span *OpenTelemetryOperation, skip int)
type HttpRequestInterceptor ¶
type HttpRequestInterceptor struct {
// contains filtered or unexported fields
}
HttpRequestInterceptor for logging jaeger request
func NewHttpRequestInterceptor ¶
func NewHttpRequestInterceptor(log loggerInterfaces.Logger, core http.RoundTripper) HttpRequestInterceptor
type Jaeger ¶
type Jaeger struct {
// contains filtered or unexported fields
}
func NewJaeger ¶
func NewJaeger(option interfaces.Option) *Jaeger
func (*Jaeger) GetFormattedTraceID ¶
func (*Jaeger) InjectRootData ¶
func (c *Jaeger) InjectRootData(ctx context.Context, key string, data interface{}, opts ...interfaces.InteractionOption)
func (*Jaeger) Operation ¶
func (c *Jaeger) Operation(ctx context.Context, opts ...interfaces.InteractionOption) interfaces.Interaction
type Modules ¶
type Modules struct { Option interfaces.Option // contains filtered or unexported fields }
func (*Modules) GetConfig ¶
func (c *Modules) GetConfig() interfaces.Option
func (*Modules) GetFormattedTraceID ¶
func (*Modules) GrpcOperation ¶
func (c *Modules) GrpcOperation(ctx context.Context, m map[string]string, opts ...interfaces.InteractionOption) interfaces.Interaction
func (*Modules) Init ¶
func (c *Modules) Init(option interfaces.Option)
func (*Modules) InjectRootData ¶
func (c *Modules) InjectRootData(ctx context.Context, key string, data interface{}, opts ...interfaces.InteractionOption)
func (*Modules) New ¶
func (c *Modules) New() interfaces.Tracing
func (*Modules) Operation ¶
func (c *Modules) Operation(ctx context.Context, opts ...interfaces.InteractionOption) interfaces.Interaction
type OpenTelemetryOperation ¶
type OpenTelemetryOperation struct {
// contains filtered or unexported fields
}
func (*OpenTelemetryOperation) Error ¶
func (c *OpenTelemetryOperation) Error(err error)
func (*OpenTelemetryOperation) Fatal ¶
func (c *OpenTelemetryOperation) Fatal()
func (*OpenTelemetryOperation) Finish ¶
func (c *OpenTelemetryOperation) Finish()
func (*OpenTelemetryOperation) IncomingContext ¶
func (c *OpenTelemetryOperation) IncomingContext() context.Context
func (*OpenTelemetryOperation) OutgoingContext ¶
func (c *OpenTelemetryOperation) OutgoingContext() context.Context
func (*OpenTelemetryOperation) Save ¶
func (c *OpenTelemetryOperation) Save(request *http.Request)
func (*OpenTelemetryOperation) SetDefaultLogs ¶
func (c *OpenTelemetryOperation) SetDefaultLogs(skip int)
func (*OpenTelemetryOperation) SetLog ¶
func (c *OpenTelemetryOperation) SetLog(key string, val interface{})
func (*OpenTelemetryOperation) SetTagBool ¶
func (c *OpenTelemetryOperation) SetTagBool(key string, value bool)
func (*OpenTelemetryOperation) SetTagInt ¶
func (c *OpenTelemetryOperation) SetTagInt(key string, value int)
func (*OpenTelemetryOperation) SetTagString ¶
func (c *OpenTelemetryOperation) SetTagString(key, value string)
func (*OpenTelemetryOperation) StatusOK ¶
func (c *OpenTelemetryOperation) StatusOK(des string)
type Operation ¶
type Operation struct {
// contains filtered or unexported fields
}
Operation - default operation is empty
func (*Operation) IncomingContext ¶
func (*Operation) OutgoingContext ¶
func (*Operation) SetTagBool ¶
func (*Operation) SetTagString ¶
type Storages ¶
func NewStorages ¶
func NewStorages() *Storages
Click to show internal directories.
Click to hide internal directories.