Documentation ¶
Index ¶
- func New(opts ...ApplyOption) gorm.Plugin
- type ApplyOption
- func WithCreateOpName(name operationName) ApplyOption
- func WithDeleteOpName(name operationName) ApplyOption
- func WithErrorTagHook(errorTagHook errorTagHook) ApplyOption
- func WithInjectFilter(injectFilter func(db *gorm.DB) bool) ApplyOption
- func WithLogResult(logResult bool) ApplyOption
- func WithQueryOpName(name operationName) ApplyOption
- func WithRawOpName(name operationName) ApplyOption
- func WithRowOpName(name operationName) ApplyOption
- func WithSqlParameters(logSqlParameters bool) ApplyOption
- func WithTracer(tracer opentracing.Tracer) ApplyOption
- func WithUpdateOpName(name operationName) ApplyOption
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 WithCreateOpName ¶
func WithCreateOpName(name operationName) ApplyOption
func WithDeleteOpName ¶
func WithDeleteOpName(name operationName) ApplyOption
func WithErrorTagHook ¶
func WithErrorTagHook(errorTagHook errorTagHook) ApplyOption
func WithInjectFilter ¶
func WithInjectFilter(injectFilter func(db *gorm.DB) bool) ApplyOption
func WithLogResult ¶
func WithLogResult(logResult bool) ApplyOption
WithLogResult enable opentracingPlugin to log the result of each executed sql.
func WithQueryOpName ¶
func WithQueryOpName(name operationName) ApplyOption
func WithRawOpName ¶
func WithRawOpName(name operationName) ApplyOption
func WithRowOpName ¶
func WithRowOpName(name operationName) ApplyOption
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.
func WithUpdateOpName ¶
func WithUpdateOpName(name operationName) ApplyOption
Click to show internal directories.
Click to hide internal directories.