From 2a5bba49af2ea5f7f7e06360a66f981af34a0584 Mon Sep 17 00:00:00 2001 From: Ruslan Konviser Date: Wed, 29 Nov 2023 13:07:51 +0100 Subject: [PATCH] feat: more for SigNoz --- .deploy/api/Dockerfile | 2 ++ .deploy/k8s/k8s-manifest.civo.demo.yaml | 2 ++ .deploy/k8s/k8s-manifest.civo.prod.yaml | 2 ++ .deploy/k8s/k8s-manifest.civo.stage.yaml | 2 ++ .deploy/k8s/k8s-manifest.cw.demo.yaml | 2 ++ .deploy/k8s/k8s-manifest.cw.prod.yaml | 2 ++ .deploy/k8s/k8s-manifest.cw.stage.yaml | 2 ++ .deploy/k8s/k8s-manifest.demo.yaml | 2 ++ .deploy/k8s/k8s-manifest.prod.yaml | 2 ++ .deploy/k8s/k8s-manifest.stage.yaml | 2 ++ .env.compose | 3 +++ .env.docker | 3 +++ .env.local | 3 +++ .env.sample | 3 +++ .github/workflows/deploy-civo-demo.yml | 3 ++- .github/workflows/deploy-civo-prod.yml | 5 +++-- .github/workflows/deploy-civo-stage.yml | 5 +++-- .github/workflows/deploy-cw-demo.yml | 3 ++- .github/workflows/deploy-cw-prod.yml | 3 ++- .github/workflows/deploy-cw-stage.yml | 3 ++- .github/workflows/deploy-do-demo.yml | 3 ++- .github/workflows/deploy-do-prod.yml | 1 + .github/workflows/deploy-do-stage.yml | 1 + docker-compose.demo.yml | 1 + docker-compose.yml | 1 + packages/core/src/bootstrap/tracer.ts | 17 ++++++++++++++++- 26 files changed, 68 insertions(+), 10 deletions(-) diff --git a/.deploy/api/Dockerfile b/.deploy/api/Dockerfile index 7a53754c0e6..e8b7fb98f8d 100644 --- a/.deploy/api/Dockerfile +++ b/.deploy/api/Dockerfile @@ -6,6 +6,7 @@ ARG API_BASE_URL ARG CLIENT_BASE_URL ARG API_HOST ARG API_PORT +ARG CLOUD_PROVIDER ARG SENTRY_DSN ARG SENTRY_HTTP_TRACING_ENABLED ARG SENTRY_POSTGRES_TRACKING_ENABLED @@ -267,6 +268,7 @@ ENV DB_TYPE=${DB_TYPE:-sqlite} ENV DB_SSL_MODE=${DB_SSL_MODE} ENV DB_CA_CERT=${DB_CA_CERT} ENV DEMO=${DEMO:-false} +ENV CLOUD_PROVIDER=${CLOUD_PROVIDER} ENV AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} ENV AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} ENV AWS_REGION=${AWS_REGION} diff --git a/.deploy/k8s/k8s-manifest.civo.demo.yaml b/.deploy/k8s/k8s-manifest.civo.demo.yaml index 51db159fa41..ef952bdcf2c 100644 --- a/.deploy/k8s/k8s-manifest.civo.demo.yaml +++ b/.deploy/k8s/k8s-manifest.civo.demo.yaml @@ -71,6 +71,8 @@ spec: value: 'refreshSecretKey' - name: JWT_REFRESH_TOKEN_EXPIRATION_TIME value: '86400' + - name: CLOUD_PROVIDER + value: '$CLOUD_PROVIDER' - name: OTEL_ENABLED value: '$OTEL_ENABLED' - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT diff --git a/.deploy/k8s/k8s-manifest.civo.prod.yaml b/.deploy/k8s/k8s-manifest.civo.prod.yaml index 81c5c9249c9..2e1efa67b85 100644 --- a/.deploy/k8s/k8s-manifest.civo.prod.yaml +++ b/.deploy/k8s/k8s-manifest.civo.prod.yaml @@ -53,6 +53,8 @@ spec: value: 'true' - name: LOG_LEVEL value: 'info' + - name: CLOUD_PROVIDER + value: '$CLOUD_PROVIDER' - name: SENTRY_DSN value: '$SENTRY_DSN' - name: SENTRY_HTTP_TRACING_ENABLED diff --git a/.deploy/k8s/k8s-manifest.civo.stage.yaml b/.deploy/k8s/k8s-manifest.civo.stage.yaml index c183d414117..46cccbdd798 100644 --- a/.deploy/k8s/k8s-manifest.civo.stage.yaml +++ b/.deploy/k8s/k8s-manifest.civo.stage.yaml @@ -53,6 +53,8 @@ spec: value: 'true' - name: LOG_LEVEL value: 'info' + - name: CLOUD_PROVIDER + value: '$CLOUD_PROVIDER' - name: SENTRY_DSN value: '$SENTRY_DSN' - name: SENTRY_HTTP_TRACING_ENABLED diff --git a/.deploy/k8s/k8s-manifest.cw.demo.yaml b/.deploy/k8s/k8s-manifest.cw.demo.yaml index d0b180e2e43..4adcba342cc 100644 --- a/.deploy/k8s/k8s-manifest.cw.demo.yaml +++ b/.deploy/k8s/k8s-manifest.cw.demo.yaml @@ -62,6 +62,8 @@ spec: value: 0.0.0.0 - name: DEMO value: 'true' + - name: CLOUD_PROVIDER + value: '$CLOUD_PROVIDER' - name: NODE_ENV value: 'development' - name: ADMIN_PASSWORD_RESET diff --git a/.deploy/k8s/k8s-manifest.cw.prod.yaml b/.deploy/k8s/k8s-manifest.cw.prod.yaml index b3a3dd39515..42550f41f46 100644 --- a/.deploy/k8s/k8s-manifest.cw.prod.yaml +++ b/.deploy/k8s/k8s-manifest.cw.prod.yaml @@ -79,6 +79,8 @@ spec: value: 'true' - name: LOG_LEVEL value: 'info' + - name: CLOUD_PROVIDER + value: '$CLOUD_PROVIDER' - name: SENTRY_DSN value: '$SENTRY_DSN' - name: SENTRY_HTTP_TRACING_ENABLED diff --git a/.deploy/k8s/k8s-manifest.cw.stage.yaml b/.deploy/k8s/k8s-manifest.cw.stage.yaml index 869ea9fd29e..9e87beda5e1 100644 --- a/.deploy/k8s/k8s-manifest.cw.stage.yaml +++ b/.deploy/k8s/k8s-manifest.cw.stage.yaml @@ -79,6 +79,8 @@ spec: value: 'true' - name: LOG_LEVEL value: 'info' + - name: CLOUD_PROVIDER + value: '$CLOUD_PROVIDER' - name: SENTRY_DSN value: '$SENTRY_DSN' - name: SENTRY_HTTP_TRACING_ENABLED diff --git a/.deploy/k8s/k8s-manifest.demo.yaml b/.deploy/k8s/k8s-manifest.demo.yaml index f537d7a70c2..071ae7cb72d 100644 --- a/.deploy/k8s/k8s-manifest.demo.yaml +++ b/.deploy/k8s/k8s-manifest.demo.yaml @@ -65,6 +65,8 @@ spec: value: 0.0.0.0 - name: DEMO value: 'true' + - name: CLOUD_PROVIDER + value: '$CLOUD_PROVIDER' - name: NODE_ENV value: 'development' - name: ADMIN_PASSWORD_RESET diff --git a/.deploy/k8s/k8s-manifest.prod.yaml b/.deploy/k8s/k8s-manifest.prod.yaml index 683e4aab6a8..67e542678ad 100644 --- a/.deploy/k8s/k8s-manifest.prod.yaml +++ b/.deploy/k8s/k8s-manifest.prod.yaml @@ -71,6 +71,8 @@ spec: value: 'true' - name: LOG_LEVEL value: 'info' + - name: CLOUD_PROVIDER + value: '$CLOUD_PROVIDER' - name: SENTRY_DSN value: '$SENTRY_DSN' - name: SENTRY_HTTP_TRACING_ENABLED diff --git a/.deploy/k8s/k8s-manifest.stage.yaml b/.deploy/k8s/k8s-manifest.stage.yaml index 54aa2a6bba9..f0005a06daf 100644 --- a/.deploy/k8s/k8s-manifest.stage.yaml +++ b/.deploy/k8s/k8s-manifest.stage.yaml @@ -71,6 +71,8 @@ spec: value: 'true' - name: LOG_LEVEL value: 'info' + - name: CLOUD_PROVIDER + value: '$CLOUD_PROVIDER' - name: SENTRY_DSN value: '$SENTRY_DSN' - name: SENTRY_HTTP_TRACING_ENABLED diff --git a/.env.compose b/.env.compose index b7e1cf99958..6e9556acc46 100644 --- a/.env.compose +++ b/.env.compose @@ -34,6 +34,9 @@ WEB_PORT=4200 # set true if running as a Demo DEMO=true +# DO (DIGITALOCEAN), AWS, AZURE, CIVO, CW (COREWEAVE), HEROKU, LINODE, LOCAL, OVH, SCALEWAY, VULTR, etc +CLOUD_PROVIDER= + ALLOW_SUPER_ADMIN_ROLE=true # set to Gauzy API base URL diff --git a/.env.docker b/.env.docker index e13f850d486..222dc76dd1b 100644 --- a/.env.docker +++ b/.env.docker @@ -37,6 +37,9 @@ WEB_PORT=4200 # set true if running as a Demo DEMO=true +# DO (DIGITALOCEAN), AWS, AZURE, CIVO, CW (COREWEAVE), HEROKU, LINODE, LOCAL, OVH, SCALEWAY, VULTR, etc +CLOUD_PROVIDER= + ALLOW_SUPER_ADMIN_ROLE=true # set to Gauzy API base URL diff --git a/.env.local b/.env.local index 42d22bee9f7..4632492d002 100644 --- a/.env.local +++ b/.env.local @@ -37,6 +37,9 @@ WEB_PORT=4200 # set true if running as a Demo DEMO=true +# DO (DIGITALOCEAN), AWS, AZURE, CIVO, CW (COREWEAVE), HEROKU, LINODE, LOCAL, OVH, SCALEWAY, VULTR, etc +CLOUD_PROVIDER= + ALLOW_SUPER_ADMIN_ROLE=true # set to Gauzy API base URL diff --git a/.env.sample b/.env.sample index 2426d8ec8e8..76ac1217499 100644 --- a/.env.sample +++ b/.env.sample @@ -22,6 +22,9 @@ IS_DOCKER=false # Set true if running as a Demo DEMO=false +# DO (DIGITALOCEAN), AWS, AZURE, CIVO, CW (COREWEAVE), HEROKU, LINODE, LOCAL, OVH, SCALEWAY, VULTR, etc +CLOUD_PROVIDER= + ALLOW_SUPER_ADMIN_ROLE=true # Set to Gauzy API base URL diff --git a/.github/workflows/deploy-civo-demo.yml b/.github/workflows/deploy-civo-demo.yml index 3517ffd79e4..d13e5bc1b57 100644 --- a/.github/workflows/deploy-civo-demo.yml +++ b/.github/workflows/deploy-civo-demo.yml @@ -3,7 +3,7 @@ name: Deploy to Civo Demo on: workflow_run: workflows: ['Build and Publish Docker Images Demo'] - branches: [develop, temp] + branches: [civo] types: - completed @@ -38,6 +38,7 @@ jobs: env: # below we are using GitHub secrets for both frontend and backend DB_NAME: 'gauzy_demo' + CLOUD_PROVIDER: 'CIVO' SENTRY_DSN: '${{ secrets.SENTRY_DSN }}' SENTRY_TRACES_SAMPLE_RATE: '${{ secrets.SENTRY_TRACES_SAMPLE_RATE }}' SENTRY_HTTP_TRACING_ENABLED: '${{ secrets.SENTRY_HTTP_TRACING_ENABLED }}' diff --git a/.github/workflows/deploy-civo-prod.yml b/.github/workflows/deploy-civo-prod.yml index c5ca69a73a2..73a2f586005 100644 --- a/.github/workflows/deploy-civo-prod.yml +++ b/.github/workflows/deploy-civo-prod.yml @@ -3,7 +3,7 @@ name: Deploy to Civo Prod on: workflow_run: workflows: ['Build and Publish Docker Images Prod'] - branches: [master] + branches: [civo] types: - completed @@ -46,13 +46,14 @@ jobs: DB_TYPE: '${{ secrets.DB_TYPE }}' DB_URI: '${{ secrets.DB_URI }}' # Note: for now we are using DB in different provider, so we have to use public hostname - DB_HOST: '${{ secrets.DB_HOST_PUBLIC }}' + DB_HOST: '${{ secrets.DB_HOST_CIVO }}' DB_USER: '${{ secrets.DB_USER }}' DB_PASS: '${{ secrets.DB_PASS }}' DB_NAME: 'gauzy-pool' DB_PORT: '${{ secrets.DB_PORT }}' DB_CA_CERT: '${{ secrets.DB_CA_CERT }}' DB_SSL_MODE: '${{ secrets.DB_SSL_MODE }}' + CLOUD_PROVIDER: 'CIVO' SENTRY_DSN: '${{ secrets.SENTRY_DSN }}' SENTRY_TRACES_SAMPLE_RATE: '${{ secrets.SENTRY_TRACES_SAMPLE_RATE }}' SENTRY_HTTP_TRACING_ENABLED: '${{ secrets.SENTRY_HTTP_TRACING_ENABLED }}' diff --git a/.github/workflows/deploy-civo-stage.yml b/.github/workflows/deploy-civo-stage.yml index 4cc2b470929..b935c9de2d3 100644 --- a/.github/workflows/deploy-civo-stage.yml +++ b/.github/workflows/deploy-civo-stage.yml @@ -3,7 +3,7 @@ name: Deploy to Civo Stage on: workflow_run: workflows: ['Build and Publish Docker Images Stage'] - branches: [stage] + branches: [civo] types: - completed @@ -46,7 +46,7 @@ jobs: DB_TYPE: '${{ secrets.DB_TYPE }}' DB_URI: '${{ secrets.DB_URI }}' # Note: for now we are using DB in different provider, so we have to use public hostname - DB_HOST: '${{ secrets.DB_HOST_PUBLIC }}' + DB_HOST: '${{ secrets.DB_HOST_CIVO }}' DB_USER: '${{ secrets.DB_USER }}' DB_PASS: '${{ secrets.DB_PASS }}' # Note that for staging we are using for now same server, just different DB name @@ -54,6 +54,7 @@ jobs: DB_PORT: '${{ secrets.DB_PORT }}' DB_CA_CERT: '${{ secrets.DB_CA_CERT }}' DB_SSL_MODE: '${{ secrets.DB_SSL_MODE }}' + CLOUD_PROVIDER: 'CIVO' SENTRY_DSN: '${{ secrets.SENTRY_DSN }}' SENTRY_TRACES_SAMPLE_RATE: '${{ secrets.SENTRY_TRACES_SAMPLE_RATE }}' SENTRY_HTTP_TRACING_ENABLED: '${{ secrets.SENTRY_HTTP_TRACING_ENABLED }}' diff --git a/.github/workflows/deploy-cw-demo.yml b/.github/workflows/deploy-cw-demo.yml index 14dbcf079f7..b16fab254a9 100644 --- a/.github/workflows/deploy-cw-demo.yml +++ b/.github/workflows/deploy-cw-demo.yml @@ -3,7 +3,7 @@ name: Deploy to CoreWeave Demo on: workflow_run: workflows: ['Build and Publish Docker Images Demo'] - branches: [develop, temp] + branches: [develop] types: - completed @@ -37,6 +37,7 @@ jobs: envsubst < $GITHUB_WORKSPACE/.deploy/k8s/k8s-manifest.cw.demo.yaml | kubectl --context coreweave apply -f - env: # below we are using GitHub secrets for both frontend and backend + CLOUD_PROVIDER: 'CW' DB_NAME: 'gauzy_demo' SENTRY_DSN: '${{ secrets.SENTRY_DSN }}' SENTRY_TRACES_SAMPLE_RATE: '${{ secrets.SENTRY_TRACES_SAMPLE_RATE }}' diff --git a/.github/workflows/deploy-cw-prod.yml b/.github/workflows/deploy-cw-prod.yml index 05e07332bcc..b8912d757b0 100644 --- a/.github/workflows/deploy-cw-prod.yml +++ b/.github/workflows/deploy-cw-prod.yml @@ -46,13 +46,14 @@ jobs: DB_TYPE: '${{ secrets.DB_TYPE }}' DB_URI: '${{ secrets.DB_URI }}' # Note: for now we are using DB in different provider, so we have to use public hostname - DB_HOST: '${{ secrets.DB_HOST_PUBLIC }}' + DB_HOST: '${{ secrets.DB_HOST_CW }}' DB_USER: '${{ secrets.DB_USER }}' DB_PASS: '${{ secrets.DB_PASS }}' DB_NAME: 'gauzy-pool' DB_PORT: '${{ secrets.DB_PORT }}' DB_CA_CERT: '${{ secrets.DB_CA_CERT }}' DB_SSL_MODE: '${{ secrets.DB_SSL_MODE }}' + CLOUD_PROVIDER: 'CW' SENTRY_DSN: '${{ secrets.SENTRY_DSN }}' SENTRY_TRACES_SAMPLE_RATE: '${{ secrets.SENTRY_TRACES_SAMPLE_RATE }}' SENTRY_HTTP_TRACING_ENABLED: '${{ secrets.SENTRY_HTTP_TRACING_ENABLED }}' diff --git a/.github/workflows/deploy-cw-stage.yml b/.github/workflows/deploy-cw-stage.yml index 7ddbdf8eb4c..331c702c160 100644 --- a/.github/workflows/deploy-cw-stage.yml +++ b/.github/workflows/deploy-cw-stage.yml @@ -46,7 +46,7 @@ jobs: DB_TYPE: '${{ secrets.DB_TYPE }}' DB_URI: '${{ secrets.DB_URI }}' # Note: for now we are using DB in different provider, so we have to use public hostname - DB_HOST: '${{ secrets.DB_HOST_PUBLIC }}' + DB_HOST: '${{ secrets.DB_HOST_CW }}' DB_USER: '${{ secrets.DB_USER }}' DB_PASS: '${{ secrets.DB_PASS }}' # Note that for staging we are using for now same server, just different DB name @@ -54,6 +54,7 @@ jobs: DB_PORT: '${{ secrets.DB_PORT }}' DB_CA_CERT: '${{ secrets.DB_CA_CERT }}' DB_SSL_MODE: '${{ secrets.DB_SSL_MODE }}' + CLOUD_PROVIDER: 'CW' SENTRY_DSN: '${{ secrets.SENTRY_DSN }}' SENTRY_TRACES_SAMPLE_RATE: '${{ secrets.SENTRY_TRACES_SAMPLE_RATE }}' SENTRY_HTTP_TRACING_ENABLED: '${{ secrets.SENTRY_HTTP_TRACING_ENABLED }}' diff --git a/.github/workflows/deploy-do-demo.yml b/.github/workflows/deploy-do-demo.yml index c91b2845a12..bc526f6ebed 100644 --- a/.github/workflows/deploy-do-demo.yml +++ b/.github/workflows/deploy-do-demo.yml @@ -3,7 +3,7 @@ name: Deploy to DigitalOcean Demo on: workflow_run: workflows: ['Build and Publish Docker Images Demo'] - branches: [develop, temp] + branches: [develop] types: - completed @@ -33,6 +33,7 @@ jobs: envsubst < $GITHUB_WORKSPACE/.deploy/k8s/k8s-manifest.demo.yaml | kubectl --context do-sfo2-k8s-gauzy apply -f - env: # below we are using GitHub secrets for both frontend and backend + CLOUD_PROVIDER: 'DO' DB_NAME: 'gauzy_demo' SENTRY_DSN: '${{ secrets.SENTRY_DSN }}' SENTRY_TRACES_SAMPLE_RATE: '${{ secrets.SENTRY_TRACES_SAMPLE_RATE }}' diff --git a/.github/workflows/deploy-do-prod.yml b/.github/workflows/deploy-do-prod.yml index e924bed81fa..1d18a2e2357 100644 --- a/.github/workflows/deploy-do-prod.yml +++ b/.github/workflows/deploy-do-prod.yml @@ -48,6 +48,7 @@ jobs: DB_PORT: '${{ secrets.DB_PORT }}' DB_CA_CERT: '${{ secrets.DB_CA_CERT }}' DB_SSL_MODE: '${{ secrets.DB_SSL_MODE }}' + CLOUD_PROVIDER: 'DO' SENTRY_DSN: '${{ secrets.SENTRY_DSN }}' SENTRY_TRACES_SAMPLE_RATE: '${{ secrets.SENTRY_TRACES_SAMPLE_RATE }}' SENTRY_HTTP_TRACING_ENABLED: '${{ secrets.SENTRY_HTTP_TRACING_ENABLED }}' diff --git a/.github/workflows/deploy-do-stage.yml b/.github/workflows/deploy-do-stage.yml index 72a9371601c..7c2bbe14b09 100644 --- a/.github/workflows/deploy-do-stage.yml +++ b/.github/workflows/deploy-do-stage.yml @@ -49,6 +49,7 @@ jobs: DB_PORT: '${{ secrets.DB_PORT }}' DB_CA_CERT: '${{ secrets.DB_CA_CERT }}' DB_SSL_MODE: '${{ secrets.DB_SSL_MODE }}' + CLOUD_PROVIDER: 'DO' SENTRY_DSN: '${{ secrets.SENTRY_DSN }}' SENTRY_TRACES_SAMPLE_RATE: '${{ secrets.SENTRY_TRACES_SAMPLE_RATE }}' SENTRY_HTTP_TRACING_ENABLED: '${{ secrets.SENTRY_HTTP_TRACING_ENABLED }}' diff --git a/docker-compose.demo.yml b/docker-compose.demo.yml index 3e90cbb6785..69faab4efa5 100644 --- a/docker-compose.demo.yml +++ b/docker-compose.demo.yml @@ -215,6 +215,7 @@ services: DB_HOST: db API_BASE_URL: ${API_BASE_URL:-http://localhost:3000} CLIENT_BASE_URL: ${CLIENT_BASE_URL:-http://localhost:4200} + CLOUD_PROVIDER: ${CLOUD_PROVIDER:-} SENTRY_DSN: ${SENTRY_DSN:-} SENTRY_HTTP_TRACING_ENABLED: ${SENTRY_HTTP_TRACING_ENABLED:-} SENTRY_POSTGRES_TRACKING_ENABLED: ${SENTRY_POSTGRES_TRACKING_ENABLED:-} diff --git a/docker-compose.yml b/docker-compose.yml index 9d36f48dad9..91ebe8382d8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -222,6 +222,7 @@ services: DB_HOST: db API_BASE_URL: ${API_BASE_URL:-http://localhost:3000} CLIENT_BASE_URL: ${CLIENT_BASE_URL:-http://localhost:4200} + CLOUD_PROVIDER: ${CLOUD_PROVIDER:-} SENTRY_DSN: ${SENTRY_DSN:-} SENTRY_HTTP_TRACING_ENABLED: ${SENTRY_HTTP_TRACING_ENABLED:-} SENTRY_POSTGRES_TRACKING_ENABLED: ${SENTRY_POSTGRES_TRACKING_ENABLED:-} diff --git a/packages/core/src/bootstrap/tracer.ts b/packages/core/src/bootstrap/tracer.ts index 20303ddd5a1..88ffd90db09 100644 --- a/packages/core/src/bootstrap/tracer.ts +++ b/packages/core/src/bootstrap/tracer.ts @@ -5,6 +5,7 @@ import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'; import { Resource } from '@opentelemetry/resources'; import { NodeSDK } from '@opentelemetry/sdk-node'; import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { environment as env } from '@gauzy/config'; // Important for Tracing: // 1. Define env var - OTEL_EXPORTER_OTLP_HEADERS="signoz-access-token=" @@ -23,11 +24,25 @@ const exporterOptions = { const traceExporter = new OTLPTraceExporter(exporterOptions); +let serviceName = 'Ever Gauzy API'; + +if (env.demo) { + serviceName = serviceName + ' DEMO'; +} else if (env.envName == 'dev') { + serviceName = serviceName + ' DEV'; +} else if (env.envName == 'prod') { + serviceName = serviceName + ' PROD'; +} + +if (process.env.CLOUD_PROVIDER) { + serviceName = serviceName + ' (' + process.env.CLOUD_PROVIDER.toUpperCase() + ')'; +} + const sdk = new NodeSDK({ traceExporter, instrumentations: [getNodeAutoInstrumentations()], resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: 'Ever Gauzy API' + [SemanticResourceAttributes.SERVICE_NAME]: serviceName }) });