diff --git a/Common/Server/EnvironmentConfig.ts b/Common/Server/EnvironmentConfig.ts index 0d107d0694..8a989d372b 100644 --- a/Common/Server/EnvironmentConfig.ts +++ b/Common/Server/EnvironmentConfig.ts @@ -176,12 +176,6 @@ export const AppApiHostname: Hostname = Hostname.fromString( }`, ); -export const OpenTelemetryIngestHostname: Hostname = Hostname.fromString( - `${process.env["SERVER_APP_HOSTNAME"] || "localhost"}:${ - process.env["APP_PORT"] || 80 - }`, -); - export const WorkerHostname: Hostname = Hostname.fromString( `${process.env["SERVER_APP_HOSTNAME"] || "localhost"}:${ process.env["APP_PORT"] || 80 diff --git a/HelmChart/Public/oneuptime/templates/_helpers.tpl b/HelmChart/Public/oneuptime/templates/_helpers.tpl index 6cf34bbabe..fe6ff4ac80 100644 --- a/HelmChart/Public/oneuptime/templates/_helpers.tpl +++ b/HelmChart/Public/oneuptime/templates/_helpers.tpl @@ -116,14 +116,8 @@ Usage: value: {{ $.Release.Name }}-home.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }} - name: SERVER_APP_HOSTNAME value: {{ $.Release.Name }}-app.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }} -- name: TELEMETRY_HOSTNAME - value: {{ $.Release.Name }}-app.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }} -- name: SERVER_TELEMETRY_HOSTNAME - value: {{ $.Release.Name }}-app.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }} - name: APP_PORT value: {{ $.Values.app.ports.http | squote }} -- name: TELEMETRY_PORT - value: {{ $.Values.app.ports.http | squote }} - name: HOME_PORT value: {{ $.Values.home.ports.http | squote }} - name: WORKER_CONCURRENCY diff --git a/Nginx/default.conf.template b/Nginx/default.conf.template index 22b3dc1c70..350dfa6143 100644 --- a/Nginx/default.conf.template +++ b/Nginx/default.conf.template @@ -522,30 +522,30 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} location /telemetry { resolver ${NGINX_RESOLVER} valid=30s; - set $backend_telemetry http://${SERVER_APP_HOSTNAME}:${APP_PORT}; + set $backend_app http://${SERVER_APP_HOSTNAME}:${APP_PORT}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_pass $backend_telemetry; + proxy_pass $backend_app; } location /incoming-request-ingest { resolver ${NGINX_RESOLVER} valid=30s; - set $backend_telemetry http://${SERVER_APP_HOSTNAME}:${APP_PORT}; + set $backend_app http://${SERVER_APP_HOSTNAME}:${APP_PORT}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_pass $backend_telemetry; + proxy_pass $backend_app; } location /otlp { resolver ${NGINX_RESOLVER} valid=30s; - set $backend_telemetry http://${SERVER_APP_HOSTNAME}:${APP_PORT}; + set $backend_app http://${SERVER_APP_HOSTNAME}:${APP_PORT}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -556,25 +556,25 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - proxy_pass $backend_telemetry; + proxy_pass $backend_app; } # Pyroscope profiling ingestion endpoint location /pyroscope { resolver ${NGINX_RESOLVER} valid=30s; - set $backend_telemetry http://${SERVER_APP_HOSTNAME}:${APP_PORT}; + set $backend_app http://${SERVER_APP_HOSTNAME}:${APP_PORT}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_pass $backend_telemetry; + proxy_pass $backend_app; } location ~ /opentelemetry.proto.collector* { resolver ${NGINX_RESOLVER} valid=30s; - set $backend_otel_grpc grpc://${SERVER_APP_HOSTNAME}:4317; - grpc_pass $backend_otel_grpc; + set $backend_app_grpc grpc://${SERVER_APP_HOSTNAME}:4317; + grpc_pass $backend_app_grpc; } location /notification { @@ -602,7 +602,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} location /fluentd/logs { resolver ${NGINX_RESOLVER} valid=30s; - set $backend_telemetry http://${SERVER_APP_HOSTNAME}:${APP_PORT}; + set $backend_app http://${SERVER_APP_HOSTNAME}:${APP_PORT}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -614,12 +614,12 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} proxy_set_header Connection "upgrade"; rewrite ^/fluentd/logs(.*)$ /fluentd/v1/logs$1 break; - proxy_pass $backend_telemetry; + proxy_pass $backend_app; } location /syslog/v1/logs { resolver ${NGINX_RESOLVER} valid=30s; - set $backend_telemetry http://${SERVER_APP_HOSTNAME}:${APP_PORT}; + set $backend_app http://${SERVER_APP_HOSTNAME}:${APP_PORT}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -629,12 +629,12 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - proxy_pass $backend_telemetry; + proxy_pass $backend_app; } location /probe-ingest { resolver ${NGINX_RESOLVER} valid=30s; - set $backend_telemetry http://${SERVER_APP_HOSTNAME}:${APP_PORT}; + set $backend_app http://${SERVER_APP_HOSTNAME}:${APP_PORT}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -644,7 +644,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - proxy_pass $backend_telemetry; + proxy_pass $backend_app; client_max_body_size 50M; } @@ -652,7 +652,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} # For backward compatibility with probes that are already deployed location /ingestor { resolver ${NGINX_RESOLVER} valid=30s; - set $backend_telemetry http://${SERVER_APP_HOSTNAME}:${APP_PORT}; + set $backend_app http://${SERVER_APP_HOSTNAME}:${APP_PORT}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -662,14 +662,14 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - proxy_pass $backend_telemetry; + proxy_pass $backend_app; client_max_body_size 50M; } location /server-monitor { resolver ${NGINX_RESOLVER} valid=30s; - set $backend_telemetry http://${SERVER_APP_HOSTNAME}:${APP_PORT}; + set $backend_app http://${SERVER_APP_HOSTNAME}:${APP_PORT}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -679,7 +679,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - proxy_pass $backend_telemetry; + proxy_pass $backend_app; client_max_body_size 50M; } @@ -914,7 +914,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} location /heartbeat { resolver ${NGINX_RESOLVER} valid=30s; - set $backend_telemetry http://${SERVER_APP_HOSTNAME}:${APP_PORT}; + set $backend_app http://${SERVER_APP_HOSTNAME}:${APP_PORT}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -925,7 +925,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; rewrite ^/heartbeat(.*)$ /incoming-request$1 break; - proxy_pass $backend_telemetry; + proxy_pass $backend_app; client_max_body_size 50M; } @@ -933,7 +933,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} location /incoming-email { # Incoming Email Monitor webhook endpoint resolver ${NGINX_RESOLVER} valid=30s; - set $backend_telemetry http://${SERVER_APP_HOSTNAME}:${APP_PORT}; + set $backend_app http://${SERVER_APP_HOSTNAME}:${APP_PORT}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -942,7 +942,7 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - proxy_pass $backend_telemetry; + proxy_pass $backend_app; client_max_body_size 50M; } diff --git a/OTelCollector/otel-collector-config.template.yaml b/OTelCollector/otel-collector-config.template.yaml index 17e57df564..a356b4b1cf 100644 --- a/OTelCollector/otel-collector-config.template.yaml +++ b/OTelCollector/otel-collector-config.template.yaml @@ -34,7 +34,7 @@ receivers: exporters: otlphttp: - endpoint: "http://{{ .Env.SERVER_TELEMETRY_HOSTNAME }}:{{ .Env.TELEMETRY_PORT }}/otlp" + endpoint: "http://{{ .Env.SERVER_APP_HOSTNAME }}:{{ .Env.APP_PORT }}/otlp" headers: {"Content-Type": "application/json"} auth: authenticator: headers_setter diff --git a/config.example.env b/config.example.env index d3010769c5..bf8511c442 100644 --- a/config.example.env +++ b/config.example.env @@ -99,14 +99,10 @@ REDIS_TLS_CA= REDIS_TLS_SENTINEL_MODE=false # Hostnames. Usually does not need to change. -TELEMETRY_HOSTNAME=app:3002 - SERVER_APP_HOSTNAME=app -SERVER_TELEMETRY_HOSTNAME=app #Ports. Usually they don't need to change. APP_PORT=3002 -TELEMETRY_PORT=3002 TEST_SERVER_PORT=3800 HOME_PORT=1444 # Plans diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 7e00c4c4d0..25dafbed8f 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -30,12 +30,10 @@ x-common-variables: &common-variables ALLOWED_ACTIVE_MONITOR_COUNT_IN_FREE_PLAN: ${ALLOWED_ACTIVE_MONITOR_COUNT_IN_FREE_PLAN} SERVER_APP_HOSTNAME: app - SERVER_TELEMETRY_HOSTNAME: app SERVER_HOME_HOSTNAME: home #Ports. Usually they don't need to change. APP_PORT: ${APP_PORT} HOME_PORT: ${HOME_PORT} - TELEMETRY_PORT: ${APP_PORT} OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT: ${OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT} OPENTELEMETRY_EXPORTER_OTLP_HEADERS: ${OPENTELEMETRY_EXPORTER_OTLP_HEADERS}