txtimeoutview

package
Version: v0.0.0-...-6719cd2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package txtimeoutview implements a view service that times out slow transactions and measures the log's latency.

Index

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

func New(backgroundCtx context.Context, cfg *config.Akutan) (*View, error)

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

func (view *View) Start() error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL