tally: github.com/uber-go/tally/instrument Index | Files

package instrument

import "github.com/uber-go/tally/instrument"


Package Files

call.go types.go

type Call Uses

type Call interface {
    // Exec executes a function and records whether it succeeded or
    // failed, and the amount of time that it took.
    Exec(f ExecFn) error

Call allows tracking the successes, errors, and timing of functions.

func NewCall Uses

func NewCall(scope tally.Scope, name string) Call

NewCall returns a Call that instruments a function using a given scope and a label to name the metrics. The following counters are created excluding {{ and }}: {{name}}+result_type=success {{name}}+result_type=error The following timers are created excluding {{ and }} and replacing . with the scope's separator: {{name}}.latency

type ExecFn Uses

type ExecFn func() error

ExecFn is an executable function that can be instrumented with a Call.

Package instrument imports 1 packages (graph). Updated 2020-02-03. Refresh now. Tools for package owners.