mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-26 05:56:50 +00:00
564a02f344
This commit introduces two key enhancements: the integration of Grafana Tempo for distributed tracing and the implementation of a dual-stack TCP listener for improved network compatibility. - **Observability**: - Adds the `tempo` service to the `docker-compose.yml` observability stack. - Tempo is configured to collect and store traces, integrating with the existing OpenTelemetry setup. - A custom `tempo-entrypoint.sh` script is included to manage volume permissions on startup. - **Networking**: - Modifies `http.rs` to support dual-stack (IPv4/IPv6) connections on a single socket. - By setting the `IPV6_V6ONLY` socket option to `false`, the server can now accept both IPv6 and IPv4-mapped IPv6 traffic, enhancing cross-platform support.
82 lines
2.4 KiB
YAML
82 lines
2.4 KiB
YAML
# Copyright 2024 RustFS Team
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
receivers:
|
|
otlp:
|
|
protocols:
|
|
grpc: # OTLP gRPC 接收器
|
|
endpoint: 0.0.0.0:4317
|
|
http: # OTLP HTTP 接收器
|
|
endpoint: 0.0.0.0:4318
|
|
|
|
processors:
|
|
batch: # 批处理处理器,提升吞吐量
|
|
timeout: 5s
|
|
send_batch_size: 1000
|
|
memory_limiter:
|
|
check_interval: 1s
|
|
limit_mib: 512
|
|
|
|
exporters:
|
|
otlp/traces: # OTLP 导出器,用于跟踪数据
|
|
endpoint: "jaeger:4317" # Jaeger 的 OTLP gRPC 端点
|
|
tls:
|
|
insecure: true # 开发环境禁用 TLS,生产环境需配置证书
|
|
otlp/tempo: # OTLP 导出器,用于跟踪数据
|
|
endpoint: "tempo:4317" # tempo 的 OTLP gRPC 端点
|
|
tls:
|
|
insecure: true # 开发环境禁用 TLS,生产环境需配置证书
|
|
prometheus: # Prometheus 导出器,用于指标数据
|
|
endpoint: "0.0.0.0:8889" # Prometheus 刮取端点
|
|
namespace: "rustfs" # 指标前缀
|
|
send_timestamps: true # 发送时间戳
|
|
# enable_open_metrics: true
|
|
loki: # Loki 导出器,用于日志数据
|
|
# endpoint: "http://loki:3100/otlp/v1/logs"
|
|
endpoint: "http://loki:3100/loki/api/v1/push"
|
|
tls:
|
|
insecure: true
|
|
extensions:
|
|
health_check:
|
|
pprof:
|
|
zpages:
|
|
service:
|
|
extensions: [ health_check, pprof, zpages ] # 启用扩展
|
|
pipelines:
|
|
traces:
|
|
receivers: [ otlp ]
|
|
processors: [ memory_limiter,batch ]
|
|
exporters: [ otlp/traces,otlp/tempo ]
|
|
metrics:
|
|
receivers: [ otlp ]
|
|
processors: [ batch ]
|
|
exporters: [ prometheus ]
|
|
logs:
|
|
receivers: [ otlp ]
|
|
processors: [ batch ]
|
|
exporters: [ loki ]
|
|
telemetry:
|
|
logs:
|
|
level: "info" # Collector 日志级别
|
|
metrics:
|
|
level: "detailed" # 可以是 basic, normal, detailed
|
|
readers:
|
|
- periodic:
|
|
exporter:
|
|
otlp:
|
|
protocol: http/protobuf
|
|
endpoint: http://otel-collector:4318
|
|
|
|
|