From cd43daaa9e9ca961ac1699cdb7a9b7d536781481 Mon Sep 17 00:00:00 2001 From: osman sonmezturk Date: Wed, 2 Aug 2023 17:52:16 +0300 Subject: [PATCH 1/2] name convention was fixed --- kubernetes/production/patch-ingress.yml | 4 ++-- kubernetes/staging/patch-ingress.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kubernetes/production/patch-ingress.yml b/kubernetes/production/patch-ingress.yml index 1bc63f77..6be1bb85 100644 --- a/kubernetes/production/patch-ingress.yml +++ b/kubernetes/production/patch-ingress.yml @@ -4,7 +4,7 @@ metadata: name: defi-providers spec: rules: - - host: https://defi-providers.dappradar.com + - host: defi-providers.dappradar.com http: paths: - path: / @@ -17,5 +17,5 @@ spec: tls: - hosts: - - https://defi-providers.dappradar.com + - defi-providers.dappradar.com secretName: defi-providers-tls diff --git a/kubernetes/staging/patch-ingress.yml b/kubernetes/staging/patch-ingress.yml index f9b15a6d..f1bf9c05 100644 --- a/kubernetes/staging/patch-ingress.yml +++ b/kubernetes/staging/patch-ingress.yml @@ -4,7 +4,7 @@ metadata: name: defi-providers spec: rules: - - host: https://defi-providers.dappradar.dev + - host: defi-providers.dappradar.dev http: paths: - path: / @@ -17,5 +17,5 @@ spec: tls: - hosts: - - https://defi-providers.dappradar.dev + - defi-providers.dappradar.dev secretName: defi-providers-tls \ No newline at end of file From a1531294bfa799350498c542c2a72498b25ee2eb Mon Sep 17 00:00:00 2001 From: osman sonmezturk Date: Thu, 3 Aug 2023 16:45:28 +0300 Subject: [PATCH 2/2] logging was improved and delete deprecated GA --- .../trigger-production-deployment.yml | 20 ------------------- .github/workflows/trigger-qa-deployment.yml | 20 ------------------- src/app.config.ts | 2 ++ src/util/logger/appenders/logstashAppender.ts | 4 +++- 4 files changed, 5 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/trigger-production-deployment.yml delete mode 100644 .github/workflows/trigger-qa-deployment.yml diff --git a/.github/workflows/trigger-production-deployment.yml b/.github/workflows/trigger-production-deployment.yml deleted file mode 100644 index 62161a4e..00000000 --- a/.github/workflows/trigger-production-deployment.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Trigger production deployment - -on: - push: - branches: [ master ] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Send dispatch event to CICD repository - run: | - curl \ - -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.CICD_REPO_DISPATCH_TOKEN }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/${{ secrets.CICD_REPOSITORY_NAME }}/dispatches \ - --data '{"event_type": "deploy-defi-providers-prod", "client_payload":{"branch": "master"}}' diff --git a/.github/workflows/trigger-qa-deployment.yml b/.github/workflows/trigger-qa-deployment.yml deleted file mode 100644 index 1289ab2c..00000000 --- a/.github/workflows/trigger-qa-deployment.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Trigger QA deployment - -on: - push: - branches: [ staging ] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Send dispatch event to CICD repository - run: | - curl \ - -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.CICD_REPO_DISPATCH_TOKEN }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/${{ secrets.CICD_REPOSITORY_NAME }}/dispatches \ - --data '{"event_type": "deploy-defi-providers-qa", "client_payload":{"branch": "staging"}}' diff --git a/src/app.config.ts b/src/app.config.ts index 2b5001d3..47b88f8e 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -7,6 +7,7 @@ const { HOST = '127.0.0.1', PORT = 3002, APP_ENV, + NODE_ENV, SLACK_WEBHOOK_URL, SLACK_LOGGING, LOGSTASH_PORT, @@ -39,6 +40,7 @@ const config = { HOST, PORT, APP_ENV, + NODE_ENV, LOGSTASH_HOST, LOGSTASH_PORT, LOGSTASH_INDEX, diff --git a/src/util/logger/appenders/logstashAppender.ts b/src/util/logger/appenders/logstashAppender.ts index bb44b592..7a4c5626 100644 --- a/src/util/logger/appenders/logstashAppender.ts +++ b/src/util/logger/appenders/logstashAppender.ts @@ -21,6 +21,7 @@ interface IMessage { interface ILogstashMessage { '@timestamp': string; '@metadata': { package: string }; + Env: string; Message: string; Stack: string; Detail: string; @@ -28,7 +29,7 @@ interface ILogstashMessage { Host: string; Level: string; } -const { LOGSTASH_HOST, LOGSTASH_PORT, LOGSTASH_INDEX } = config; +const { NODE_ENV, LOGSTASH_HOST, LOGSTASH_PORT, LOGSTASH_INDEX } = config; function generatePayload(loggingEvent: ILoggingEvent): ILogstashMessage { const { @@ -43,6 +44,7 @@ function generatePayload(loggingEvent: ILoggingEvent): ILogstashMessage { '@metadata': { package: LOGSTASH_INDEX, }, + Env: NODE_ENV, Message: message, Stack: stack, Detail: detail,