diff --git a/Examples/otel-dotnet/README.md b/Examples/otel-dotnet/README.md index 5ea35b974f..aae3b9f3eb 100644 --- a/Examples/otel-dotnet/README.md +++ b/Examples/otel-dotnet/README.md @@ -5,5 +5,5 @@ Please use ```bash -export OTEL_EXPORTER_OTLP_HEADERS=x-oneuptime-service-token=9c8806e0-a4aa-11ee-be95-010d5967b068 && dotnet run --urls=http://localhost:7856/ +export OTEL_EXPORTER_OTLP_HEADERS=x-oneuptime-service-token=9c8806e0-a4aa-11ee-be95-010d5967b068 && export OTEL_EXPORTER_OTLP_ENDPOINT=https://localhost/opentelemetry-collector dotnet run --urls=http://localhost:7856/ ``` \ No newline at end of file diff --git a/HelmChart/Public/oneuptime/templates/_helpers.tpl b/HelmChart/Public/oneuptime/templates/_helpers.tpl index f48f11f79c..641c2fd932 100644 --- a/HelmChart/Public/oneuptime/templates/_helpers.tpl +++ b/HelmChart/Public/oneuptime/templates/_helpers.tpl @@ -1,6 +1,8 @@ {{- define "oneuptime.env.common" }} - name: HOST value: {{ $.Values.host }} +- name: OTEL_COLLECTOR_HOST + value: {{ $.Values.openTelemetryCollectorHost }} - name: HTTP_PROTOCOL value: {{ $.Values.httpProtocol }} - name: NODE_ENV diff --git a/HelmChart/Public/oneuptime/values.yaml b/HelmChart/Public/oneuptime/values.yaml index c51a7d6e37..31424b26e8 100644 --- a/HelmChart/Public/oneuptime/values.yaml +++ b/HelmChart/Public/oneuptime/values.yaml @@ -3,10 +3,13 @@ global: clusterDomain: &global-cluster-domain cluster.local -# Please change this to the domain name / IP where OneUtpime server is hosted on. +# Please change this to the domain name / IP where OneUptime server is hosted on. host: localhost httpProtocol: http +# (Optional): You usually do not need to set this if you're self hosting. +openTelemetryCollectorHost: + volume: certs: storage: 1Gi diff --git a/Nginx/default.conf.template b/Nginx/default.conf.template index 590a31e463..ef56fc20e8 100644 --- a/Nginx/default.conf.template +++ b/Nginx/default.conf.template @@ -32,7 +32,7 @@ upstream workers { } -upstream otel-collector { +upstream opentelemetry-collector { server ${SERVER_OTEL_COLLECTOR_HOSTNAME}:${OTEL_COLLECTOR_PORT} weight=10 max_fails=3 fail_timeout=30s; } @@ -47,7 +47,7 @@ server { listen 80 default_server; - server_name oneuptime-otel-collector ${OTEL_COLLECTOR_HOST}; + server_name oneuptime-opentelemetry-collector ${OTEL_COLLECTOR_HOST}; proxy_busy_buffers_size 512k; proxy_buffers 4 512k; @@ -67,7 +67,7 @@ server { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - proxy_pass http://otel-collector; + proxy_pass http://opentelemetry-collector; } } @@ -357,7 +357,7 @@ server { proxy_pass http://accounts; } - location /otel-collector { + location /opentelemetry-collector { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -367,7 +367,7 @@ server { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - proxy_pass http://otel-collector; + proxy_pass http://opentelemetry-collector; } location /notification { diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 2033284301..5e4448eb34 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -5,6 +5,8 @@ x-common-variables: &common-variables HTTP_PROTOCOL: ${HTTP_PROTOCOL} + OTEL_COLLECTOR_HOST: ${OTEL_COLLECTOR_HOST} + NODE_ENV: ${ENVIRONMENT} BILLING_ENABLED: ${BILLING_ENABLED} BILLING_PUBLIC_KEY: ${BILLING_PUBLIC_KEY}