Documentation ¶
Overview ¶
Package otelgorm instruments the github.com/gin-gonic/gin package.
Currently there are two ways the code can be instrumented. One is instrumenting the routing of a received message (the Middleware function) and instrumenting the response generation through template evaluation (the HTML function).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*config)
Option is used to configure the client.
func WithServiceName ¶
WithServiceName sets the service name.
func WithTracerProvider ¶
func WithTracerProvider(provider oteltrace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer. If none is specified, the global provider is used.
type OtelPlugin ¶
type OtelPlugin struct {
// contains filtered or unexported fields
}
func NewPlugin ¶
func NewPlugin(opts ...Option) *OtelPlugin
NewPlugin initialize a new gorm.DB plugin that traces queries You may pass optional Options to the function
func (*OtelPlugin) Initialize ¶
func (op *OtelPlugin) Initialize(db *gorm.DB) error
func (*OtelPlugin) Name ¶
func (op *OtelPlugin) Name() string
Click to show internal directories.
Click to hide internal directories.