@restorecommerce/winston-elasticsearch-transformer

Transformer function for the winston-elasticsearch log transport

Usage no npm install needed!

<script type="module">
  import restorecommerceWinstonElasticsearchTransformer from 'https://cdn.skypack.dev/@restorecommerce/winston-elasticsearch-transformer';
</script>

README

winston-elasticsearch-transformer

Build StatusDependenciesCoverage Status

Transformer function for the winston-elasticsearch transport, which transforms log messages in a Logstash/ Kibana optimized form and optimizes the data for the index mapping.

The following changes and transformations are applied to log messages:

  • Adds a @timestamp field with the current date/ time
  • Adds a host property with the current host name
  • Adds a rid (request-id) based on cls-rtracer

This module also comes with a suitable mapping template and an index pattern that can be imported in Kibana.