github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/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  	namespaceFollowerEngine    = "follower"
    18  	namespaceRestAPI           = "access_rest_api"
    19  	namespaceMachineAcct       = "machine_account"
    20  )
    21  
    22  // Network subsystems represent the various layers of networking.
    23  const (
    24  	subsystemLibp2p       = "libp2p"
    25  	subsystemGossip       = "gossip"
    26  	subsystemEngine       = "engine"
    27  	subsystemQueue        = "queue"
    28  	subsystemDHT          = "dht"
    29  	subsystemBitswap      = "bitswap"
    30  	subsystemAuth         = "authorization"
    31  	subsystemRateLimiting = "ratelimit"
    32  	subsystemAlsp         = "alsp"
    33  	subsystemSecurity     = "security"
    34  )
    35  
    36  // Storage subsystems represent the various components of the storage layer.
    37  const (
    38  	subsystemBadger  = "badger"
    39  	subsystemMempool = "mempool"
    40  	subsystemCache   = "cache"
    41  )
    42  
    43  // Access subsystem
    44  const (
    45  	subsystemTransactionTiming     = "transaction_timing"
    46  	subsystemTransactionSubmission = "transaction_submission"
    47  	subsystemConnectionPool        = "connection_pool"
    48  	subsystemHTTP                  = "http"
    49  )
    50  
    51  // Observer subsystem
    52  const (
    53  	subsystemObserverGRPC = "observer_grpc"
    54  )
    55  
    56  // Collection subsystem
    57  const (
    58  	subsystemProposal = "proposal"
    59  )
    60  
    61  // Consensus subsystems represent the different components of the consensus algorithm.
    62  const (
    63  	subsystemCompliance  = "compliance"
    64  	subsystemHotstuff    = "hotstuff"
    65  	subsystemCruiseCtl   = "cruisectl"
    66  	subsystemMatchEngine = "match"
    67  )
    68  
    69  // Execution Subsystems
    70  const (
    71  	subsystemStateStorage      = "state_storage"
    72  	subsystemMTrie             = "mtrie"
    73  	subsystemIngestion         = "ingestion"
    74  	subsystemRuntime           = "runtime"
    75  	subsystemProvider          = "provider"
    76  	subsystemBlockDataUploader = "block_data_uploader"
    77  )
    78  
    79  // Verification Subsystems
    80  const (
    81  	subsystemAssignerEngine  = "assigner"
    82  	subsystemFetcherEngine   = "fetcher"
    83  	subsystemRequesterEngine = "requester"
    84  	subsystemVerifierEngine  = "verifier"
    85  	subsystemBlockConsumer   = "block_consumer"
    86  	subsystemChunkConsumer   = "chunk_consumer"
    87  )
    88  
    89  // Execution Data Sync Subsystems
    90  const (
    91  	subsystemExeDataRequester       = "requester"
    92  	subsystemExeDataProvider        = "provider"
    93  	subsystemExeDataPruner          = "pruner"
    94  	subsystemExecutionDataRequester = "execution_data_requester"
    95  	subsystemExecutionStateIndexer  = "execution_state_indexer"
    96  	subsystemExeDataBlobstore       = "blobstore"
    97  )
    98  
    99  // module/synchronization core
   100  const (
   101  	subsystemSyncCore = "sync_core"
   102  )
   103  
   104  // METRIC NAMING GUIDELINES
   105  // Namespace:
   106  //   * If it's under a module, use the module name. eg: hotstuff, network, storage, mempool, interpreter, crypto
   107  //   * If it's a core metric from a node, use the node type. eg: consensus, verification, access
   108  // Subsystem:
   109  //   * Subsystem is optional if the entire namespace is small enough to not be segmented further.
   110  //   * Within the component, describe the part or function referred to.
   111  // Constant Labels:
   112  //    * node_role: [collection, consensus, execution, verification, access]
   113  //    * beta_metric: true