Articles in this section
Category / Section

How to enable query and query execution time in debug info files and HAR file?

Published:

When working with Bold BI, you may find it necessary to enable query metrics in your debug information files. This can be particularly useful for performance tuning or troubleshooting issues related to query execution times. To achieve this, you will need to modify certain properties in the application’s configuration file.

Windows and Linux:

Steps to Enable Query Metrics:

  1. Navigate to the configuration file located at:
Windows: {{Bold BI Installed Location}}:\BoldServices\bi\dataservice\appsettings.json

Linux: /var/www/bold-services/application/bi/dataservice\appsettings.json
  1. Open the appsettings.json file with a text editor of your choice, such as Notepad etc.
  2. Locate the properties related to query metrics. You will need to enable one of the following properties based on your specific needs:

EnableQueryMetricsInDebugFiles: This property allows you to enable the logging of query metrics without the actual query text.

EnableQueryMetricsWithQueryInDebugFiles: This property enables the logging of both query metrics and the query text itself.

EnableQueryMetricsWithQueryInHAR: This property allows you to enable the widget query in the network tab of Inspect element and HAR file. Supported version: 7.8.18 and above

  1. Set the value of the chosen property to true to enable it. For example:
"EnableQueryMetricsInDebugFiles": true

or

"EnableQueryMetricsWithQueryInDebugFiles": true 
  1. To activate the query function in the network tab of Inspect element and HAR file, change the selected property value to true. For instance:
"EnableQueryMetricsWithQueryInHAR": true 

image.png

Note: We enabled the grid summary row query and query execution time in debug info files and HAR files.

Inspect_2.png

Note: To view a query in Inspect Elements, you must right-click on the dashboard page and select Inspect. Then, click on the network tab.

  1. Save the changes to the appsettings.json file.
  2. Refresh the Bold BI application for changes to take effect.

Kubernetes and Docker:

You can enable environment variables for enabling query metrics in debug-info files and showing the query in HAR file:

Name of the variableDescription(Usage of the variable)
AppSettings__EnableQueryMetricsInDebugFilesIf the query metrics needs to be logged in debug files, enable this to true. By default, this option is set to false.
AppSettings__EnableQueryMetricsWithQueryInDebugFilesIf the query and query metrics needs to be logged in debug files, enable this to true. By default, this option is set to false.
AppSettings__EnableQueryMetricsWithQueryInHARIf you want the query to be displayed in the network tab and HAR file, set this option to true. By default, this option is set to false.
Please enable these environmental variables when deploying Bold BI for query metrics to be logged in debug-info files.

Please note that the paths and property names mentioned are specific to Bold BI Data Service.



Additional Resources:

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
PK
Written by Poovarasan Kandasamy
Updated
Comments (0)
Please  to leave a comment
Access denied
Access denied