From c0d23d2b349b3598ea670458a70e3e385a214da8 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 12:18:58 +0000 Subject: [PATCH 1/2] feat: Updated index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index c124fde..74273a6 100644 --- a/index.js +++ b/index.js @@ -27,7 +27,7 @@ class LokiTransport extends Transport { batching: options.batching !== false, clearOnError: options.clearOnError, onConnectionError: options.onConnectionError, - replaceTimestamp: options.replaceTimestamp, + replaceTimestamp: options.replaceTimestamp !== false, gracefulShutdown: options.gracefulShutdown !== false, timeout: options.timeout }) From e2796413cbd3fa63c98b0b866a2de20fa950815b Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 12:20:01 +0000 Subject: [PATCH 2/2] feat: Updated README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ecb1a3a..1973af9 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ LokiTransport() takes a Javascript object as an input. These are the options tha | `json` | Use JSON instead of Protobuf for transport | true | false | | `batching` | If batching is not used, the logs are sent as they come | true | true | | `clearOnError` | Discard any logs that result in an error during transport | true | false | -| `replaceTimestamp` | Replace any log timestamps with Date.now() | true | false | +| `replaceTimestamp` | Replace any log timestamps with Date.now(). Warning: Disabling `replaceTimestamp` may result in logs failing to upload due to recent changes in the upstream Loki project. It is recommended to leave this option enabled unless you have a specific reason to disable it. | true | true | | `labels` | custom labels, key-value pairs | { module: 'http' } | undefined | | `format` | winston format (https://github.com/winstonjs/winston#formats) | simple() | undefined | | `gracefulShutdown` | Enable/disable graceful shutdown (wait for any unsent batches) | false | true |