Documentation ¶
Index ¶
- Constants
- func AddBytesCount(operation string, layer digest.Digest, bytes int64)
- func AddImageOperationCount(operation string, image digest.Digest, count int32)
- func IncOperationCount(operation string, layer digest.Digest)
- func ListenForFuseFailure(ctx context.Context)
- func MeasureLatencyInMicroseconds(operation string, layer digest.Digest, start time.Time)
- func MeasureLatencyInMilliseconds(operation string, layer digest.Digest, start time.Time)
- func Register()
- func ReportFuseFailure(fuseOperation string, layerDigest digest.Digest)
Constants ¶
const ( // OperationLatencyKeyMilliseconds is the key for soci operation latency metrics in milliseconds. OperationLatencyKeyMilliseconds = "operation_duration_milliseconds" // OperationLatencyKeyMicroseconds is the key for soci operation latency metrics in microseconds. OperationLatencyKeyMicroseconds = "operation_duration_microseconds" // OperationCountKey is the key for soci operation count metrics. OperationCountKey = "operation_count" // BytesServedKey is the key for any metric related to counting bytes served as the part of specific operation. BytesServedKey = "bytes_served" // ImageOperationCountKey is the key for any metric related to operation count metric at the image level (as opposed to layer). ImageOperationCountKey = "image_operation_count_key" )
const ( // prometheus metrics Mount = "mount" RemoteRegistryGet = "remote_registry_get" NodeReaddir = "node_readdir" InitMetadataStore = "init_metadata_store" SynchronousRead = "synchronous_read" BackgroundFetch = "background_fetch" SynchronousReadCount = "synchronous_read_count" SynchronousReadRegistryFetchCount = "synchronous_read_remote_registry_fetch_count" // TODO revisit (wrong place) SynchronousBytesServed = "synchronous_bytes_served" // Global fuse failure state FuseFailureState = "fuse_failure_state" // fuse operation failure metrics FuseNodeGetattrFailureCount = "fuse_node_getattr_failure_count" FuseNodeListxattrFailureCount = "fuse_node_listxattr_failure_count" FuseNodeLookupFailureCount = "fuse_node_lookup_failure_count" FuseNodeOpenFailureCount = "fuse_node_open_failure_count" FuseNodeReaddirFailureCount = "fuse_node_readdir_failure_count" FuseFileReadFailureCount = "fuse_file_read_failure_count" FuseFileGetattrFailureCount = "fuse_file_getattr_failure_count" FuseWhiteoutGetattrFailureCount = "fuse_whiteout_getattr_failure_count" FuseUnknownFailureCount = "fuse_unknown_operation_failure_count" // TODO this metric is not available now. This needs to go down to BlobReader where the actuall http call is issued SynchronousBytesFetched = "synchronous_bytes_fetched" // Number of times the snapshotter falls back to use a normal overlay mount instead of mounting the layer as a FUSE mount. // Note that a layer not having a ztoc is NOT classified as an error, even though `fs.Mount` returns an error in that case. FuseMountFailureCount = "fuse_mount_failure_count" // Number of errors of span fetch by background fetcher BackgroundSpanFetchFailureCount = "background_span_fetch_failure_count" // Number of spans fetched by background fetcher BackgroundSpanFetchCount = "background_span_fetch_count" // Number of items in the work queue of background fetcher BackgroundFetchWorkQueueSize = "background_fetch_work_queue_size" )
Lists all metric labels.
Variables ¶
This section is empty.
Functions ¶
func AddBytesCount ¶
AddBytesCount wraps the labels attachment as well as calling Add into a single method.
func AddImageOperationCount ¶
AddImageOperationCount wraps the labels attachment as well as calling Add into a single method.
func IncOperationCount ¶
IncOperationCount wraps the labels attachment as well as calling Inc into a single method.
func ListenForFuseFailure ¶ added in v0.5.0
ListenForFuseFailure infinitely listens for any FUSE failure. If one occurs, it increments the `FuseFailureState` metric and sleeps for a time block. This should be run at an FS level in a separate routine so that it does not block the main thread.
func MeasureLatencyInMicroseconds ¶
MeasureLatencyInMicroseconds wraps the labels attachment as well as calling Observe into a single method. Right now we attach the operation and layer digest, so it's possible to see the breakdown for latency by operation and individual layers. If you want this to be layer agnostic, just pass the digest from empty string, e.g. layerDigest := digest.FromString("")
func MeasureLatencyInMilliseconds ¶
MeasureLatencyInMilliseconds wraps the labels attachment as well as calling Observe into a single method. Right now we attach the operation and layer digest, so it's possible to see the breakdown for latency by operation and individual layers. If you want this to be layer agnostic, just pass the digest from empty string, e.g. layerDigest := digest.FromString("")
func ReportFuseFailure ¶ added in v0.5.0
ReportFuseFailure increments the in memory Prometheus counter failure metric for the FUSE op as well as notifying the global FUSE failure listener that a failure occurred.
Types ¶
This section is empty.