feat: enhance OpenTelemetry Collector configuration with sending queue parameters

This commit is contained in:
Simon Larsen
2025-01-21 15:20:50 +00:00
parent 4674578c90
commit 0d37587199
4 changed files with 21 additions and 1 deletions

View File

@@ -60,6 +60,12 @@ spec:
{{- include "oneuptime.env.oneuptimeSecret" . | nindent 12 }}
- name: PORT
value: {{ $.Values.port.otelCollectorGrpc | quote }}
- name: OPENTELEMETRY_COLLECTOR_SENDING_QUEUE_ENABLED
value: {{ $.Values.otelCollectorSendingQueueEnabled | quote }}
- name: OPENTELEMETRY_COLLECTOR_SENDING_QUEUE_NUM_CONSUMERS
value: {{ $.Values.otelCollectorSendingQueueNumConsumers | quote }}
- name: OPENTELEMETRY_COLLECTOR_SENDING_QUEUE_SIZE
value: {{ $.Values.otelCollectorSendingQueueSize | quote }}
ports:
- containerPort: {{ $.Values.port.otelCollectorHttp }}
protocol: TCP

View File

@@ -409,3 +409,11 @@ readinessProbe: # Readiness probe configuration
periodSeconds: 60
initialDelaySeconds: 10
timeoutSeconds: 120
# OpenTelemetry Collector Configuration
openTelemetryCollectorConfig:
sendingQueue:
enabled: true
size: 1000
numConsumers: 3

View File

@@ -46,7 +46,8 @@ service:
level: "debug"
{{ end }}
{{ if not .Env.OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT }}
{{ if not .Env.DISABLE_TELEMETRY "true"}}
{{ if .Env.OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT }}
service:
telemetry:
logs:
@@ -62,6 +63,7 @@ service:
headers: {{ .Env.OPENTELEMETRY_EXPORTER_OTLP_HEADERS }}
{{ end }}
{{ end}}
{{ end }}
extensions: [ headers_setter ]
pipelines:

View File

@@ -399,6 +399,10 @@ services:
- oneuptime
environment:
<<: *common-variables
DISABLE_TELEMETRY: ${DISABLE_TELEMETRY_FOR_OTEL_COLLECTOR}
OPENTELEMETRY_COLLECTOR_SENDING_QUEUE_ENABLED: ${OPENTELEMETRY_COLLECTOR_SENDING_QUEUE_ENABLED}
OPENTELEMETRY_COLLECTOR_SENDING_QUEUE_SIZE: ${OPENTELEMETRY_COLLECTOR_SENDING_QUEUE_SIZE}
OPENTELEMETRY_COLLECTOR_SENDING_QUEUE_NUM_CONSUMERS: ${OPENTELEMETRY_COLLECTOR_SENDING_QUEUE_NUM_CONSUMERS}
restart: always
logging:
driver: "local"