cadence: go.uber.org/cadence/internal/common/metrics Index | Files

package metrics

import "go.uber.org/cadence/internal/common/metrics"

Index

Package Files

capturingStatsReporter.go constants.go scope.go service_wrapper.go

Constants

const (
    CadenceMetricsPrefix             = "cadence-"
    WorkflowStartCounter             = CadenceMetricsPrefix + "workflow-start"
    WorkflowCompletedCounter         = CadenceMetricsPrefix + "workflow-completed"
    WorkflowCanceledCounter          = CadenceMetricsPrefix + "workflow-canceled"
    WorkflowFailedCounter            = CadenceMetricsPrefix + "workflow-failed"
    WorkflowContinueAsNewCounter     = CadenceMetricsPrefix + "workflow-continue-as-new"
    WorkflowEndToEndLatency          = CadenceMetricsPrefix + "workflow-endtoend-latency" // measure workflow execution from start to close
    WorkflowGetHistoryCounter        = CadenceMetricsPrefix + "workflow-get-history-total"
    WorkflowGetHistoryFailedCounter  = CadenceMetricsPrefix + "workflow-get-history-failed"
    WorkflowGetHistorySucceedCounter = CadenceMetricsPrefix + "workflow-get-history-succeed"
    WorkflowGetHistoryLatency        = CadenceMetricsPrefix + "workflow-get-history-latency"
    WorkflowSignalWithStartCounter   = CadenceMetricsPrefix + "workflow-signal-with-start"
    DecisionTimeoutCounter           = CadenceMetricsPrefix + "decision-timeout"

    DecisionPollCounter                = CadenceMetricsPrefix + "decision-poll-total"
    DecisionPollFailedCounter          = CadenceMetricsPrefix + "decision-poll-failed"
    DecisionPollTransientFailedCounter = CadenceMetricsPrefix + "decision-poll-transient-failed"
    DecisionPollNoTaskCounter          = CadenceMetricsPrefix + "decision-poll-no-task"
    DecisionPollSucceedCounter         = CadenceMetricsPrefix + "decision-poll-succeed"
    DecisionPollLatency                = CadenceMetricsPrefix + "decision-poll-latency" // measure succeed poll request latency
    DecisionScheduledToStartLatency    = CadenceMetricsPrefix + "decision-scheduled-to-start-latency"
    DecisionExecutionFailedCounter     = CadenceMetricsPrefix + "decision-execution-failed"
    DecisionExecutionLatency           = CadenceMetricsPrefix + "decision-execution-latency"
    DecisionResponseFailedCounter      = CadenceMetricsPrefix + "decision-response-failed"
    DecisionResponseLatency            = CadenceMetricsPrefix + "decision-response-latency"
    DecisionTaskPanicCounter           = CadenceMetricsPrefix + "decision-task-panic"
    DecisionTaskCompletedCounter       = CadenceMetricsPrefix + "decision-task-completed"
    DecisionTaskForceCompleted         = CadenceMetricsPrefix + "decision-task-force-completed"

    ActivityPollCounter                = CadenceMetricsPrefix + "activity-poll-total"
    ActivityPollFailedCounter          = CadenceMetricsPrefix + "activity-poll-failed"
    ActivityPollTransientFailedCounter = CadenceMetricsPrefix + "activity-poll-transient-failed"
    ActivityPollNoTaskCounter          = CadenceMetricsPrefix + "activity-poll-no-task"
    ActivityPollSucceedCounter         = CadenceMetricsPrefix + "activity-poll-succeed"
    ActivityPollLatency                = CadenceMetricsPrefix + "activity-poll-latency"
    ActivityScheduledToStartLatency    = CadenceMetricsPrefix + "activity-scheduled-to-start-latency"
    ActivityExecutionFailedCounter     = CadenceMetricsPrefix + "activity-execution-failed"
    ActivityExecutionLatency           = CadenceMetricsPrefix + "activity-execution-latency"
    ActivityResponseLatency            = CadenceMetricsPrefix + "activity-response-latency"
    ActivityResponseFailedCounter      = CadenceMetricsPrefix + "activity-response-failed"
    ActivityEndToEndLatency            = CadenceMetricsPrefix + "activity-endtoend-latency"
    ActivityTaskPanicCounter           = CadenceMetricsPrefix + "activity-task-panic"
    ActivityTaskCompletedCounter       = CadenceMetricsPrefix + "activity-task-completed"
    ActivityTaskFailedCounter          = CadenceMetricsPrefix + "activity-task-failed"
    ActivityTaskCanceledCounter        = CadenceMetricsPrefix + "activity-task-canceled"
    ActivityTaskCompletedByIDCounter   = CadenceMetricsPrefix + "activity-task-completed-by-id"
    ActivityTaskFailedByIDCounter      = CadenceMetricsPrefix + "activity-task-failed-by-id"
    ActivityTaskCanceledByIDCounter    = CadenceMetricsPrefix + "activity-task-canceled-by-id"
    LocalActivityTotalCounter          = CadenceMetricsPrefix + "local-activity-total"
    LocalActivityTimeoutCounter        = CadenceMetricsPrefix + "local-activity-timeout"
    LocalActivityCanceledCounter       = CadenceMetricsPrefix + "local-activity-canceled"
    LocalActivityFailedCounter         = CadenceMetricsPrefix + "local-activity-failed"
    LocalActivityPanicCounter          = CadenceMetricsPrefix + "local-activity-panic"
    LocalActivityExecutionLatency      = CadenceMetricsPrefix + "local-activity-execution-latency"
    WorkerPanicCounter                 = CadenceMetricsPrefix + "worker-panic"

    UnhandledSignalsCounter = CadenceMetricsPrefix + "unhandled-signals"
    CorruptedSignalsCounter = CadenceMetricsPrefix + "corrupted-signals"

    WorkerStartCounter = CadenceMetricsPrefix + "worker-start"
    PollerStartCounter = CadenceMetricsPrefix + "poller-start"

    CadenceRequest        = CadenceMetricsPrefix + "request"
    CadenceError          = CadenceMetricsPrefix + "error"
    CadenceLatency        = CadenceMetricsPrefix + "latency"
    CadenceInvalidRequest = CadenceMetricsPrefix + "invalid-request"

    StickyCacheHit   = CadenceMetricsPrefix + "sticky-cache-hit"
    StickyCacheMiss  = CadenceMetricsPrefix + "sticky-cache-miss"
    StickyCacheEvict = CadenceMetricsPrefix + "sticky-cache-evict"
    StickyCacheStall = CadenceMetricsPrefix + "sticky-cache-stall"
    StickyCacheSize  = CadenceMetricsPrefix + "sticky-cache-size"

    NonDeterministicError = CadenceMetricsPrefix + "non-deterministic-error"
)

