Troubleshooting Functions

Steps to troubleshoot use of Functions in Horreum

Troubleshooting Functions and Combination Function

Creating Scheam Labels is one of the key capabilities that enables working with loosely defined data. Using a JSON Validation Schema provides useful guarentees data in an uploaded Run JSON conforms to expected data types. A Validation Schema is optional but when not used makes the handling of metrics unreliable as data types may change.

To troubleshoot use of JavaScript Function the following techniques can be used

  • The typeof function to discover the data-type of the Extractor variable, Object property or Array element in the Label Combination Function, using the Test label calculation button to reveal the JavaScript data-type

Test label calculation

  • View the Labels calculation Log window and display INFO or DEBUG log level, this reveals syntax errors when the function is executed

Logged in user, Labels Calculation Log

  • Use the Show label values button, provides a quick visual check of resulting values for the Run Dataset

Run Dataset view

Effective label values window reveals the anticipated value or error text which can be due to the following:

  • Nan - Numerical expression involves a data-type that is incompatible
  • (undefined) - Incorrect JSONPath field value used in the Label Extractor
  • empty - Absence of any value in the uploaded Run

Effective label values