Skip to main content

DB, SQL

The following provides the options related to the Node.js agent DB and SQL.

  • profile_sql_param_enabled Boolean

    Default false

    Collecting SQL parameters is enabled. However, the parameters can be retrieved only by entering a separate security key. Set the security key to 6 digits in paramkey.txt of the agent installation path. If paramkey.txt does not exist, it is automatically generated and a random key is set.

  • profile_connection_open_enabled Boolean

    Default true

    It records DB connection open data in the trace details.

  • profile_error_sql_fetch_max Int

    Default 10000

    When the SQL Fetch Count (number of calls) exceeds the set value, it is treated as the TOO_MANY_RECORDS error. If it is set to 0, it is not treated as an error.

  • profile_error_sql_time_max Int

    Default 30000

    When the SQL execution time exceeds the set value, it is treated as the SLOW_SQL error. If it is set to 0, it is not treated as an error.

  • trace_sql_normalize_enabled Boolean

    Default true

    It enables the function to normalize any SQL statements by extracting the literal part from each SQL statement.

  • hook_connection_open_patterns String

    It registers the method to call upon DB connection open. It is common to register getConnection of any connection pool that has not been set.

    Example
    hook_connection_open_patterns=mypool.ConPool.getConnection
  • trace_sql_error_stack Boolean

    Default false

    SQL errors are stored as stacks (MySQL, MariaDB, PostgreSQL, SQL Server).

  • trace_sql_error_depth Int

    Default 50

    Set the number of lines of errors to be stored when applying the trace_sql_error_stack option.