diff --git a/HelmChart/Public/oneuptime/templates/_helpers.tpl b/HelmChart/Public/oneuptime/templates/_helpers.tpl index e115f2b670..7f0d3e7add 100644 --- a/HelmChart/Public/oneuptime/templates/_helpers.tpl +++ b/HelmChart/Public/oneuptime/templates/_helpers.tpl @@ -89,7 +89,7 @@ Usage: value: {{ printf "false" | squote }} - name: OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT - value: {{ $.Values.openTelemetryExporter.endpoint.client }} + value: {{ $.Values.openTelemetryExporter.endpoint }} {{- end }} {{- define "oneuptime.env.oneuptimeSecret" }} @@ -109,7 +109,7 @@ Usage: value: {{ printf "true" | squote }} - name: OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT - value: {{ $.Values.openTelemetryExporter.endpoint.server }} + value: {{ $.Values.openTelemetryExporter.endpoint }} - name: NOTIFICATION_WEBHOOK_ON_CREATED_USER value: {{ $.Values.notifications.webhooks.onCreateUser }} diff --git a/HelmChart/Public/oneuptime/templates/accounts.yaml b/HelmChart/Public/oneuptime/templates/accounts.yaml index 409cadb3f5..169ab61f77 100644 --- a/HelmChart/Public/oneuptime/templates/accounts.yaml +++ b/HelmChart/Public/oneuptime/templates/accounts.yaml @@ -1,5 +1,5 @@ # OneUptime accounts Deployment -{{- $accountsEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers.accounts "PORT" $.Values.port.accounts -}} +{{- $accountsEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers "PORT" $.Values.port.accounts -}} {{- $accountsPorts := dict "port" $.Values.port.accounts -}} {{- $accountsDeploymentArgs :=dict "IsUI" true "ServiceName" "accounts" "Ports" $accountsPorts "Release" $.Release "Values" $.Values "Env" $accountsEnv -}} {{- include "oneuptime.deployment" $accountsDeploymentArgs }} diff --git a/HelmChart/Public/oneuptime/templates/admin-dashboard.yaml b/HelmChart/Public/oneuptime/templates/admin-dashboard.yaml index 88beab735c..367aa6c12e 100644 --- a/HelmChart/Public/oneuptime/templates/admin-dashboard.yaml +++ b/HelmChart/Public/oneuptime/templates/admin-dashboard.yaml @@ -1,5 +1,5 @@ # OneUptime adminDashboard Deployment -{{- $adminDashboardEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers.adminDashboard "PORT" $.Values.port.adminDashboard -}} +{{- $adminDashboardEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers "PORT" $.Values.port.adminDashboard -}} {{- $adminDashboardPorts := dict "port" $.Values.port.adminDashboard -}} {{- $adminDashboardDeploymentArgs :=dict "IsUI" true "ServiceName" "admin-dashboard" "Ports" $adminDashboardPorts "Release" $.Release "Values" $.Values "Env" $adminDashboardEnv -}} {{- include "oneuptime.deployment" $adminDashboardDeploymentArgs }} diff --git a/HelmChart/Public/oneuptime/templates/app.yaml b/HelmChart/Public/oneuptime/templates/app.yaml index 52a05f4dee..fc6070796e 100644 --- a/HelmChart/Public/oneuptime/templates/app.yaml +++ b/HelmChart/Public/oneuptime/templates/app.yaml @@ -62,7 +62,7 @@ spec: {{- include "oneuptime.env.commonServer" . | nindent 12 }} {{- include "oneuptime.env.oneuptimeSecret" . | nindent 12 }} - name: OPENTELEMETRY_EXPORTER_OTLP_HEADERS - value: {{ $.Values.openTelemetryExporter.headers.app }} + value: {{ $.Values.openTelemetryExporter.headers }} - name: PORT value: {{ $.Values.port.app | quote }} - name: SMS_HIGH_RISK_COST_IN_CENTS diff --git a/HelmChart/Public/oneuptime/templates/dashboard.yaml b/HelmChart/Public/oneuptime/templates/dashboard.yaml index 8190384026..3097a09e02 100644 --- a/HelmChart/Public/oneuptime/templates/dashboard.yaml +++ b/HelmChart/Public/oneuptime/templates/dashboard.yaml @@ -1,6 +1,6 @@ # OneUptime dashboard Deployment {{- $dashboardPorts := dict "port" $.Values.port.dashboard -}} -{{- $dashboardEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers.dashboard "PORT" $.Values.port.dashboard -}} +{{- $dashboardEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers "PORT" $.Values.port.dashboard -}} {{- $dashboardDeploymentArgs :=dict "IsUI" true "ServiceName" "dashboard" "Ports" $dashboardPorts "Release" $.Release "Values" $.Values "Env" $dashboardEnv -}} {{- include "oneuptime.deployment" $dashboardDeploymentArgs }} --- diff --git a/HelmChart/Public/oneuptime/templates/ingestor.yaml b/HelmChart/Public/oneuptime/templates/ingestor.yaml index b871eeaba3..38a1fbdd2a 100644 --- a/HelmChart/Public/oneuptime/templates/ingestor.yaml +++ b/HelmChart/Public/oneuptime/templates/ingestor.yaml @@ -71,7 +71,7 @@ spec: {{- include "oneuptime.env.commonServer" . | nindent 12 }} {{- include "oneuptime.env.oneuptimeSecret" . | nindent 12 }} - name: OPENTELEMETRY_EXPORTER_OTLP_HEADERS - value: {{ $.Values.openTelemetryExporter.headers.ingestor }} + value: {{ $.Values.openTelemetryExporter.headers }} - name: PORT value: {{ $.Values.port.ingestor | quote }} ports: diff --git a/HelmChart/Public/oneuptime/templates/isolated-vm.yaml b/HelmChart/Public/oneuptime/templates/isolated-vm.yaml index 3a5a5e9d3a..a4ff257d44 100644 --- a/HelmChart/Public/oneuptime/templates/isolated-vm.yaml +++ b/HelmChart/Public/oneuptime/templates/isolated-vm.yaml @@ -46,7 +46,7 @@ spec: {{- include "oneuptime.env.common" . | nindent 12 }} {{- include "oneuptime.env.oneuptimeSecret" . | nindent 12 }} - name: OPENTELEMETRY_EXPORTER_OTLP_HEADERS - value: {{ $.Values.openTelemetryExporter.headers.isolatedVM }} + value: {{ $.Values.openTelemetryExporter.headers }} - name: PORT value: {{ $.Values.port.isolatedVM | quote }} diff --git a/HelmChart/Public/oneuptime/templates/nginx.yaml b/HelmChart/Public/oneuptime/templates/nginx.yaml index b46cf5affa..9e4eb59402 100644 --- a/HelmChart/Public/oneuptime/templates/nginx.yaml +++ b/HelmChart/Public/oneuptime/templates/nginx.yaml @@ -87,7 +87,7 @@ spec: - name: ONEUPTIME_HTTP_PORT value: {{ $.Values.port.nginxHttp | quote }} - name: OPENTELEMETRY_EXPORTER_OTLP_HEADERS - value: {{ $.Values.openTelemetryExporter.headers.nginx }} + value: {{ $.Values.openTelemetryExporter.headers }} - name: PORT value: "7851" # Port for the nodejs server for live and ready status ports: diff --git a/HelmChart/Public/oneuptime/templates/probe.yaml b/HelmChart/Public/oneuptime/templates/probe.yaml index f73560bdd0..a0fe7f59e7 100644 --- a/HelmChart/Public/oneuptime/templates/probe.yaml +++ b/HelmChart/Public/oneuptime/templates/probe.yaml @@ -49,7 +49,7 @@ spec: - name: OPENTELEMETRY_EXPORTER_OTLP_HEADERS value: {{ $val.openTelemetryExporter.headers }} - name: OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT - value: {{ $.Values.openTelemetryExporter.endpoint.server }} + value: {{ $.Values.openTelemetryExporter.endpoint }} - name: ONEUPTIME_URL value: http://{{ $.Release.Name }}-ingestor.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }}:{{ $.Values.port.ingestor }} - name: PROBE_NAME diff --git a/HelmChart/Public/oneuptime/templates/status-page.yaml b/HelmChart/Public/oneuptime/templates/status-page.yaml index d75bf6b76b..f3da999799 100644 --- a/HelmChart/Public/oneuptime/templates/status-page.yaml +++ b/HelmChart/Public/oneuptime/templates/status-page.yaml @@ -1,6 +1,6 @@ # OneUptime statusPage Deployment {{- $statusPagePorts := dict "port" $.Values.port.statusPage -}} -{{- $statusPageEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers.statusPage "PORT" $.Values.port.statusPage -}} +{{- $statusPageEnv := dict "OPENTELEMETRY_EXPORTER_OTLP_HEADERS" $.Values.openTelemetryExporter.headers "PORT" $.Values.port.statusPage -}} {{- $statusPageDeploymentArgs :=dict "IsUI" true "ServiceName" "status-page" "Ports" $statusPagePorts "Release" $.Release "Values" $.Values "Env" $statusPageEnv -}} {{- include "oneuptime.deployment" $statusPageDeploymentArgs }} --- diff --git a/HelmChart/Public/oneuptime/values.yaml b/HelmChart/Public/oneuptime/values.yaml index d4fa0de3aa..ecafb2b6de 100644 --- a/HelmChart/Public/oneuptime/values.yaml +++ b/HelmChart/Public/oneuptime/values.yaml @@ -161,9 +161,6 @@ probes: replicaCount: 1 syntheticMonitorScriptTimeoutInMs: 60000 customCodeMonitorScriptTimeoutInMs: 60000 - # Feel free to leave this blank if you're not integrating this with OpenTelemetry Backend. - openTelemetryExporter: - headers: # two: # name: "Probe 2" # description: "Probe 2" @@ -173,8 +170,6 @@ probes: # replicaCount: 1 # syntheticMonitorScriptTimeoutInMs: 60000 # customCodeMonitorScriptTimeoutInMs: 60000 - # openTelemetryExporter: - # headers: port: app: 3002 @@ -200,17 +195,9 @@ testServer: openTelemetryExporter: - endpoint: - server: - client: + endpoint: + # This can be for example: x-oneuptime-token= headers: - app: - dashboard: - accounts: - statusPage: - adminDashboard: - ingestor: - nginx: containerSecurityContext: podSecurityContext: diff --git a/OTelCollector/config.yaml b/OTelCollector/config.yaml index 4ad3a9fe32..164b46a287 100644 --- a/OTelCollector/config.yaml +++ b/OTelCollector/config.yaml @@ -2,8 +2,8 @@ extensions: headers_setter: headers: - action: upsert - key: x-oneuptime-service-token - from_context: x-oneuptime-service-token + key: x-oneuptime-token + from_context: x-oneuptime-token processors: diff --git a/config.example.env b/config.example.env index 41b1a080e4..e2e0307a11 100644 --- a/config.example.env +++ b/config.example.env @@ -199,19 +199,12 @@ SERVER_OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT= # You can set the env var to http://localhost/otlp if you want instrumentation to be sent to local otel collector. CLIENT_OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT= -# You can set the env var to "x-oneuptime-token=" -APP_OPENTELEMETRY_EXPORTER_OTLP_HEADERS= -PROBE_OPENTELEMETRY_EXPORTER_OTLP_HEADERS= -DASHBOARD_OPENTELEMETRY_EXPORTER_OTLP_HEADERS= -STATUS_PAGE_OPENTELEMETRY_EXPORTER_OTLP_HEADERS= -ACCOUNTS_OPENTELEMETRY_EXPORTER_OTLP_HEADERS= -ADMIN_DASHBOARD_OPENTELEMETRY_EXPORTER_OTLP_HEADERS= - +# You can set the env var to "x-oneuptime-token=" +OPENTELEMETRY_EXPORTER_OTLP_HEADERS= # This can be one of ERROR, WARN, INFO, DEBUG LOG_LEVEL=ERROR - # Thse env vars are for E2E tests E2E_TEST_IS_USER_REGISTERED=false E2E_TEST_REGISTERED_USER_EMAIL= diff --git a/docker-compose.base.yml b/docker-compose.base.yml index eefd9c1989..ce89a0a90e 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -173,7 +173,7 @@ services: <<: *common-ui-variables PORT: ${ACCOUNTS_PORT} OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT: ${CLIENT_OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT} - OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${ACCOUNTS_OPENTELEMETRY_EXPORTER_OTLP_HEADERS} + OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${OPENTELEMETRY_EXPORTER_OTLP_HEADERS} logging: driver: "local" @@ -205,7 +205,7 @@ services: <<: *common-ui-variables PORT: ${ADMIN_DASHBOARD_PORT} OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT: ${CLIENT_OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT} - OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${ADMIN_DASHBOARD_OPENTELEMETRY_EXPORTER_OTLP_HEADERS} + OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${OPENTELEMETRY_EXPORTER_OTLP_HEADERS} logging: driver: "local" options: @@ -219,7 +219,7 @@ services: <<: *common-ui-variables PORT: ${DASHBOARD_PORT} OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT: ${CLIENT_OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT} - OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${DASHBOARD_OPENTELEMETRY_EXPORTER_OTLP_HEADERS} + OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${OPENTELEMETRY_EXPORTER_OTLP_HEADERS} logging: driver: "local" options: @@ -235,7 +235,7 @@ services: <<: *common-ui-variables PORT: ${STATUS_PAGE_PORT} OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT: ${CLIENT_OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT} - OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${STATUS_PAGE_OPENTELEMETRY_EXPORTER_OTLP_HEADERS} + OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${OPENTELEMETRY_EXPORTER_OTLP_HEADERS} logging: driver: "local" options: @@ -271,7 +271,7 @@ services: INTERNAL_SMTP_FROM_NAME: ${INTERNAL_SMTP_FROM_NAME} INTERNAL_SMTP_PASSWORD: ${INTERNAL_SMTP_PASSWORD} OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT: ${SERVER_OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT} - OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${APP_OPENTELEMETRY_EXPORTER_OTLP_HEADERS} + OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${OPENTELEMETRY_EXPORTER_OTLP_HEADERS} logging: driver: "local" options: @@ -293,7 +293,7 @@ services: ONEUPTIME_URL: ${GLOBAL_PROBE_1_ONEUPTIME_URL} PROBE_MONITOR_FETCH_LIMIT: ${GLOBAL_PROBE_1_MONITOR_FETCH_LIMIT} OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT: ${SERVER_OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT} - OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${PROBE_OPENTELEMETRY_EXPORTER_OTLP_HEADERS} + OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${OPENTELEMETRY_EXPORTER_OTLP_HEADERS} logging: driver: "local" options: @@ -315,7 +315,7 @@ services: PROBE_CUSTOM_CODE_MONITOR_SCRIPT_TIMEOUT_IN_MS: ${GLOBAL_PROBE_2_CUSTOM_CODE_MONITOR_SCRIPT_TIMEOUT_IN_MS} PROBE_MONITOR_FETCH_LIMIT: ${GLOBAL_PROBE_2_MONITOR_FETCH_LIMIT} OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT: ${SERVER_OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT} - OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${PROBE_OPENTELEMETRY_EXPORTER_OTLP_HEADERS} + OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${OPENTELEMETRY_EXPORTER_OTLP_HEADERS} logging: driver: "local" options: