Node.js Tracing
Use tracing to help diagnose errors in JavaScript applications that use the Node.js driver.
There are several ways to activate Node.js tracing:
-
Tracing configured by hdbsqldbc_cons
-
Tracing environment variables
-
Connection-specific tracing to the console
-
Tracing using a callback provided by the Node.js application
Trace Using the hdbsqldbc_cons Tool
Use the hdbsqldbc_cons tool to initiate diagnostic tracing for your Node.js applications. The API category of tracing can be particularly helpful for tracing calls into the Node.js driver.
See hdbsqldbc_cons Trace Options for more information.
Trace Using Environment Variables
There are two environment variables that can be used to configure tracing for Node.js applications: HDB_SQLDBC_TRACEFILE and HDB_SQLDBC_TRACEOPTS.
- HDB_SQLDBC_TRACEFILE
-
Specifies the trace file name. A timestamp is added to the name to provide additional protection from malicious users.
- HDB_SQLDBC_TRACEOPTS
-
Specifies the trace configuration options. The API trace category can be particularly helpful for tracing calls into the Node.js driver.
See SQLDBC Trace Options for more information.
Connection-Specific Tracing to the Console
There are two connection options that can be used to configure tracing for specific Node.js connections to the console: traceFile and traceOptions.
- traceFile
-
Specifies the trace file name. Only the stdout and stderr values are supported.
- traceOptions
-
Specifies the trace configuration options. The API trace category can be particularly helpful for tracing calls into the Node.js driver.
See SQLDBC Trace Options for more information.
Trace Using a Node.js Callback Method
A Node.js trace callback method can be supplied to a connection using the onTrace method to receive trace messages.
See onTrace(traceOptions, callback) Method for more information.