Documentation
¶
Index ¶
- func Hook(opts ...Option) contexts.Hook
- func SemVersion() string
- func Version() string
- func WrapEngine(e *xorm.Engine, opts ...Option)
- func WrapEngineGroup(eg *xorm.EngineGroup, opts ...Option)
- type OpenTelemetryHook
- type Option
- func WithAfterHook(fn func(c *contexts.ContextHook)) Option
- func WithBeforeHookHook(fn func(c *contexts.ContextHook)) Option
- func WithDBName(name string) Option
- func WithDBSystem(system string) Option
- func WithFormatSQL(formatSQL func(sql string, args []interface{}) string) Option
- func WithFormatSQLReplace() Option
- func WithSpanName(name string) Option
- func WithTracerProvider(provider trace.TracerProvider) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SemVersion ¶
func SemVersion() string
SemVersion is the semantic version to be supplied to tracer/meter creation.
func Version ¶
func Version() string
Version is the current release version of the xorm instrumentation.
func WrapEngine ¶
func WrapEngineGroup ¶
func WrapEngineGroup(eg *xorm.EngineGroup, opts ...Option)
Types ¶
type OpenTelemetryHook ¶
type OpenTelemetryHook struct {
// contains filtered or unexported fields
}
func (*OpenTelemetryHook) AfterProcess ¶
func (h *OpenTelemetryHook) AfterProcess(c *contexts.ContextHook) error
func (*OpenTelemetryHook) BeforeProcess ¶
func (h *OpenTelemetryHook) BeforeProcess(c *contexts.ContextHook) (context.Context, error)
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option specifies instrumentation configuration options.
func WithAfterHook ¶
func WithAfterHook(fn func(c *contexts.ContextHook)) Option
func WithBeforeHookHook ¶
func WithBeforeHookHook(fn func(c *contexts.ContextHook)) Option
func WithDBSystem ¶
WithDBSystem configures a db.system attribute. You should prefer using WithAttributes and semconv, for example, `otelsql.WithAttributes(semconv.DBSystemSqlite)`.
func WithFormatSQL ¶
func WithFormatSQLReplace ¶
func WithFormatSQLReplace() Option
func WithSpanName ¶ added in v1.0.7
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider with tracer provider.
Click to show internal directories.
Click to hide internal directories.