chewbranca commented on code in PR #5602: URL: https://github.com/apache/couchdb/pull/5602#discussion_r2221064573
########## rel/overlay/etc/default.ini: ########## @@ -1150,3 +1150,63 @@ url = {{nouveau_url}} ;mem3_shards = true ;nouveau_index_manager = true ;dreyfus_index_manager = true + +; Couch Stats Resource Tracker (CSRT) +[csrt] +enable = true +enable_init_p = true +enable_reporting = true +;enable = false +;enable_init_p = false +;enable_reporting = false +;enable_rpc_reporting = false + +; Truncate reports to not include zero values for counter fields. This is a +; simple way to save space and should be left enabled unless you need a fixed +; output structure in the process lifecycle reports. +;should_truncate_reports = true + +; Limit queries to a maxinum number of rows +;query_limit = 10000 + +; CSRT Rexi Server RPC Worker Spawn Tracking +; Enable these to enable additional metrics for RPC worker spawn rates +; measuring how often RPC workers are spawned by way of rexi_server:init_p. +; Mod and Function are separated by double underscores. +[csrt.init_p] +fabric_rpc__all_docs = true +fabric_rpc__changes = true +fabric_rpc__get_all_security = true +fabric_rpc__map_view = true +fabric_rpc__open_doc = true +fabric_rpc__open_shard = true +fabric_rpc__reduce_view = true +fabric_rpc__update_docs = true + +; CSRT dbname matchers +; Given a dbname and a positive integer, this will enable an IO matcher +; against the provided db for any requests that induce IO in quantities +; greater than the provided threshold on any one of: ioq_calls, rows_read +; docs_read, get_kp_node, get_kv_node, or changes_processed. +[csrt_logger.dbnames_io] Review Comment: I've added additional documentation for this over in CSRT.md at `## -define(CSRT_MATCHERS_DBNAMES, "csrt_logger.dbnames_io").` section, and similarly `# CSRT Logger Matcher Enablement and Thresholds ` for the default matchers. You can specify a dbname or a shard name, and that will match at either the coordinator context or the RPC worker context, respectively, so if you match on db `foo`, that is a clustered dbname that exists at the coordinator level, so it'll match coordinators for requests against db `foo`, whereas RPC workers operate on the db shards themselves, so you'd specify `shards/80000000-ffffffff/foo.1744078714` to match on a particular RPC worker, but you also need `csrt:is_enabled_rpc_reporting()` to trigger logs for RPC workers. The idea is until a properly expressive config syntax is defined for mapping complex matchers to default.ini, we instead have the ability to easily set specific target thresholds on the dimensions and then specify whether or not to enable RPC reporting. As it says in the comment, this will trigger on any _one_ field being greater than the threshold. Again, this is address the expressiveness of the ini settings and what we can map easily into `ets:fun2ms`: this is a `key => val` config lookup on a dbname to an integer threshold as a simple way to register a heavy IO matcher against a database. Ideally, this becomes obsolete with more expressive matchers, but pragmatically it's a very useful way to be able to config:set a logger matcher dynamically and get useful data. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org