Documentation
¶
Index ¶
- Variables
- func Init(config Config)
- type Config
- type Content
- type HttpClientHook
- type Option
- func WithAttributes(attrs ...attribute.KeyValue) Option
- func WithDBName(name string) Option
- func WithFormattedQueries(format bool) Option
- func WithMeterProvider(mp metric.MeterProvider) Option
- func WithSpanNameFormatter(f func(*bun.QueryEvent) string) Option
- func WithTracerProvider(tp trace.TracerProvider) Option
- type QueryHook
- type TracingHook
- func (TracingHook) AfterProcess(ctx context.Context, cmd redis.Cmder) error
- func (TracingHook) AfterProcessPipeline(ctx context.Context, cmds []redis.Cmder) error
- func (TracingHook) BeforeProcess(ctx context.Context, cmd redis.Cmder) (context.Context, error)
- func (TracingHook) BeforeProcessPipeline(ctx context.Context, cmds []redis.Cmder) (context.Context, error)
- type WebInterceptor
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClient *client
Functions ¶
Types ¶
type HttpClientHook ¶
type HttpClientHook struct {
}
func NewHttpClientHook ¶
func NewHttpClientHook() *HttpClientHook
func (*HttpClientHook) AfterRequest ¶
func (*HttpClientHook) BeforeRequest ¶
type Option ¶
type Option func(h *QueryHook)
func WithAttributes ¶
WithAttributes configures attributes that are used to create a span.
func WithFormattedQueries ¶
WithFormattedQueries enables formatting of the query that is added as the statement attribute to the trace. This means that all placeholders and arguments will be filled first and the query will contain all information as sent to the database.
func WithMeterProvider ¶
func WithMeterProvider(mp metric.MeterProvider) Option
WithMeterProvider returns an Option to use the MeterProvider when creating a Meter.
func WithSpanNameFormatter ¶
func WithSpanNameFormatter(f func(*bun.QueryEvent) string) Option
WithSpanNameFormatter takes a function that determines the span name for a given query event.
func WithTracerProvider ¶
func WithTracerProvider(tp trace.TracerProvider) Option
WithTracerProvider returns an Option to use the TracerProvider when creating a Tracer.
type QueryHook ¶
type QueryHook struct {
// contains filtered or unexported fields
}
func NewQueryHook ¶
func (*QueryHook) AfterQuery ¶
func (h *QueryHook) AfterQuery(ctx context.Context, event *bun.QueryEvent)
func (*QueryHook) BeforeQuery ¶
type TracingHook ¶
type TracingHook struct{}
func NewTracingHook ¶
func NewTracingHook() *TracingHook
func (TracingHook) AfterProcess ¶
func (TracingHook) AfterProcessPipeline ¶
func (TracingHook) BeforeProcess ¶
func (TracingHook) BeforeProcessPipeline ¶
type WebInterceptor ¶
type WebInterceptor struct {
}
func NewWebInterceptor ¶
func NewWebInterceptor() *WebInterceptor
Click to show internal directories.
Click to hide internal directories.