Workflow Creation metrics

func NewTaggedMetricsScope Uses

func NewTaggedMetricsScope() (*TaggedScope, io.Closer, *CapturingStatsReporter)

NewTaggedMetricsScope return NewTaggedMetricsScope

func NewWorkflowServiceWrapper Uses

func NewWorkflowServiceWrapper(service workflowserviceclient.Interface, scope tally.Scope) workflowserviceclient.Interface

NewWorkflowServiceWrapper creates a new wrapper to WorkflowService that will emit metrics for each service call.

func WrapScope Uses

func WrapScope(isReplay *bool, scope tally.Scope, clock Clock) tally.Scope

WrapScope wraps a scope and skip recording metrics when isReplay is true. This is designed to be used by only by workflowEnvironmentImpl so we suppress metrics while replaying history events. Parameter isReplay is a pointer to workflowEnvironmentImpl.isReplay which will be updated when replaying history events.

type CapturedCount Uses

type CapturedCount struct {
    // contains filtered or unexported fields
}

CapturedCount has associated name, tags and value

func (*CapturedCount) Name Uses

func (c *CapturedCount) Name() string

Name return the name of CapturedCount

func (*CapturedCount) Tags Uses

func (c *CapturedCount) Tags() map[string]string

Tags return CapturedCount tags

func (*CapturedCount) Value Uses

func (c *CapturedCount) Value() int64

Value return the value of CapturedCount

type CapturedGauge Uses

type CapturedGauge struct {
    // contains filtered or unexported fields
}

CapturedGauge has CapturedGauge name, tag and values

func (*CapturedGauge) Name Uses

func (c *CapturedGauge) Name() string

Name return the name of CapturedGauge

func (*CapturedGauge) Tags Uses

func (c *CapturedGauge) Tags() map[string]string

Tags return the tags of CapturedGauge

func (*CapturedGauge) Value Uses

func (c *CapturedGauge) Value() float64

Value return the value of CapturedGauge

type CapturedHistogramDurationSamples Uses

type CapturedHistogramDurationSamples struct {
    // contains filtered or unexported fields
}

CapturedHistogramDurationSamples has related information for CapturedHistogramDurationSamples

type CapturedHistogramValueSamples Uses

type CapturedHistogramValueSamples struct {
    // contains filtered or unexported fields
}

CapturedHistogramValueSamples has related information for CapturedHistogramValueSamples

type CapturedTimer Uses

type CapturedTimer struct {
    // contains filtered or unexported fields
}

CapturedTimer has related name , tags and value

func (*CapturedTimer) Name Uses

func (c *CapturedTimer) Name() string

Name return the name of CapturedTimer

func (*CapturedTimer) Tags Uses

func (c *CapturedTimer) Tags() map[string]string

Tags return the tag of CapturedTimer

func (*CapturedTimer) Value Uses

func (c *CapturedTimer) Value() time.Duration

Value return the value of CapturedTimer

type CapturingStatsReporter Uses

type CapturingStatsReporter struct {
    // contains filtered or unexported fields
}

CapturingStatsReporter is a reporter used by tests to capture the metric so we can verify our tests.

func NewMetricsScope Uses

func NewMetricsScope(isReplay *bool) (tally.Scope, io.Closer, *CapturingStatsReporter)

NewMetricsScope returns a new metric scope

func (*CapturingStatsReporter) Capabilities Uses

func (c *CapturingStatsReporter) Capabilities() tally.Capabilities

Capabilities return tally.Capabilities

func (*CapturingStatsReporter) Counts Uses

func (c *CapturingStatsReporter) Counts() []CapturedCount

Counts return Counts

func (*CapturingStatsReporter) Flush Uses

func (c *CapturingStatsReporter) Flush()

Flush will add one to flush

func (*CapturingStatsReporter) Gauges Uses

func (c *CapturingStatsReporter) Gauges() []CapturedGauge

Gauges return Gauges

func (*CapturingStatsReporter) HistogramDurationSamples Uses

func (c *CapturingStatsReporter) HistogramDurationSamples() []CapturedHistogramDurationSamples

HistogramDurationSamples return HistogramDurationSamples

func (*CapturingStatsReporter) HistogramValueSamples Uses

func (c *CapturingStatsReporter) HistogramValueSamples() []CapturedHistogramValueSamples

HistogramValueSamples return HistogramValueSamples

func (*CapturingStatsReporter) ReportCounter Uses

func (c *CapturingStatsReporter) ReportCounter(
    name string,
    tags map[string]string,
    value int64,
)

ReportCounter reports the counts

func (*CapturingStatsReporter) ReportGauge Uses

func (c *CapturingStatsReporter) ReportGauge(
    name string,
    tags map[string]string,
    value float64,
)

ReportGauge reports the gauges

func (*CapturingStatsReporter) ReportHistogramDurationSamples Uses

func (c *CapturingStatsReporter) ReportHistogramDurationSamples(
    name string,
    tags map[string]string,
    buckets tally.Buckets,
    bucketLowerBound,
    bucketUpperBound time.Duration,
    samples int64,
)

ReportHistogramDurationSamples reports ReportHistogramDurationSamples

func (*CapturingStatsReporter) ReportHistogramValueSamples Uses

func (c *CapturingStatsReporter) ReportHistogramValueSamples(
    name string,
    tags map[string]string,
    buckets tally.Buckets,
    bucketLowerBound,
    bucketUpperBound float64,
    samples int64,
)

ReportHistogramValueSamples reports histogramValueSamples

func (*CapturingStatsReporter) ReportTimer Uses

func (c *CapturingStatsReporter) ReportTimer(
    name string,
    tags map[string]string,
    value time.Duration,
)

ReportTimer reports timers

func (*CapturingStatsReporter) Reporting Uses

func (c *CapturingStatsReporter) Reporting() bool

Reporting will always return true

func (*CapturingStatsReporter) Tagging Uses

func (c *CapturingStatsReporter) Tagging() bool

Tagging will always return true

func (*CapturingStatsReporter) Timers Uses

func (c *CapturingStatsReporter) Timers() []CapturedTimer

Timers return Timers

type Clock Uses

type Clock interface {
    Now() time.Time
}

Clock defines interface used as time source

type TaggedScope Uses

type TaggedScope struct {
    tally.Scope
    *sync.Map
}

TaggedScope provides metricScope with tags

func NewTaggedScope Uses

func NewTaggedScope(scope tally.Scope) *TaggedScope

NewTaggedScope create a new TaggedScope

func (*TaggedScope) GetTaggedScope Uses

func (ts *TaggedScope) GetTaggedScope(keyValueinPairs ...string) tally.Scope

GetTaggedScope return a scope with one or multiple tags, input should be key value pairs like: GetTaggedScope(scope, tag1, val1, tag2, val2).

Package metrics imports 8 packages (graph) and is imported by 3 packages. Updated 2019-05-28. Refresh now. Tools for package owners.

The go get command cannot install this package because of the following issues: