From f99ea056107ea3e8c5fc0ac74ec64967d0280d2e Mon Sep 17 00:00:00 2001 From: Kyriakos Lesgidis Date: Wed, 7 Aug 2024 16:51:55 +0300 Subject: [PATCH] [PROD-45916] Correlate riviere logs with traces --- package-lock.json | 12 ++++++------ src/initializers/riviere.ts | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 14461e2f..7c71ed95 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1147,9 +1147,9 @@ "dev": true }, "node_modules/@workablehr/riviere": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/@workablehr/riviere/-/riviere-1.18.0.tgz", - "integrity": "sha512-/Y/l1GYUAaaBaAuKvLoD8VGYGrfjt6SSNLhz7ZI2s2dvcefLV2Yxj4Phwslizeyg37bKGZV2W+SrTItUqVBA8A==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@workablehr/riviere/-/riviere-1.19.0.tgz", + "integrity": "sha512-WvNpG0QbvHuqpMOIPwvr/VCdaxRc0S9iDKs5hOfEN+XStSAxScVgGvShFXvjgabL0DYMI+W7grLVm9qj/Rm7cQ==", "dependencies": { "chalk": "^2.4.2", "flat": "^5.0.2", @@ -9547,9 +9547,9 @@ "dev": true }, "@workablehr/riviere": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/@workablehr/riviere/-/riviere-1.18.0.tgz", - "integrity": "sha512-/Y/l1GYUAaaBaAuKvLoD8VGYGrfjt6SSNLhz7ZI2s2dvcefLV2Yxj4Phwslizeyg37bKGZV2W+SrTItUqVBA8A==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@workablehr/riviere/-/riviere-1.19.0.tgz", + "integrity": "sha512-WvNpG0QbvHuqpMOIPwvr/VCdaxRc0S9iDKs5hOfEN+XStSAxScVgGvShFXvjgabL0DYMI+W7grLVm9qj/Rm7cQ==", "requires": { "chalk": "^2.4.2", "flat": "^5.0.2", diff --git a/src/initializers/riviere.ts b/src/initializers/riviere.ts index 47b9a3a9..1141bc62 100644 --- a/src/initializers/riviere.ts +++ b/src/initializers/riviere.ts @@ -4,6 +4,7 @@ import * as Koa from 'koa'; import { getRequestContext } from '../builder'; import { getLogger } from './log4js'; import { appendHeadersFromStore } from '../utils'; +import { injectTrace } from '../initializers/datadog'; const http = require('http'); const https = require('https'); @@ -49,6 +50,7 @@ const init = (config, orkaOptions) => { bodyKeysCallback: config.riviere.bodyKeysCallback, color: config.riviere.color, hostFieldName: config.riviere.hostFieldName, + loggerCallback: injectTrace, context: (ctx: Koa.Context) => { return { visitor: ctx.state.visitor,