#8206·rustfs

OTLP metrics export fails with HttpClient.NetworkError even though a manual curl to the same endpoint succeeds

Author: taiseiueCreated Sep 28, 2026Updated Sep 29, 2026
LabelsS-confirming

Summary

Metrics OTLP export never reaches the collector, even though the metrics pipeline initializes correctly and the export interval fires on schedule.

Environment

  • RustFS version: 1.0.0 (git commit d47f54bfb2f39f48bd1adda334bd27e151fe85b8, built 2026-09-16, release profile, linux-x86_64)
  • Deployment: Kubernetes (single pod), image rustfs/rustfs:latest
  • OTLP collector: Grafana Alloy v1.19.2 (otelcol.receiver.otlp with an HTTP listener on 0.0.0.0:4318)

Config

RUSTFS_OBS_ENDPOINT=http://alloy.monitoring.svc.cluster.local:4318
RUSTFS_OBS_ENVIRONMENT=production   # image default
RUSTFS_OBS_LOG_DIRECTORY=/logs      # image default

(Also tried, with no change in behavior: RUSTFS_OBS_METRICS_EXPORT_ENABLED=true, RUSTFS_OBS_METRIC_ENDPOINT=.../v1/metrics, OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=.../v1/metrics, shorter RUSTFS_OBS_METER_INTERVAL=15s.)

What I observed

With RUSTFS_OBS_LOG_STDOUT_ENABLED=true and RUSTFS_OBS_LOGGER_LEVEL=debug, the startup log confirms the pipeline is initialized:

{"level":"INFO","message":"Initialized observability","backend":"otlp_http",
 "trace_endpoint":"http://alloy.monitoring.svc.cluster.local:4318/v1/traces",
 "metric_endpoint":"http://alloy.monitoring.svc.cluster.local:4318/v1/metrics",
 "log_endpoint":"http://alloy.monitoring.svc.cluster.local:4318/v1/logs",
 "stdout_mirror_enabled":true,"is_production":true, ...}

And the OpenTelemetry.Metrics.PeriodicReader thread fires on schedule and attempts the export, but every attempt fails:

{"level":"DEBUG","name":"HttpClient.NetworkError",
 "url":"http://alloy.monitoring.svc.cluster.local:4318/v1/metrics",
 "error":"error sending request for url (http://alloy.monitoring.svc.cluster.local:4318/v1/metrics)",
 "target":"opentelemetry-otlp","threadName":"OpenTelemetry.Metrics.PeriodicReader", ...}

However, a plain curl from inside the same pod, to the exact same URL, succeeds:

bash
$ curl -sv -X POST http://alloy.monitoring.svc.cluster.local:4318/v1/metrics \
    -H "Content-Type: application/x-protobuf" --data-binary ""
< HTTP/1.1 200 OK
< Content-Type: application/x-protobuf
< Content-Length: 2

So DNS resolution, network routing, and the collector's listener are all fine — the failure appears specific to the OTLP exporter's own HTTP client (reqwest-based, gzip-compressed protobuf body). The collector (Alloy) shows zero corresponding log entries at the failure timestamps, suggesting the request never actually reaches it (fails before/during send, not as an HTTP-level rejection).

Traces (/v1/traces) fail the same way. Logs (/v1/logs) additionally 404 because our collector config doesn't wire up a logs consumer — that part is on our side, not a bug report.

Expected

Metrics export should succeed under the same network conditions where a manual curl POST to the identical endpoint succeeds.

Question / possible causes

  • Is there a known incompatibility between the OTLP HTTP exporter's client config (gzip Content-Encoding, HTTP/2 upgrade attempt, particular headers) and OTLP receivers that don't advertise HTTP/2 (h2c) support?
  • Is there additional exporter-side logging (beyond HttpClient.NetworkError) that would show the underlying reqwest/hyper error, rather than just the top-level "error sending request" message? That would help pin down whether this is a protocol negotiation issue or something else.

Happy to gather a packet capture from the pod if that would help narrow this down.