diff --git a/.docker/openobserve-otel/docker-compose.yml b/.docker/openobserve-otel/docker-compose.yml index 13d776253..68788aba4 100644 --- a/.docker/openobserve-otel/docker-compose.yml +++ b/.docker/openobserve-otel/docker-compose.yml @@ -13,25 +13,29 @@ services: RUST_LOG: "info" ports: - "5080:5080" + - "5081:5081" volumes: - ./data:/data healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:5080/health" ] + start_period: 60s interval: 10s - timeout: 2s - retries: 3 + timeout: 5s + retries: 6 networks: - otel-network deploy: resources: limits: - memory: 512M + memory: 1024M reservations: - memory: 256M + memory: 512M otel-collector: image: otel/opentelemetry-collector-contrib:latest restart: unless-stopped + environment: + - TZ=Asia/Shanghai volumes: - ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml ports: @@ -48,9 +52,9 @@ services: deploy: resources: limits: - memory: 400M + memory: 10240M reservations: - memory: 200M + memory: 512M networks: otel-network: diff --git a/.docker/openobserve-otel/otel-collector-config.yaml b/.docker/openobserve-otel/otel-collector-config.yaml index 8cdca6f8a..288ac9a24 100644 --- a/.docker/openobserve-otel/otel-collector-config.yaml +++ b/.docker/openobserve-otel/otel-collector-config.yaml @@ -25,16 +25,24 @@ exporters: Authorization: "Bearer cm9vdEBydXN0ZnMuY29tOmxIV0RqQmZMWXJ6MnZOajU=" stream-name: default organization: default - tls: - insecure: true compression: gzip retry_on_failure: enabled: true initial_interval: 5s max_interval: 30s max_elapsed_time: 300s + timeout: 10s + +extensions: + health_check: + endpoint: 0.0.0.0:13133 + pprof: + endpoint: 0.0.0.0:1777 + zpages: + endpoint: 0.0.0.0:55679 service: + extensions: [ health_check, pprof, zpages ] pipelines: traces: receivers: [ otlp ] @@ -48,11 +56,8 @@ service: receivers: [ otlp, filelog ] processors: [ memory_limiter, batch ] exporters: [ otlphttp/openobserve ] - extensions: - health_check: - endpoint: 0.0.0.0:13133 - pprof: - endpoint: 0.0.0.0:1777 - zpages: - endpoint: 0.0.0.0:55679 - + telemetry: + logs: + level: "info" # Collector 日志级别 + metrics: + address: "0.0.0.0:8888" # Collector 自身指标暴露 diff --git a/.gitignore b/.gitignore index 46bfa8d44..d38ffae33 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ deploy/certs/* .env .rustfs.sys .cargo -profile.json \ No newline at end of file +profile.json +.docker/openobserve-otel/data \ No newline at end of file