metrics

package
v0.22.4 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TemporalMetricsPrefix            = "temporal_"
	WorkflowStartCounter             = TemporalMetricsPrefix + "workflow_start"
	WorkflowCompletedCounter         = TemporalMetricsPrefix + "workflow_completed"
	WorkflowCanceledCounter          = TemporalMetricsPrefix + "workflow_canceled"
	WorkflowFailedCounter            = TemporalMetricsPrefix + "workflow_failed"
	WorkflowContinueAsNewCounter     = TemporalMetricsPrefix + "workflow_continue_as_new"
	WorkflowEndToEndLatency          = TemporalMetricsPrefix + "workflow_endtoend_latency" // measure workflow execution from start to close
	WorkflowGetHistoryCounter        = TemporalMetricsPrefix + "workflow_get_history_total"
	WorkflowGetHistoryFailedCounter  = TemporalMetricsPrefix + "workflow_get_history_failed"
	WorkflowGetHistorySucceedCounter = TemporalMetricsPrefix + "workflow_get_history_succeed"
	WorkflowGetHistoryLatency        = TemporalMetricsPrefix + "workflow_get_history_latency"
	WorkflowSignalWithStartCounter   = TemporalMetricsPrefix + "workflow_signal_with_start"
	DecisionTimeoutCounter           = TemporalMetricsPrefix + "decision_timeout"

	DecisionPollCounter                = TemporalMetricsPrefix + "decision_poll_total"
	DecisionPollFailedCounter          = TemporalMetricsPrefix + "decision_poll_failed"
	DecisionPollTransientFailedCounter = TemporalMetricsPrefix + "decision_poll_transient_failed"
	DecisionPollNoTaskCounter          = TemporalMetricsPrefix + "decision_poll_no_task"
	DecisionPollSucceedCounter         = TemporalMetricsPrefix + "decision_poll_succeed"
	DecisionPollLatency                = TemporalMetricsPrefix + "decision_poll_latency" // measure succeed poll request latency
	DecisionScheduledToStartLatency    = TemporalMetricsPrefix + "decision_scheduled_to_start_latency"
	DecisionExecutionFailedCounter     = TemporalMetricsPrefix + "decision_execution_failed"
	DecisionExecutionLatency           = TemporalMetricsPrefix + "decision_execution_latency"
	DecisionResponseFailedCounter      = TemporalMetricsPrefix + "decision_response_failed"
	DecisionResponseLatency            = TemporalMetricsPrefix + "decision_response_latency"
	DecisionTaskPanicCounter           = TemporalMetricsPrefix + "decision_task_panic"
	DecisionTaskCompletedCounter       = TemporalMetricsPrefix + "decision_task_completed"
	DecisionTaskForceCompleted         = TemporalMetricsPrefix + "decision_task_force_completed"

	ActivityPollCounter                = TemporalMetricsPrefix + "activity_poll_total"
	ActivityPollFailedCounter          = TemporalMetricsPrefix + "activity_poll_failed"
	ActivityPollTransientFailedCounter = TemporalMetricsPrefix + "activity_poll_transient_failed"
	ActivityPollNoTaskCounter          = TemporalMetricsPrefix + "activity_poll_no_task"
	ActivityPollSucceedCounter         = TemporalMetricsPrefix + "activity_poll_succeed"
	ActivityPollLatency                = TemporalMetricsPrefix + "activity_poll_latency"
	ActivityScheduledToStartLatency    = TemporalMetricsPrefix + "activity_scheduled_to_start_latency"
	ActivityExecutionFailedCounter     = TemporalMetricsPrefix + "activity_execution_failed"
	ActivityExecutionLatency           = TemporalMetricsPrefix + "activity_execution_latency"
	ActivityResponseLatency            = TemporalMetricsPrefix + "activity_response_latency"
	ActivityResponseFailedCounter      = TemporalMetricsPrefix + "activity_response_failed"
	ActivityEndToEndLatency            = TemporalMetricsPrefix + "activity_endtoend_latency"
	ActivityTaskPanicCounter           = TemporalMetricsPrefix + "activity_task_panic"
	ActivityTaskCompletedCounter       = TemporalMetricsPrefix + "activity_task_completed"
	ActivityTaskFailedCounter          = TemporalMetricsPrefix + "activity_task_failed"
	ActivityTaskCanceledCounter        = TemporalMetricsPrefix + "activity_task_canceled"
	ActivityTaskCompletedByIDCounter   = TemporalMetricsPrefix + "activity_task_completed_by_id"
	ActivityTaskFailedByIDCounter      = TemporalMetricsPrefix + "activity_task_failed_by_id"
	ActivityTaskCanceledByIDCounter    = TemporalMetricsPrefix + "activity_task_canceled_by_id"
	LocalActivityTotalCounter          = TemporalMetricsPrefix + "local_activity_total"
	LocalActivityTimeoutCounter        = TemporalMetricsPrefix + "local_activity_timeout"
	LocalActivityCanceledCounter       = TemporalMetricsPrefix + "local_activity_canceled"
	LocalActivityFailedCounter         = TemporalMetricsPrefix + "local_activity_failed"
	LocalActivityPanicCounter          = TemporalMetricsPrefix + "local_activity_panic"
	LocalActivityExecutionLatency      = TemporalMetricsPrefix + "local_activity_execution_latency"
	WorkerPanicCounter                 = TemporalMetricsPrefix + "worker_panic"

	UnhandledSignalsCounter = TemporalMetricsPrefix + "unhandled_signals"
	CorruptedSignalsCounter = TemporalMetricsPrefix + "corrupted_signals"

	WorkerStartCounter = TemporalMetricsPrefix + "worker_start"
	PollerStartCounter = TemporalMetricsPrefix + "poller_start"

	TemporalRequest        = TemporalMetricsPrefix + "request"
	TemporalError          = TemporalMetricsPrefix + "error"
	TemporalLatency        = TemporalMetricsPrefix + "latency"
	TemporalInvalidRequest = TemporalMetricsPrefix + "invalid_request"

	StickyCacheHit   = TemporalMetricsPrefix + "sticky_cache_hit"
	StickyCacheMiss  = TemporalMetricsPrefix + "sticky_cache_miss"
	StickyCacheEvict = TemporalMetricsPrefix + "sticky_cache_evict"
	StickyCacheStall = TemporalMetricsPrefix + "sticky_cache_stall"
	StickyCacheSize  = TemporalMetricsPrefix + "sticky_cache_size"

	NonDeterministicError = TemporalMetricsPrefix + "non_deterministic_error"
)

