Update OpenTelemetry Collector configuration

This commit is contained in:
Simon Larsen
2023-12-30 12:17:51 +00:00
parent 6c2ae8dec0
commit 3fe3bc06fa
5 changed files with 14 additions and 7 deletions

View File

@@ -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/
```

View File

@@ -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

View File

@@ -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

View File

@@ -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 {

View File

@@ -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}