Documentation ¶
Overview ¶
Package txtimeoutview implements a view service that times out slow transactions and measures the log's latency.
Index ¶
- type View
- func (view *View) Profile(ctx context.Context, req *rpc.ProfileRequest) (*rpc.ProfileResult, error)
- func (view *View) SetLogLevel(ctx context.Context, req *rpc.LogLevelRequest) (*rpc.LogLevelResult, error)
- func (view *View) Start() error
- func (view *View) Stats(ctx context.Context, req *rpc.StatsRequest) (*rpc.StatsResult, error)
- func (view *View) UpdateStats(ctx context.Context, req *rpc.UpdateStatsRequest) (*rpc.UpdateStatsResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type View ¶
type View struct {
// contains filtered or unexported fields
}
View is an instance of the transaction timeout view
func New ¶
New returns a new View that implements the transaction timeout functionality. This watches the log for transactions that were started but not committed or aborted in a reasonable timeframe, and writes an abort entry to the log for them.
The given context is for the background activity of the view, not just for the call to New.
func (*View) Profile ¶
func (view *View) Profile(ctx context.Context, req *rpc.ProfileRequest) (*rpc.ProfileResult, error)
Profile will start CPU profiling the process, as described in the ProfileRequest. This is part of the implementation of the Diagnostics RPC service.
func (*View) SetLogLevel ¶
func (view *View) SetLogLevel(ctx context.Context, req *rpc.LogLevelRequest) (*rpc.LogLevelResult, error)
SetLogLevel will change the debug log level to the new level described in the request. The log level will remain at the provided setting until either another SetLogLevel request is processed or the process is restarted. This is part of the implementation of the Diagnostics RPC service.
func (*View) Start ¶
Start will start the gRPC server, and the monitoring the log, aborting relevant transactions
func (*View) Stats ¶
func (view *View) Stats(ctx context.Context, req *rpc.StatsRequest) (*rpc.StatsResult, error)
Stats returns the current values for the standard set of view statistics. This is part of the implementation of the Diagnostics RPC interface
func (*View) UpdateStats ¶
func (view *View) UpdateStats(ctx context.Context, req *rpc.UpdateStatsRequest) (*rpc.UpdateStatsResult, error)
UpdateStats is part of the implementation of the Diagnostics RPC API. For this view, we have no fact stats, so this is a no-op.
Directories ¶
Path | Synopsis |
---|---|
Command akutan-txview runs a TxTimeoutView daemon.
|
Command akutan-txview runs a TxTimeoutView daemon. |
Package logping measures the latency of Akutan's log by appending to it and reading from it.
|
Package logping measures the latency of Akutan's log by appending to it and reading from it. |
Package txtimer watches for slow transactions and aborts them.
|
Package txtimer watches for slow transactions and aborts them. |