Documentation ¶
Overview ¶
Package observe provides metric and tracing support for Go servers. It uses OpenTelemetry and the golang.org/x/exp/events package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Observer ¶
type Observer struct {
// contains filtered or unexported fields
}
An Observer handles tracing and metrics exporting.
func NewObserver ¶
NewObserver creates an Observer. The context is used to flush traces in AfterRequest, so it should be longer-lived than any request context. (We don't want to use the request context because we still want traces even if it is canceled or times out.)
Click to show internal directories.
Click to hide internal directories.