Documentation
¶
Index ¶
- Variables
- func NewJaegerTraceProvider(serviceName, agentEndpoint string, sampleRatio float64) (*tracesdk.TracerProvider, error)
- func RecordCount(ctx context.Context, m *stats.Int64Measure, count int)
- func RecordDec(ctx context.Context, m *stats.Int64Measure)
- func RecordInc(ctx context.Context, m *stats.Int64Measure)
- func SinceInMilliseconds(startTime time.Time) float64
- func Timer(ctx context.Context, m *stats.Float64Measure) func()
- func WithTagValue(ctx context.Context, k tag.Key, v string) context.Context
Constants ¶
This section is empty.
Variables ¶
View Source
var (
TaskType, _ = tag.NewKey("task") // name of task processor
Job, _ = tag.NewKey("job") // name of job
Name, _ = tag.NewKey("name") // name of running instance of visor
Table, _ = tag.NewKey("table") // name of table data is persisted for
ConnState, _ = tag.NewKey("conn_state")
API, _ = tag.NewKey("api") // name of method on lotus api
ActorCode, _ = tag.NewKey("actor_code") // human readable code of actor being processed
)
View Source
var ( ProcessingDuration = stats.Float64("processing_duration_ms", "Time taken to process a task", stats.UnitMilliseconds) StateExtractionDuration = stats.Float64("state_extraction_duration_ms", "Time taken to extract an actor state", stats.UnitMilliseconds) PersistDuration = stats.Float64("persist_duration_ms", "Duration of a models persist operation", stats.UnitMilliseconds) PersistModel = stats.Int64("persist_model", "Number of models persisted", stats.UnitDimensionless) DBConns = stats.Int64("db_conns", "Database connections held", stats.UnitDimensionless) LensRequestDuration = stats.Float64("lens_request_duration_ms", "Duration of lotus api requets", stats.UnitMilliseconds) TipsetHeight = stats.Int64("tipset_height", "The height of the tipset being processed by a task", stats.UnitDimensionless) ProcessingFailure = stats.Int64("processing_failure", "Number of processing failures", stats.UnitDimensionless) PersistFailure = stats.Int64("persist_failure", "Number of persistence failures", stats.UnitDimensionless) WatchHeight = stats.Int64("watch_height", "The height of the tipset last seen by the watch command", stats.UnitDimensionless) TipSetSkip = stats.Int64("tipset_skip", "Number of tipsets that were not processed. This is is an indication that lily cannot keep up with chain.", stats.UnitDimensionless) JobStart = stats.Int64("job_start", "Number of jobs started", stats.UnitDimensionless) JobComplete = stats.Int64("job_complete", "Number of jobs completed without error", stats.UnitDimensionless) JobError = stats.Int64("job_error", "Number of jobs stopped due to a fatal error", stats.UnitDimensionless) JobTimeout = stats.Int64("job_timeout", "Number of jobs stopped due to taking longer than expected", stats.UnitDimensionless) TipSetCacheSize = stats.Int64("tipset_cache_size", "Configured size of the tipset cache (aka confidence).", stats.UnitDimensionless) TipSetCacheDepth = stats.Int64("tipset_cache_depth", "Number of tipsets currently in the tipset cache.", stats.UnitDimensionless) TipSetCacheEmptyRevert = stats.Int64("tipset_cache_empty_revert", "Number of revert operations performed on an empty tipset cache. This is an indication that a chain reorg is underway that is deeper than the cache size and includes tipsets that have already been read from the cache.", stats.UnitDimensionless) WatcherActiveWorkers = stats.Int64("watcher_active_workers", "Current number of watcher observers executing", stats.UnitDimensionless) WatcherWaitingWorkers = stats.Int64("watcher_waiting_workers", "Current number of watcher observers waiting to execute", stats.UnitDimensionless) )
View Source
var DefaultViews = []*view.View{ { Measure: ProcessingDuration, Aggregation: defaultMillisecondsDistribution, TagKeys: []tag.Key{TaskType}, }, { Measure: StateExtractionDuration, Aggregation: defaultMillisecondsDistribution, TagKeys: []tag.Key{TaskType, ActorCode}, }, { Measure: PersistDuration, Aggregation: defaultMillisecondsDistribution, TagKeys: []tag.Key{TaskType, Table, ActorCode}, }, { Measure: DBConns, Aggregation: view.Count(), TagKeys: []tag.Key{ConnState}, }, { Measure: LensRequestDuration, Aggregation: defaultMillisecondsDistribution, TagKeys: []tag.Key{TaskType, API, ActorCode}, }, { Name: "lens_request_total", Measure: LensRequestDuration, Aggregation: view.Count(), TagKeys: []tag.Key{TaskType, API, ActorCode}, }, { Measure: TipsetHeight, Aggregation: view.LastValue(), TagKeys: []tag.Key{TaskType}, }, { Name: ProcessingFailure.Name() + "_total", Measure: ProcessingFailure, Aggregation: view.Count(), TagKeys: []tag.Key{TaskType, ActorCode}, }, { Name: PersistFailure.Name() + "_total", Measure: PersistFailure, Aggregation: view.Count(), TagKeys: []tag.Key{TaskType, Table, ActorCode}, }, { Measure: WatchHeight, Aggregation: view.LastValue(), TagKeys: []tag.Key{Job}, }, { Name: TipSetSkip.Name() + "_total", Measure: TipSetSkip, Aggregation: view.Sum(), TagKeys: []tag.Key{Job}, }, { Name: JobStart.Name() + "_total", Measure: JobStart, Aggregation: view.Count(), TagKeys: []tag.Key{Job}, }, { Name: JobComplete.Name() + "_total", Measure: JobComplete, Aggregation: view.Count(), TagKeys: []tag.Key{Job}, }, { Name: JobError.Name() + "_total", Measure: JobError, Aggregation: view.Count(), TagKeys: []tag.Key{Job}, }, { Name: JobTimeout.Name() + "_total", Measure: JobTimeout, Aggregation: view.Count(), TagKeys: []tag.Key{Job}, }, { Name: PersistModel.Name() + "_total", Measure: PersistModel, Aggregation: view.Count(), TagKeys: []tag.Key{TaskType, Table}, }, { Measure: TipSetCacheSize, Aggregation: view.LastValue(), TagKeys: []tag.Key{Job}, }, { Measure: TipSetCacheDepth, Aggregation: view.LastValue(), TagKeys: []tag.Key{Job}, }, { Name: TipSetCacheEmptyRevert.Name() + "_total", Measure: TipSetCacheEmptyRevert, Aggregation: view.Sum(), TagKeys: []tag.Key{Job}, }, { Measure: WatcherActiveWorkers, Aggregation: view.LastValue(), TagKeys: []tag.Key{Job}, }, { Measure: WatcherWaitingWorkers, Aggregation: view.LastValue(), TagKeys: []tag.Key{Job}, }, }
Functions ¶
func NewJaegerTraceProvider ¶ added in v0.8.6
func NewJaegerTraceProvider(serviceName, agentEndpoint string, sampleRatio float64) (*tracesdk.TracerProvider, error)
NewJaegerTraceProvider returns a new and configured TracerProvider backed by Jaeger.
func RecordCount ¶
func RecordCount(ctx context.Context, m *stats.Int64Measure, count int)
RecordCount is a convenience function that increments a counter by a count.
func RecordDec ¶ added in v0.8.2
func RecordDec(ctx context.Context, m *stats.Int64Measure)
RecordDec is a convenience function that decrements a counter.
func RecordInc ¶
func RecordInc(ctx context.Context, m *stats.Int64Measure)
RecordInc is a convenience function that increments a counter.
func SinceInMilliseconds ¶
SinceInMilliseconds returns the duration of time since the provide time as a float64.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.