Klevr Product Documentation logo

Pre-Logging Transformation

How to produce a separate, search-friendly stage payload for Portal search and telemetry logging without changing the real payload.

The Klevr Integration Hub Portal service includes the ability to search for integrations/stages based on the contents of the payload that a stage produced as its output.


The pre-logging transformation feature lets a stage produce a separate, search-friendly payload representation for telemetry logging only. It does not modify the actual payload used by downstream processing.

This feature has two main purposes:

  • Firstly, the underlying Azure Application Insights and Log Analytics resources that are used for telemetry logging and searching only allow the first ~8 KB of a payload to be logged.

    As a result, when dealing with large payloads, it may be desirable to transform stage payload results - exclusively for the purposes of telemetry logging - so that only key fields relevant to searching (for example, Order Numbers, Employee IDs, etc.) are present in the logged payload.

    When applied appropriately, this can allow a very large number of key fields to be present in the payload telemetry logs, so that all relevant key field values can be located via the Integration Hub Portal service's search feature - with the full payload still being available for inspection once the relevant integration/stage executions have been found via searching.
  • Secondly, where sensitive data are present in payloads, it may be desirable to transform stage payload results - exclusively for the purposes of telemetry logging - so that sensitive data are excluded from the logged payload, preventing such data from being found via searching.

For stages that support this feature, the payload written to telemetry logging can be transformed without changing the actual payload passed to downstream processing.

PropertyDescription
preLogTransformSchemaFileNameDefines the location of either a Liquid or JavaScript transform schema used to transform the payload written to telemetry logging.

The transform does not affect the actual payload passed to downstream processing.

As with the Transform Liquid and Transform JavaScript stages, the payload is supplied with a wrapper of the format {"input": <payload>} - see the Transform Liquid and Transform JavaScript stage documentation for more details and tips/tricks on writing transform schema files.

Transform schemas must be valid and operate successfully with the payload written to telemetry logging. If the pre-logging transform fails, payload logging for that execution will fail.
preLogTransformSchemaTypeDefines the type of transformation being performed. Supported values are liquid and javascript.
preLogTransformFormatDefines the payload format expected by the pre-logging transformation schema so the payload can be interpreted correctly before logging. Supported values are json, xml and csv.

The preLogTransformSchemaFileName, preLogTransformSchemaType, and preLogTransformFormat must all be supplied together. The transform file and declared format must match the payload being logged.

Last updated on