Skip to content

Commit

Permalink
feat: add OpenTelemetry Collector configuration and environment varia…
Browse files Browse the repository at this point in the history
…bles
  • Loading branch information
simlarsen committed Jan 20, 2025
1 parent 7f05ae7 commit ba3f7a8
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
8 changes: 8 additions & 0 deletions HelmChart/Public/oneuptime/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ metalLb:
addresses:
# - 51.158.55.153/32 # List of IP addresses of all the servers in the cluster.




nginx:
service:
loadBalancerIP:
Expand Down Expand Up @@ -409,3 +412,8 @@ readinessProbe: # Readiness probe configuration
periodSeconds: 60
initialDelaySeconds: 10
timeoutSeconds: 120

openTelemetryCollectorConfig:
enabled: true
queueLength: 1000
numConsumers: 10
19 changes: 19 additions & 0 deletions OTelCollector/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,30 @@ exporters:
headers: {"Content-Type": "application/json"}
auth:
authenticator: headers_setter
sending_queue:
enabled: true
num_consumers: ${env:OTEL_EXPORTER_OTLP_SENDING_QUEUE_NUM_CONSUMERS}
queue_size: ${env:OTEL_EXPORTER_OTLP_SENDING_QUEUE_SIZE}

service:
telemetry:
logs:
level: "debug"
metrics:
readers:
- pull:
exporter:
otlphttp:
endpoint: "http://${env:SERVER_OPEN_TELEMETRY_INGEST_HOSTNAME}:${env:OPEN_TELEMETRY_INGEST_PORT}/otlp"
headers: {"Content-Type": "application/json"}
auth:
authenticator: headers_setter
sending_queue:
enabled: true
num_consumers: ${env:OTEL_EXPORTER_OTLP_SENDING_QUEUE_NUM_CONSUMERS}
queue_size: ${env:OTEL_EXPORTER_OTLP_SENDING_QUEUE_SIZE}


extensions: [ headers_setter ]
pipelines:
traces:
Expand Down
4 changes: 4 additions & 0 deletions config.example.env
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,8 @@ DISABLE_TELEMETRY_FOR_ISOLATED_VM=true
DISABLE_TELEMETRY_FOR_INGRESS=true
DISABLE_TELEMETRY_FOR_WORKER=true

# OpenTelemetry Collector Env Vars
OTEL_EXPORTER_OTLP_SENDING_QUEUE_NUM_CONSUMERS=10
OTEL_EXPORTER_OTLP_SENDING_QUEUE_SIZE=1000


2 changes: 2 additions & 0 deletions docker-compose.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,8 @@ services:
- oneuptime
environment:
<<: *common-variables
OTEL_EXPORTER_OTLP_SENDING_QUEUE_NUM_CONSUMERS: ${OTEL_EXPORTER_OTLP_SENDING_QUEUE_NUM_CONSUMERS}
OTEL_EXPORTER_OTLP_SENDING_QUEUE_SIZE: ${OTEL_EXPORTER_OTLP_SENDING_QUEUE_SIZE}
restart: always
logging:
driver: "local"
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ services:
network: host
context: .
dockerfile: ./OTelCollector/Dockerfile
ports:
- 8874:8888

accounts:
ports:
Expand Down

0 comments on commit ba3f7a8

Please sign in to comment.