Workflow Creation metrics

Variables

This section is empty.

Functions

func NewScopeInterceptor added in v0.10.13

func NewScopeInterceptor(scope tally.Scope) grpc.UnaryClientInterceptor

NewScopeInterceptor creates new metrics scope interceptor.

func NewTaggedMetricsScope added in v0.7.1

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

NewTaggedMetricsScope return NewTaggedMetricsScope

func WrapScope

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.

Types

type CapturedCount added in v0.7.1

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

CapturedCount has associated name, tags and value

func (*CapturedCount) Name added in v0.7.1

func (c *CapturedCount) Name() string

Name return the name of CapturedCount

func (*CapturedCount) Tags added in v0.7.1

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

Tags return CapturedCount tags

func (*CapturedCount) Value added in v0.7.1

func (c *CapturedCount) Value() int64

Value return the value of CapturedCount

type CapturedGauge added in v0.7.1

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

CapturedGauge has CapturedGauge name, tag and values

func (*CapturedGauge) Name added in v0.7.1

func (c *CapturedGauge) Name() string

Name return the name of CapturedGauge

func (*CapturedGauge) Tags added in v0.7.1

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

Tags return the tags of CapturedGauge

func (*CapturedGauge) Value added in v0.7.1

func (c *CapturedGauge) Value() float64

Value return the value of CapturedGauge

type CapturedHistogramDurationSamples added in v0.7.1

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

CapturedHistogramDurationSamples has related information for CapturedHistogramDurationSamples

type CapturedHistogramValueSamples added in v0.7.1

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

CapturedHistogramValueSamples has related information for CapturedHistogramValueSamples

type CapturedTimer added in v0.7.1

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

CapturedTimer has related name , tags and value

func (*CapturedTimer) Name added in v0.7.1

func (c *CapturedTimer) Name() string

Name return the name of CapturedTimer

func (*CapturedTimer) Tags added in v0.7.1

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

Tags return the tag of CapturedTimer

func (*CapturedTimer) Value added in v0.7.1

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

Value return the value of CapturedTimer

type CapturingStatsReporter added in v0.7.1

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 added in v0.7.1

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

NewMetricsScope returns a new metric scope

func (*CapturingStatsReporter) Capabilities added in v0.7.1

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

Capabilities return tally.Capabilities

func (*CapturingStatsReporter) Counts added in v0.7.1

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

Counts return Counts

func (*CapturingStatsReporter) Flush added in v0.7.1

func (c *CapturingStatsReporter) Flush()

Flush will add one to flush

func (*CapturingStatsReporter) Gauges added in v0.7.1

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

Gauges return Gauges

func (*CapturingStatsReporter) HistogramDurationSamples added in v0.7.1

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

HistogramDurationSamples return HistogramDurationSamples

func (*CapturingStatsReporter) HistogramValueSamples added in v0.7.1

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

HistogramValueSamples return HistogramValueSamples

func (*CapturingStatsReporter) ReportCounter added in v0.7.1

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

ReportCounter reports the counts

func (*CapturingStatsReporter) ReportGauge added in v0.7.1

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

ReportGauge reports the gauges

func (*CapturingStatsReporter) ReportHistogramDurationSamples added in v0.7.1

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

ReportHistogramDurationSamples reports ReportHistogramDurationSamples

func (*CapturingStatsReporter) ReportHistogramValueSamples added in v0.7.1

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

ReportHistogramValueSamples reports histogramValueSamples

func (*CapturingStatsReporter) ReportTimer added in v0.7.1

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

ReportTimer reports timers

func (*CapturingStatsReporter) Reporting added in v0.7.1

func (c *CapturingStatsReporter) Reporting() bool

Reporting will always return true

func (*CapturingStatsReporter) Tagging added in v0.7.1

func (c *CapturingStatsReporter) Tagging() bool

Tagging will always return true

func (*CapturingStatsReporter) Timers added in v0.7.1

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

Timers return Timers

type Clock

type Clock interface {
	Now() time.Time
}

Clock defines interface used as time source

type TaggedScope added in v0.7.1

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

TaggedScope provides metricScope with tags

func NewTaggedScope added in v0.7.1

func NewTaggedScope(scope tally.Scope) *TaggedScope

NewTaggedScope create a new TaggedScope

func (*TaggedScope) GetTaggedScope added in v0.7.1

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL