Documentation
¶
Index ¶
- type DBInstrumentation
- func (i *DBInstrumentation) CreateTask(ctx context.Context, title string) (ret1 *example.Task, err error)
- func (i *DBInstrumentation) DeleteTask(ctx context.Context, id int64) (err error)
- func (i *DBInstrumentation) GenerateError(ctx context.Context) (err error)
- func (i *DBInstrumentation) ListTasks(ctx context.Context) (ret1 []*example.Task, err error)
- type ServiceInstrumentation
- func (i *ServiceInstrumentation) CreateTask(ctx context.Context, title string) (ret1 *example.Task, err error)
- func (i *ServiceInstrumentation) DeleteTask(ctx context.Context, id int64) (err error)
- func (i *ServiceInstrumentation) GenerateError(ctx context.Context) (err error)
- func (i *ServiceInstrumentation) ListTasks(ctx context.Context) (ret1 []*example.Task, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBInstrumentation ¶
type DBInstrumentation struct {
// contains filtered or unexported fields
}
DBInstrumentation wraps example.DB with OpenTelemetry instrumentation.
func NewDBInstrumentation ¶
func NewDBInstrumentation( impl example.DB, tracerProvider trace.TracerProvider, meterProvider metric.MeterProvider, ) (*DBInstrumentation, error)
NewDBInstrumentation creates a new instrumented wrapper.
func (*DBInstrumentation) CreateTask ¶
func (i *DBInstrumentation) CreateTask(ctx context.Context, title string) (ret1 *example.Task, err error)
CreateTask adds instrumentation and delegates to the underlying implementation.
func (*DBInstrumentation) DeleteTask ¶
func (i *DBInstrumentation) DeleteTask(ctx context.Context, id int64) (err error)
DeleteTask adds instrumentation and delegates to the underlying implementation.
func (*DBInstrumentation) GenerateError ¶
func (i *DBInstrumentation) GenerateError(ctx context.Context) (err error)
GenerateError adds instrumentation and delegates to the underlying implementation.
type ServiceInstrumentation ¶
type ServiceInstrumentation struct {
// contains filtered or unexported fields
}
ServiceInstrumentation wraps example.Service with OpenTelemetry instrumentation.
func NewServiceInstrumentation ¶
func NewServiceInstrumentation( impl example.Service, tracerProvider trace.TracerProvider, meterProvider metric.MeterProvider, ) (*ServiceInstrumentation, error)
NewServiceInstrumentation creates a new instrumented wrapper.
func (*ServiceInstrumentation) CreateTask ¶
func (i *ServiceInstrumentation) CreateTask(ctx context.Context, title string) (ret1 *example.Task, err error)
CreateTask adds instrumentation and delegates to the underlying implementation.
func (*ServiceInstrumentation) DeleteTask ¶
func (i *ServiceInstrumentation) DeleteTask(ctx context.Context, id int64) (err error)
DeleteTask adds instrumentation and delegates to the underlying implementation.
func (*ServiceInstrumentation) GenerateError ¶
func (i *ServiceInstrumentation) GenerateError(ctx context.Context) (err error)
GenerateError adds instrumentation and delegates to the underlying implementation.