Skip to content

Commit

Permalink
refactor: improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
subotic committed Jun 7, 2023
1 parent 728cf4b commit 895e3fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -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.
Expand Down
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions vars.mk
Expand Up @@ -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

0 comments on commit 895e3fa

Please sign in to comment.