From 6f8adec143c5164c20f791488136cb27ed11681f Mon Sep 17 00:00:00 2001 From: Jean SIMARD Date: Tue, 13 Feb 2024 14:47:15 +0100 Subject: [PATCH] core: fix the error condition for Datadog report --- core/src/main/java/fr/sncf/osrd/cli/TkDataDog.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/fr/sncf/osrd/cli/TkDataDog.kt b/core/src/main/java/fr/sncf/osrd/cli/TkDataDog.kt index 19a20f4906a..8ef16da6a6b 100644 --- a/core/src/main/java/fr/sncf/osrd/cli/TkDataDog.kt +++ b/core/src/main/java/fr/sncf/osrd/cli/TkDataDog.kt @@ -25,9 +25,9 @@ class TkDataDog(take: Take) : TkWrap(Take { request: Request -> datadog(take, re val statusCode = RsStatus.Base(response).status() span.setTag(Tags.HTTP_STATUS, statusCode) if (statusCode < 400) { - span.setTag(Tags.ERROR, true) - } else { span.setTag(Tags.ERROR, false) + } else { + span.setTag(Tags.ERROR, true) } return response