From 895e3fa184f1af41488422050108f795a1ef7d82 Mon Sep 17 00:00:00 2001 From: Ivan Subotic <400790+subotic@users.noreply.github.com> Date: Wed, 7 Jun 2023 15:40:21 +0200 Subject: [PATCH] refactor: improve logging --- Makefile | 4 ++-- .../app-logging/src/lib/app-logging/app-logging.service.ts | 1 + vars.mk | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e1f7659bbe..58f0df2a13 100644 --- a/Makefile +++ b/Makefile @@ -53,9 +53,9 @@ docker-publish-app: app-build-prod ## publish DSP-APP Docker image to Docker-Hub # publish source maps to DataDog datadog-ci sourcemaps upload ${CURRENT_DIR}/dist/apps/dsp-app \ --service=dsp-app \ - --release-version=${BUILD_TAG} \ + --release-version=${DSP_APP_VERSION} \ --minified-path-prefix=/ - docker buildx build --platform linux/amd64,linux/arm64/v8 -t $(DSP_APP_IMAGE) --push . + # docker buildx build --platform linux/amd64,linux/arm64/v8 -t $(DSP_APP_IMAGE) --push . .PHONY: docker-publish docker-publish: docker-publish-app ## publish all Docker images in the monorepo. diff --git a/libs/vre/shared/app-logging/src/lib/app-logging/app-logging.service.ts b/libs/vre/shared/app-logging/src/lib/app-logging/app-logging.service.ts index 8e5d59e7d3..5c9d70a5aa 100644 --- a/libs/vre/shared/app-logging/src/lib/app-logging/app-logging.service.ts +++ b/libs/vre/shared/app-logging/src/lib/app-logging/app-logging.service.ts @@ -21,6 +21,7 @@ export class AppLoggingService { env: c.environment, forwardErrorsToLogs: true, // forwards console.error logs, uncaught exceptions and network errors to Datadog forwardConsoleLogs: [], // don't forward any logs (besides console.error - in previous setting) to Datadog + useSecureSessionCookie: true, }); datadogLogs.logger.setHandler(['console', 'http']); this.logger = datadogLogs.logger; diff --git a/vars.mk b/vars.mk index c26ce3721e..7ad51046b8 100644 --- a/vars.mk +++ b/vars.mk @@ -7,3 +7,7 @@ endif ifeq ($(DSP_APP_IMAGE),) DSP_APP_IMAGE := $(DSP_APP_REPO):$(BUILD_TAG) endif + +ifeq ($(DSP_APP_VERSION),) + DSP_APP_VERSION := $(shell jq .version package.json) +endif