Documentation ¶
Index ¶
- func InitDbMetrics(m metric.Meter)
- type DBSpanNameExtractor
- type DbClientAttrsExtractor
- func (d *DbClientAttrsExtractor[REQUEST, RESPONSE, GETTER]) GetSpanKey() attribute.Key
- func (d *DbClientAttrsExtractor[REQUEST, RESPONSE, GETTER]) OnEnd(attrs []attribute.KeyValue, context context.Context, request REQUEST, ...) ([]attribute.KeyValue, context.Context)
- func (d *DbClientAttrsExtractor[REQUEST, RESPONSE, GETTER]) OnStart(attrs []attribute.KeyValue, parentContext context.Context, request REQUEST) ([]attribute.KeyValue, context.Context)
- type DbClientAttrsGetter
- type DbClientCommonAttrsExtractor
- func (d *DbClientCommonAttrsExtractor[REQUEST, RESPONSE, GETTER]) GetSpanKey() attribute.Key
- func (d *DbClientCommonAttrsExtractor[REQUEST, RESPONSE, GETTER]) OnEnd(attrs []attribute.KeyValue, context context.Context, request REQUEST, ...) ([]attribute.KeyValue, context.Context)
- func (d *DbClientCommonAttrsExtractor[REQUEST, RESPONSE, GETTER]) OnStart(attributes []attribute.KeyValue, parentContext context.Context, ...) ([]attribute.KeyValue, context.Context)
- type DbClientCommonAttrsGetter
- type DbClientMetric
- func (h DbClientMetric) OnAfterEnd(context context.Context, endAttributes []attribute.KeyValue, endTime time.Time)
- func (h DbClientMetric) OnAfterStart(context context.Context, endTime time.Time)
- func (h DbClientMetric) OnBeforeEnd(ctx context.Context, startAttributes []attribute.KeyValue, startTime time.Time) context.Context
- func (h DbClientMetric) OnBeforeStart(parentContext context.Context, startTime time.Time) context.Context
- type DbExperimentalAttributesEnabler
- type SqlClientAttributesGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitDbMetrics ¶ added in v0.7.0
InitDbMetrics so we need to make sure the otel_setup is executed before all the init() function related to issue Dbs://github.com/alibaba/opentelemetry-go-auto-instrumentation/issues/48
Types ¶
type DBSpanNameExtractor ¶
type DBSpanNameExtractor[REQUEST any] struct { Getter DbClientAttrsGetter[REQUEST] }
func (*DBSpanNameExtractor[REQUEST]) Extract ¶
func (d *DBSpanNameExtractor[REQUEST]) Extract(request REQUEST) string
type DbClientAttrsExtractor ¶
type DbClientAttrsExtractor[REQUEST any, RESPONSE any, GETTER DbClientAttrsGetter[REQUEST]] struct { Base DbClientCommonAttrsExtractor[REQUEST, RESPONSE, GETTER] }
func (*DbClientAttrsExtractor[REQUEST, RESPONSE, GETTER]) GetSpanKey ¶
func (d *DbClientAttrsExtractor[REQUEST, RESPONSE, GETTER]) GetSpanKey() attribute.Key
type DbClientAttrsGetter ¶
type DbClientAttrsGetter[REQUEST any] interface { DbClientCommonAttrsGetter[REQUEST] GetStatement(REQUEST) string GetOperation(REQUEST) string GetParameters(REQUEST) []any }
type DbClientCommonAttrsExtractor ¶
type DbClientCommonAttrsExtractor[REQUEST any, RESPONSE any, GETTER DbClientCommonAttrsGetter[REQUEST]] struct { Getter GETTER AttributesFilter func(attrs []attribute.KeyValue) []attribute.KeyValue }
func (*DbClientCommonAttrsExtractor[REQUEST, RESPONSE, GETTER]) GetSpanKey ¶
func (d *DbClientCommonAttrsExtractor[REQUEST, RESPONSE, GETTER]) GetSpanKey() attribute.Key
type DbClientMetric ¶ added in v0.7.0
type DbClientMetric struct {
// contains filtered or unexported fields
}
func DbClientMetrics ¶ added in v0.7.0
func DbClientMetrics(key string) *DbClientMetric
func (DbClientMetric) OnAfterEnd ¶ added in v0.7.0
func (DbClientMetric) OnAfterStart ¶ added in v0.7.0
func (h DbClientMetric) OnAfterStart(context context.Context, endTime time.Time)
func (DbClientMetric) OnBeforeEnd ¶ added in v0.7.0
func (DbClientMetric) OnBeforeStart ¶ added in v0.7.0
type DbExperimentalAttributesEnabler ¶ added in v0.4.0
type DbExperimentalAttributesEnabler interface {
Enable() bool
}
type SqlClientAttributesGetter ¶
type SqlClientAttributesGetter[REQUEST any] interface { DbClientCommonAttrsGetter[REQUEST] GetRawStatement(REQUEST) string }
Click to show internal directories.
Click to hide internal directories.