Documentation
¶
Overview ¶
Package debug implements debug server for satellite, storage node, and edge services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Error = errs.Class("debug")
Error is default error class for debug package.
var Top eventstat.Registry
Top is a specific registry exposed over the /top endpoint. can be used to publish any high-cardinality event on local HTTP.
Functions ¶
func ApplyNewTransformers ¶
func ApplyNewTransformers(r *monkit.Registry) *monkit.Registry
ApplyNewTransformers adds the default set of monkit.CallbackTransformers. This needs to happen individually for each output type and endpoint.
Types ¶
type ButtonGroup ¶
ButtonGroup contains description of a collection of buttons.
type Config ¶
type Config struct { Addr string `help:"address to listen on for debug endpoints" default:"127.0.0.1:0"` ControlTitle string `hidden:"true"` Control bool `releaseDefault:"false" devDefault:"true" hidden:"true"` Crawlspace bool `help:"if true, enable crawlspace on debug port" default:"false" hidden:"true"` }
Config defines configuration for debug server.
type Endpoint ¶
type Endpoint struct { pb.DRPCDebugUnimplementedServer Auth func(ctx context.Context) error // contains filtered or unexported fields }
Endpoint implements a remote debug server.
func NewEndpoint ¶
NewEndpoint constructs a RemoteDebugEndpoint that will consult the given auth function with the request context to determine if the request is authorized.
func (*Endpoint) CollectRuntimeTraces ¶
func (f *Endpoint) CollectRuntimeTraces(_ *pb.CollectRuntimeTracesRequest, stream pb.DRPCDebug_CollectRuntimeTracesStream) error
CollectRuntimeTraces will stream trace data to the client until the client cancels the request either explicitly or some error happens in sending.
func (*Endpoint) CollectRuntimeTraces2 ¶
func (f *Endpoint) CollectRuntimeTraces2(stream pb.DRPCDebug_CollectRuntimeTraces2Stream) error
CollectRuntimeTraces2 will stream trace data to the client until the client sends a done message some error happens, and it then flushes the trace data and captured packet data.
type Extension ¶
type Extension interface { // Description is a display name for the UI. Description() string // Path is the unique HTTP path fragment. Path() string // Handler is the HTTP handler for the path. Handler(http.ResponseWriter, *http.Request) }
Extension is a custom endpoint, added to the debug endpoint.
type Panel ¶
type Panel struct {
// contains filtered or unexported fields
}
Panel implements a serving of customized callbacks.
func (*Panel) Add ¶
func (panel *Panel) Add(cats ...*ButtonGroup)
Add adds a button group to the panel.
type PrometheusEndpoint ¶
type PrometheusEndpoint struct {
// contains filtered or unexported fields
}
PrometheusEndpoint includes all the information to server Prometheus compatible HTTP pages.
func NewPrometheusEndpoint ¶
func NewPrometheusEndpoint(registry *monkit.Registry) *PrometheusEndpoint
NewPrometheusEndpoint creates an initialized PrometheusEndpoint.
func (*PrometheusEndpoint) PrometheusMetrics ¶
func (server *PrometheusEndpoint) PrometheusMetrics(w http.ResponseWriter, r *http.Request)
PrometheusMetrics writes monkit data in https://prometheus.io/docs/instrumenting/exposition_formats/.
type Server ¶
type Server struct { Panel *Panel PrometheusEndpoint *PrometheusEndpoint // contains filtered or unexported fields }
Server provides endpoints for debugging.
func NewServer ¶
func NewServer(log *zap.Logger, listener net.Listener, registry *monkit.Registry, config Config, extensions ...Extension) *Server
NewServer returns a new debug.Server.
func NewServerWithAtomicLevel ¶
func NewServerWithAtomicLevel(log *zap.Logger, listener net.Listener, registry *monkit.Registry, config Config, atomicLevel *zap.AtomicLevel, extensions ...Extension) *Server
NewServerWithAtomicLevel returns a new debug.Server with logging endpoint enabled.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package crawlspace adds a way for other packages to inject values into crawlspace sessions.
|
Package crawlspace adds a way for other packages to inject values into crawlspace sessions. |