Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
blocks:diagnostics [2020-12-11 11:15] – created adminblocks:diagnostics [2025-12-16 10:06] (current) – [Enabling Logging of Metrics] admin
Line 15: Line 15:
 </code> </code>
  
-The "frequency" option determines how often you want metrics written to the log file. You may want to set this to a shorter value (such as "5 minutes") if you're diagnosing an issue with a shorter time span. Remember to restart Blocks to make it pick up the config file change.+The "frequency" option determines how often you want metrics written to the log file. You may want to set this to a shorter value (such as "5 minutes") if you're diagnosing an issue with a shorter time span.  
 + 
 +In addition to the above, you also need to enable metrics in the configuration file under logging/loggers: 
 + 
 +<code> 
 +logging: 
 +  # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL. 
 +  level: WARN 
 +  loggers:   # Logger-specific levels, doing more logging in test mode 
 +    metrics: INFO   # To actually log metrics data 
 +</code> 
 + 
 +You may already have other items configurerd under logging/loggers, in which case you only have to add the "metrics: INFO" line there. See here for [[https://www.dropwizard.io/en/stable/manual/configuration.html#metrics|more on how to configure metrics]] through the underlying framework. 
 + 
 +Remember to restart Blocks to make it pick up the config file change.
  
 ===== Accessing Metrics on Demand ===== ===== Accessing Metrics on Demand =====