Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(opts ...ApplyOption) gorm.Plugin
New constructs a new plugin based opentracing. It supports to trace all operations in gorm, so if you have already traced your servers, now this plugin will perfect your tracing job.
Types ¶
type ApplyOption ¶
type ApplyOption func(o *options)
func WithErrorTagHook ¶
func WithErrorTagHook(errorTagHook errorTagHook) ApplyOption
func WithLogResult ¶
func WithLogResult(logResult bool) ApplyOption
WithLogResult enable opentracingPlugin to log the result of each executed sql.
func WithSqlParameters ¶
func WithSqlParameters(logSqlParameters bool) ApplyOption
func WithTracer ¶
func WithTracer(tracer opentracing.Tracer) ApplyOption
WithTracer allows to use customized tracer rather than the global one only.
Click to show internal directories.
Click to hide internal directories.