github.com/koko1123/flow-go-1@v0.29.6/module/metrics/namespaces.go (about) 1 package metrics 2 3 // Prometheus metric namespaces 4 const ( 5 namespaceNetwork = "network" 6 namespaceStorage = "storage" 7 namespaceAccess = "access" 8 namespaceObserver = "observer" 9 namespaceCollection = "collection" 10 namespaceConsensus = "consensus" 11 namespaceVerification = "verification" 12 namespaceExecution = "execution" 13 namespaceLoader = "loader" 14 namespaceStateSync = "state_synchronization" 15 namespaceExecutionDataSync = "execution_data_sync" 16 namespaceChainsync = "chainsync" 17 ) 18 19 // Network subsystems represent the various layers of networking. 20 const ( 21 subsystemLibp2p = "libp2p" 22 subsystemGossip = "gossip" 23 subsystemEngine = "engine" 24 subsystemQueue = "queue" 25 subsystemDHT = "dht" 26 subsystemBitswap = "bitswap" 27 subsystemAuth = "authorization" 28 subsystemRateLimiting = "ratelimit" 29 ) 30 31 // Storage subsystems represent the various components of the storage layer. 32 const ( 33 subsystemBadger = "badger" 34 subsystemMempool = "mempool" 35 subsystemCache = "cache" 36 ) 37 38 // Access subsystem 39 const ( 40 subsystemTransactionTiming = "transaction_timing" 41 subsystemTransactionSubmission = "transaction_submission" 42 subsystemConnectionPool = "connection_pool" 43 ) 44 45 // Observer subsystem 46 const ( 47 subsystemObserverGRPC = "observer_grpc" 48 ) 49 50 // Collection subsystem 51 const ( 52 subsystemProposal = "proposal" 53 ) 54 55 // Consensus subsystems represent the different components of the consensus algorithm. 56 const ( 57 subsystemCompliance = "compliance" 58 subsystemHotstuff = "hotstuff" 59 subsystemMatchEngine = "match" 60 ) 61 62 // Execution Subsystems 63 const ( 64 subsystemStateStorage = "state_storage" 65 subsystemMTrie = "mtrie" 66 subsystemIngestion = "ingestion" 67 subsystemRuntime = "runtime" 68 subsystemProvider = "provider" 69 subsystemBlockDataUploader = "block_data_uploader" 70 ) 71 72 // Verification Subsystems 73 const ( 74 subsystemAssignerEngine = "assigner" 75 subsystemFetcherEngine = "fetcher" 76 subsystemRequesterEngine = "requester" 77 subsystemVerifierEngine = "verifier" 78 subsystemBlockConsumer = "block_consumer" 79 subsystemChunkConsumer = "chunk_consumer" 80 ) 81 82 // Execution Data Sync Subsystems 83 const ( 84 subsystemExeDataRequester = "requester" 85 subsystemExeDataProvider = "provider" 86 subsystemExeDataPruner = "pruner" 87 subsystemExecutionDataRequester = "execution_data_requester" 88 subsystemExeDataBlobstore = "blobstore" 89 ) 90 91 // module/synchronization core 92 const ( 93 subsystemSyncCore = "sync_core" 94 ) 95 96 // METRIC NAMING GUIDELINES 97 // Namespace: 98 // * If it's under a module, use the module name. eg: hotstuff, network, storage, mempool, interpreter, crypto 99 // * If it's a core metric from a node, use the node type. eg: consensus, verification, access 100 // Subsystem: 101 // * Subsystem is optional if the entire namespace is small enough to not be segmented further. 102 // * Within the component, describe the part or function referred to. 103 // Constant Labels: 104 // * node_role: [collection, consensus, execution, verification, access] 105 // * beta_metric: true