From f5976160dad213866430bdf74dd59b13a374c4a0 Mon Sep 17 00:00:00 2001 From: Wulf Thimm Date: Thu, 2 Dec 2021 09:01:14 +0000 Subject: [PATCH] made tracing optional --- .werft/build.ts | 4 +++- .werft/values.dev.yaml | 1 + chart/templates/_helpers.tpl | 2 +- chart/values.yaml | 6 +++++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.werft/build.ts b/.werft/build.ts index 3924f2d4ace3ac..c3cf13fcf6a3a7 100644 --- a/.werft/build.ts +++ b/.werft/build.ts @@ -548,7 +548,9 @@ export async function deployToDev(deploymentConfig: DeploymentConfig, workspaceF } else if (!!deploymentConfig.analytics) { flags += ` --set analytics.writer=${deploymentConfig.analytics!}`; } - + if (deploymentConfig.withObservability) { + flags += ` --set tracing.enabled=true`; + } werft.log("helm", "extracting versions"); try { exec(`docker run --rm eu.gcr.io/gitpod-core-dev/build/versions:${version} cat /versions.yaml | tee versions.yaml`); diff --git a/.werft/values.dev.yaml b/.werft/values.dev.yaml index ac911a8538e4c6..3e25c277a58d1e 100644 --- a/.werft/values.dev.yaml +++ b/.werft/values.dev.yaml @@ -13,6 +13,7 @@ imagePullPolicy: Always authProviders: [] tracing: + enabled: false endpoint: http://otel-collector:14268/api/traces samplerType: const samplerParam: "1" diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 43951935c9106a..b84a9414e33916 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -258,7 +258,7 @@ env: {{- $gp := .gp -}} {{- $comp := .comp -}} {{- $tracing := $comp.tracing | default $gp.tracing -}} -{{- if $tracing }} +{{- if $tracing.enabled }} {{- if $tracing.endpoint }} - name: JAEGER_ENDPOINT value: {{ $tracing.endpoint }} diff --git a/chart/values.yaml b/chart/values.yaml index f8e28dbad11aee..d7a5c4e8082d9c 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -74,7 +74,11 @@ dbEncryptionKeys: secretName: null file: secrets/encryption-key.json -tracing: {} +tracing: + enabled: false + endpoint: http:// + samplerType: const + samplerParam: "1" authProviders: [] # Example authProvider configurations below: # - id: "Public-GitHub"