github.com/KYVENetwork/cometbft/v38@v38.0.3/config/toml.go (about) 1 package config 2 3 import ( 4 "bytes" 5 "path/filepath" 6 "strings" 7 "text/template" 8 9 cmtos "github.com/KYVENetwork/cometbft/v38/libs/os" 10 ) 11 12 // DefaultDirPerm is the default permissions used when creating directories. 13 const DefaultDirPerm = 0700 14 15 var configTemplate *template.Template 16 17 func init() { 18 var err error 19 tmpl := template.New("configFileTemplate").Funcs(template.FuncMap{ 20 "StringsJoin": strings.Join, 21 }) 22 if configTemplate, err = tmpl.Parse(defaultConfigTemplate); err != nil { 23 panic(err) 24 } 25 } 26 27 /****** these are for production settings ***********/ 28 29 // EnsureRoot creates the root, config, and data directories if they don't exist, 30 // and panics if it fails. 31 func EnsureRoot(rootDir string) { 32 if err := cmtos.EnsureDir(rootDir, DefaultDirPerm); err != nil { 33 panic(err.Error()) 34 } 35 if err := cmtos.EnsureDir(filepath.Join(rootDir, DefaultConfigDir), DefaultDirPerm); err != nil { 36 panic(err.Error()) 37 } 38 if err := cmtos.EnsureDir(filepath.Join(rootDir, DefaultDataDir), DefaultDirPerm); err != nil { 39 panic(err.Error()) 40 } 41 42 configFilePath := filepath.Join(rootDir, defaultConfigFilePath) 43 44 // Write default config file if missing. 45 if !cmtos.FileExists(configFilePath) { 46 writeDefaultConfigFile(configFilePath) 47 } 48 } 49 50 // XXX: this func should probably be called by cmd/cometbft/commands/init.go 51 // alongside the writing of the genesis.json and priv_validator.json 52 func writeDefaultConfigFile(configFilePath string) { 53 WriteConfigFile(configFilePath, DefaultConfig()) 54 } 55 56 // WriteConfigFile renders config using the template and writes it to configFilePath. 57 func WriteConfigFile(configFilePath string, config *Config) { 58 var buffer bytes.Buffer 59 60 if err := configTemplate.Execute(&buffer, config); err != nil { 61 panic(err) 62 } 63 64 cmtos.MustWriteFile(configFilePath, buffer.Bytes(), 0644) 65 } 66 67 // Note: any changes to the comments/variables/mapstructure 68 // must be reflected in the appropriate struct in config/config.go 69 const defaultConfigTemplate = `# This is a TOML config file. 70 # For more information, see https://github.com/toml-lang/toml 71 72 # NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or 73 # relative to the home directory (e.g. "data"). The home directory is 74 # "$HOME/.cometbft" by default, but could be changed via $CMTHOME env variable 75 # or --home cmd flag. 76 77 # The version of the CometBFT binary that created or 78 # last modified the config file. Do not modify this. 79 version = "{{ .BaseConfig.Version }}" 80 81 ####################################################################### 82 ### Main Base Config Options ### 83 ####################################################################### 84 85 # TCP or UNIX socket address of the ABCI application, 86 # or the name of an ABCI application compiled in with the CometBFT binary 87 proxy_app = "{{ .BaseConfig.ProxyApp }}" 88 89 # A custom human readable name for this node 90 moniker = "{{ .BaseConfig.Moniker }}" 91 92 # Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb 93 # * goleveldb (github.com/syndtr/goleveldb - most popular implementation) 94 # - pure go 95 # - stable 96 # * cleveldb (uses levigo wrapper) 97 # - fast 98 # - requires gcc 99 # - use cleveldb build tag (go build -tags cleveldb) 100 # * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) 101 # - EXPERIMENTAL 102 # - may be faster is some use-cases (random reads - indexer) 103 # - use boltdb build tag (go build -tags boltdb) 104 # * rocksdb (uses github.com/tecbot/gorocksdb) 105 # - EXPERIMENTAL 106 # - requires gcc 107 # - use rocksdb build tag (go build -tags rocksdb) 108 # * badgerdb (uses github.com/dgraph-io/badger) 109 # - EXPERIMENTAL 110 # - use badgerdb build tag (go build -tags badgerdb) 111 db_backend = "{{ .BaseConfig.DBBackend }}" 112 113 # Database directory 114 db_dir = "{{ js .BaseConfig.DBPath }}" 115 116 # Output level for logging, including package level options 117 log_level = "{{ .BaseConfig.LogLevel }}" 118 119 # Output format: 'plain' (colored text) or 'json' 120 log_format = "{{ .BaseConfig.LogFormat }}" 121 122 ##### additional base config options ##### 123 124 # Path to the JSON file containing the initial validator set and other meta data 125 genesis_file = "{{ js .BaseConfig.Genesis }}" 126 127 # Path to the JSON file containing the private key to use as a validator in the consensus protocol 128 priv_validator_key_file = "{{ js .BaseConfig.PrivValidatorKey }}" 129 130 # Path to the JSON file containing the last sign state of a validator 131 priv_validator_state_file = "{{ js .BaseConfig.PrivValidatorState }}" 132 133 # TCP or UNIX socket address for CometBFT to listen on for 134 # connections from an external PrivValidator process 135 priv_validator_laddr = "{{ .BaseConfig.PrivValidatorListenAddr }}" 136 137 # Path to the JSON file containing the private key to use for node authentication in the p2p protocol 138 node_key_file = "{{ js .BaseConfig.NodeKey }}" 139 140 # Mechanism to connect to the ABCI application: socket | grpc 141 abci = "{{ .BaseConfig.ABCI }}" 142 143 # If true, query the ABCI app on connecting to a new peer 144 # so the app can decide if we should keep the connection or not 145 filter_peers = {{ .BaseConfig.FilterPeers }} 146 147 148 ####################################################################### 149 ### Advanced Configuration Options ### 150 ####################################################################### 151 152 ####################################################### 153 ### RPC Server Configuration Options ### 154 ####################################################### 155 [rpc] 156 157 # TCP or UNIX socket address for the RPC server to listen on 158 laddr = "{{ .RPC.ListenAddress }}" 159 160 # A list of origins a cross-domain request can be executed from 161 # Default value '[]' disables cors support 162 # Use '["*"]' to allow any origin 163 cors_allowed_origins = [{{ range .RPC.CORSAllowedOrigins }}{{ printf "%q, " . }}{{end}}] 164 165 # A list of methods the client is allowed to use with cross-domain requests 166 cors_allowed_methods = [{{ range .RPC.CORSAllowedMethods }}{{ printf "%q, " . }}{{end}}] 167 168 # A list of non simple headers the client is allowed to use with cross-domain requests 169 cors_allowed_headers = [{{ range .RPC.CORSAllowedHeaders }}{{ printf "%q, " . }}{{end}}] 170 171 # TCP or UNIX socket address for the gRPC server to listen on 172 # NOTE: This server only supports /broadcast_tx_commit 173 grpc_laddr = "{{ .RPC.GRPCListenAddress }}" 174 175 # Maximum number of simultaneous connections. 176 # Does not include RPC (HTTP&WebSocket) connections. See max_open_connections 177 # If you want to accept a larger number than the default, make sure 178 # you increase your OS limits. 179 # 0 - unlimited. 180 # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} 181 # 1024 - 40 - 10 - 50 = 924 = ~900 182 grpc_max_open_connections = {{ .RPC.GRPCMaxOpenConnections }} 183 184 # Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool 185 unsafe = {{ .RPC.Unsafe }} 186 187 # Maximum number of simultaneous connections (including WebSocket). 188 # Does not include gRPC connections. See grpc_max_open_connections 189 # If you want to accept a larger number than the default, make sure 190 # you increase your OS limits. 191 # 0 - unlimited. 192 # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} 193 # 1024 - 40 - 10 - 50 = 924 = ~900 194 max_open_connections = {{ .RPC.MaxOpenConnections }} 195 196 # Maximum number of unique clientIDs that can /subscribe 197 # If you're using /broadcast_tx_commit, set to the estimated maximum number 198 # of broadcast_tx_commit calls per block. 199 max_subscription_clients = {{ .RPC.MaxSubscriptionClients }} 200 201 # Maximum number of unique queries a given client can /subscribe to 202 # If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to 203 # the estimated # maximum number of broadcast_tx_commit calls per block. 204 max_subscriptions_per_client = {{ .RPC.MaxSubscriptionsPerClient }} 205 206 # Experimental parameter to specify the maximum number of events a node will 207 # buffer, per subscription, before returning an error and closing the 208 # subscription. Must be set to at least 100, but higher values will accommodate 209 # higher event throughput rates (and will use more memory). 210 experimental_subscription_buffer_size = {{ .RPC.SubscriptionBufferSize }} 211 212 # Experimental parameter to specify the maximum number of RPC responses that 213 # can be buffered per WebSocket client. If clients cannot read from the 214 # WebSocket endpoint fast enough, they will be disconnected, so increasing this 215 # parameter may reduce the chances of them being disconnected (but will cause 216 # the node to use more memory). 217 # 218 # Must be at least the same as "experimental_subscription_buffer_size", 219 # otherwise connections could be dropped unnecessarily. This value should 220 # ideally be somewhat higher than "experimental_subscription_buffer_size" to 221 # accommodate non-subscription-related RPC responses. 222 experimental_websocket_write_buffer_size = {{ .RPC.WebSocketWriteBufferSize }} 223 224 # If a WebSocket client cannot read fast enough, at present we may 225 # silently drop events instead of generating an error or disconnecting the 226 # client. 227 # 228 # Enabling this experimental parameter will cause the WebSocket connection to 229 # be closed instead if it cannot read fast enough, allowing for greater 230 # predictability in subscription behavior. 231 experimental_close_on_slow_client = {{ .RPC.CloseOnSlowClient }} 232 233 # How long to wait for a tx to be committed during /broadcast_tx_commit. 234 # WARNING: Using a value larger than 10s will result in increasing the 235 # global HTTP write timeout, which applies to all connections and endpoints. 236 # See https://github.com/tendermint/tendermint/issues/3435 237 timeout_broadcast_tx_commit = "{{ .RPC.TimeoutBroadcastTxCommit }}" 238 239 # Maximum size of request body, in bytes 240 max_body_bytes = {{ .RPC.MaxBodyBytes }} 241 242 # Maximum size of request header, in bytes 243 max_header_bytes = {{ .RPC.MaxHeaderBytes }} 244 245 # The path to a file containing certificate that is used to create the HTTPS server. 246 # Might be either absolute path or path related to CometBFT's config directory. 247 # If the certificate is signed by a certificate authority, 248 # the certFile should be the concatenation of the server's certificate, any intermediates, 249 # and the CA's certificate. 250 # NOTE: both tls_cert_file and tls_key_file must be present for CometBFT to create HTTPS server. 251 # Otherwise, HTTP server is run. 252 tls_cert_file = "{{ .RPC.TLSCertFile }}" 253 254 # The path to a file containing matching private key that is used to create the HTTPS server. 255 # Might be either absolute path or path related to CometBFT's config directory. 256 # NOTE: both tls-cert-file and tls-key-file must be present for CometBFT to create HTTPS server. 257 # Otherwise, HTTP server is run. 258 tls_key_file = "{{ .RPC.TLSKeyFile }}" 259 260 # pprof listen address (https://golang.org/pkg/net/http/pprof) 261 pprof_laddr = "{{ .RPC.PprofListenAddress }}" 262 263 ####################################################### 264 ### P2P Configuration Options ### 265 ####################################################### 266 [p2p] 267 268 # Address to listen for incoming connections 269 laddr = "{{ .P2P.ListenAddress }}" 270 271 # Address to advertise to peers for them to dial. If empty, will use the same 272 # port as the laddr, and will introspect on the listener to figure out the 273 # address. IP and port are required. Example: 159.89.10.97:26656 274 external_address = "{{ .P2P.ExternalAddress }}" 275 276 # Comma separated list of seed nodes to connect to 277 seeds = "{{ .P2P.Seeds }}" 278 279 # Comma separated list of nodes to keep persistent connections to 280 persistent_peers = "{{ .P2P.PersistentPeers }}" 281 282 # Path to address book 283 addr_book_file = "{{ js .P2P.AddrBook }}" 284 285 # Set true for strict address routability rules 286 # Set false for private or local networks 287 addr_book_strict = {{ .P2P.AddrBookStrict }} 288 289 # Maximum number of inbound peers 290 max_num_inbound_peers = {{ .P2P.MaxNumInboundPeers }} 291 292 # Maximum number of outbound peers to connect to, excluding persistent peers 293 max_num_outbound_peers = {{ .P2P.MaxNumOutboundPeers }} 294 295 # List of node IDs, to which a connection will be (re)established ignoring any existing limits 296 unconditional_peer_ids = "{{ .P2P.UnconditionalPeerIDs }}" 297 298 # Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) 299 persistent_peers_max_dial_period = "{{ .P2P.PersistentPeersMaxDialPeriod }}" 300 301 # Time to wait before flushing messages out on the connection 302 flush_throttle_timeout = "{{ .P2P.FlushThrottleTimeout }}" 303 304 # Maximum size of a message packet payload, in bytes 305 max_packet_msg_payload_size = {{ .P2P.MaxPacketMsgPayloadSize }} 306 307 # Rate at which packets can be sent, in bytes/second 308 send_rate = {{ .P2P.SendRate }} 309 310 # Rate at which packets can be received, in bytes/second 311 recv_rate = {{ .P2P.RecvRate }} 312 313 # Set true to enable the peer-exchange reactor 314 pex = {{ .P2P.PexReactor }} 315 316 # Seed mode, in which node constantly crawls the network and looks for 317 # peers. If another node asks it for addresses, it responds and disconnects. 318 # 319 # Does not work if the peer-exchange reactor is disabled. 320 seed_mode = {{ .P2P.SeedMode }} 321 322 # Comma separated list of peer IDs to keep private (will not be gossiped to other peers) 323 private_peer_ids = "{{ .P2P.PrivatePeerIDs }}" 324 325 # Toggle to disable guard against peers connecting from the same ip. 326 allow_duplicate_ip = {{ .P2P.AllowDuplicateIP }} 327 328 # Peer connection configuration. 329 handshake_timeout = "{{ .P2P.HandshakeTimeout }}" 330 dial_timeout = "{{ .P2P.DialTimeout }}" 331 332 ####################################################### 333 ### Mempool Configuration Option ### 334 ####################################################### 335 [mempool] 336 337 # The type of mempool for this node to use. 338 # 339 # Possible types: 340 # - "flood" : concurrent linked list mempool with flooding gossip protocol 341 # (default) 342 # - "nop" : nop-mempool (short for no operation; the ABCI app is responsible 343 # for storing, disseminating and proposing txs). "create_empty_blocks=false" is 344 # not supported. 345 type = "flood" 346 347 # Recheck (default: true) defines whether CometBFT should recheck the 348 # validity for all remaining transaction in the mempool after a block. 349 # Since a block affects the application state, some transactions in the 350 # mempool may become invalid. If this does not apply to your application, 351 # you can disable rechecking. 352 recheck = {{ .Mempool.Recheck }} 353 354 # Broadcast (default: true) defines whether the mempool should relay 355 # transactions to other peers. Setting this to false will stop the mempool 356 # from relaying transactions to other peers until they are included in a 357 # block. In other words, if Broadcast is disabled, only the peer you send 358 # the tx to will see it until it is included in a block. 359 broadcast = {{ .Mempool.Broadcast }} 360 361 # WalPath (default: "") configures the location of the Write Ahead Log 362 # (WAL) for the mempool. The WAL is disabled by default. To enable, set 363 # WalPath to where you want the WAL to be written (e.g. 364 # "data/mempool.wal"). 365 wal_dir = "{{ js .Mempool.WalPath }}" 366 367 # Maximum number of transactions in the mempool 368 size = {{ .Mempool.Size }} 369 370 # Limit the total size of all txs in the mempool. 371 # This only accounts for raw transactions (e.g. given 1MB transactions and 372 # max_txs_bytes=5MB, mempool will only accept 5 transactions). 373 max_txs_bytes = {{ .Mempool.MaxTxsBytes }} 374 375 # Size of the cache (used to filter transactions we saw earlier) in transactions 376 cache_size = {{ .Mempool.CacheSize }} 377 378 # Do not remove invalid transactions from the cache (default: false) 379 # Set to true if it's not possible for any invalid transaction to become valid 380 # again in the future. 381 keep-invalid-txs-in-cache = {{ .Mempool.KeepInvalidTxsInCache }} 382 383 # Maximum size of a single transaction. 384 # NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. 385 max_tx_bytes = {{ .Mempool.MaxTxBytes }} 386 387 # Maximum size of a batch of transactions to send to a peer 388 # Including space needed by encoding (one varint per transaction). 389 # XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 390 max_batch_bytes = {{ .Mempool.MaxBatchBytes }} 391 392 # Experimental parameters to limit gossiping txs to up to the specified number of peers. 393 # We use two independent upper values for persistent and non-persistent peers. 394 # Unconditional peers are not affected by this feature. 395 # If we are connected to more than the specified number of persistent peers, only send txs to 396 # ExperimentalMaxGossipConnectionsToPersistentPeers of them. If one of those 397 # persistent peers disconnects, activate another persistent peer. 398 # Similarly for non-persistent peers, with an upper limit of 399 # ExperimentalMaxGossipConnectionsToNonPersistentPeers. 400 # If set to 0, the feature is disabled for the corresponding group of peers, that is, the 401 # number of active connections to that group of peers is not bounded. 402 # For non-persistent peers, if enabled, a value of 10 is recommended based on experimental 403 # performance results using the default P2P configuration. 404 experimental_max_gossip_connections_to_persistent_peers = {{ .Mempool.ExperimentalMaxGossipConnectionsToPersistentPeers }} 405 experimental_max_gossip_connections_to_non_persistent_peers = {{ .Mempool.ExperimentalMaxGossipConnectionsToNonPersistentPeers }} 406 407 ####################################################### 408 ### State Sync Configuration Options ### 409 ####################################################### 410 [statesync] 411 # State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine 412 # snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in 413 # the network to take and serve state machine snapshots. State sync is not attempted if the node 414 # has any local state (LastBlockHeight > 0). The node will have a truncated block history, 415 # starting from the height of the snapshot. 416 enable = {{ .StateSync.Enable }} 417 418 # RPC servers (comma-separated) for light client verification of the synced state machine and 419 # retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding 420 # header hash obtained from a trusted source, and a period during which validators can be trusted. 421 # 422 # For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 423 # weeks) during which they can be financially punished (slashed) for misbehavior. 424 rpc_servers = "{{ StringsJoin .StateSync.RPCServers "," }}" 425 trust_height = {{ .StateSync.TrustHeight }} 426 trust_hash = "{{ .StateSync.TrustHash }}" 427 trust_period = "{{ .StateSync.TrustPeriod }}" 428 429 # Time to spend discovering snapshots before initiating a restore. 430 discovery_time = "{{ .StateSync.DiscoveryTime }}" 431 432 # Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). 433 # Will create a new, randomly named directory within, and remove it when done. 434 temp_dir = "{{ .StateSync.TempDir }}" 435 436 # The timeout duration before re-requesting a chunk, possibly from a different 437 # peer (default: 1 minute). 438 chunk_request_timeout = "{{ .StateSync.ChunkRequestTimeout }}" 439 440 # The number of concurrent chunk fetchers to run (default: 1). 441 chunk_fetchers = "{{ .StateSync.ChunkFetchers }}" 442 443 ####################################################### 444 ### Block Sync Configuration Options ### 445 ####################################################### 446 [blocksync] 447 448 # Block Sync version to use: 449 # 450 # In v0.37, v1 and v2 of the block sync protocols were deprecated. 451 # Please use v0 instead. 452 # 453 # 1) "v0" - the default block sync implementation 454 version = "{{ .BlockSync.Version }}" 455 456 ####################################################### 457 ### Consensus Configuration Options ### 458 ####################################################### 459 [consensus] 460 461 wal_file = "{{ js .Consensus.WalPath }}" 462 463 # How long we wait for a proposal block before prevoting nil 464 timeout_propose = "{{ .Consensus.TimeoutPropose }}" 465 # How much timeout_propose increases with each round 466 timeout_propose_delta = "{{ .Consensus.TimeoutProposeDelta }}" 467 # How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) 468 timeout_prevote = "{{ .Consensus.TimeoutPrevote }}" 469 # How much the timeout_prevote increases with each round 470 timeout_prevote_delta = "{{ .Consensus.TimeoutPrevoteDelta }}" 471 # How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) 472 timeout_precommit = "{{ .Consensus.TimeoutPrecommit }}" 473 # How much the timeout_precommit increases with each round 474 timeout_precommit_delta = "{{ .Consensus.TimeoutPrecommitDelta }}" 475 # How long we wait after committing a block, before starting on the new 476 # height (this gives us a chance to receive some more precommits, even 477 # though we already have +2/3). 478 timeout_commit = "{{ .Consensus.TimeoutCommit }}" 479 480 # How many blocks to look back to check existence of the node's consensus votes before joining consensus 481 # When non-zero, the node will panic upon restart 482 # if the same consensus key was used to sign {double_sign_check_height} last blocks. 483 # So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. 484 double_sign_check_height = {{ .Consensus.DoubleSignCheckHeight }} 485 486 # Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) 487 skip_timeout_commit = {{ .Consensus.SkipTimeoutCommit }} 488 489 # EmptyBlocks mode and possible interval between empty blocks 490 create_empty_blocks = {{ .Consensus.CreateEmptyBlocks }} 491 create_empty_blocks_interval = "{{ .Consensus.CreateEmptyBlocksInterval }}" 492 493 # Reactor sleep duration parameters 494 peer_gossip_sleep_duration = "{{ .Consensus.PeerGossipSleepDuration }}" 495 peer_query_maj23_sleep_duration = "{{ .Consensus.PeerQueryMaj23SleepDuration }}" 496 497 ####################################################### 498 ### Storage Configuration Options ### 499 ####################################################### 500 [storage] 501 502 # Set to true to discard ABCI responses from the state store, which can save a 503 # considerable amount of disk space. Set to false to ensure ABCI responses are 504 # persisted. ABCI responses are required for /block_results RPC queries, and to 505 # reindex events in the command-line tool. 506 discard_abci_responses = {{ .Storage.DiscardABCIResponses}} 507 508 ####################################################### 509 ### Transaction Indexer Configuration Options ### 510 ####################################################### 511 [tx_index] 512 513 # What indexer to use for transactions 514 # 515 # The application will set which txs to index. In some cases a node operator will be able 516 # to decide which txs to index based on configuration set in the application. 517 # 518 # Options: 519 # 1) "null" 520 # 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). 521 # - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. 522 # 3) "psql" - the indexer services backed by PostgreSQL. 523 # When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. 524 indexer = "{{ .TxIndex.Indexer }}" 525 526 # The PostgreSQL connection configuration, the connection format: 527 # postgresql://<user>:<password>@<host>:<port>/<db>?<opts> 528 psql-conn = "{{ .TxIndex.PsqlConn }}" 529 530 ####################################################### 531 ### Instrumentation Configuration Options ### 532 ####################################################### 533 [instrumentation] 534 535 # When true, Prometheus metrics are served under /metrics on 536 # PrometheusListenAddr. 537 # Check out the documentation for the list of available metrics. 538 prometheus = {{ .Instrumentation.Prometheus }} 539 540 # Address to listen for Prometheus collector(s) connections 541 prometheus_listen_addr = "{{ .Instrumentation.PrometheusListenAddr }}" 542 543 # Maximum number of simultaneous connections. 544 # If you want to accept a larger number than the default, make sure 545 # you increase your OS limits. 546 # 0 - unlimited. 547 max_open_connections = {{ .Instrumentation.MaxOpenConnections }} 548 549 # Instrumentation namespace 550 namespace = "{{ .Instrumentation.Namespace }}" 551 `