[self-hosted][railway][prometheus] Warning: "can't collect container meta in CLOUD_UNSPECIFIED" on R
eugene-bond
PROOP

2 months ago

Use this:

On a self-hosted Encore TypeScript app deployed on Railway, Prometheus export works, but the runtime logs this warning:

{
  "message": "failed fetching container metadata: can't collect container meta in CLOUD_UNSPECIFIED, using fallback",
  "severity": "warn"
}

Infra config includes:

{
  "metadata": {
    "app_id": "",
    "env_name": "",
    "env_type": "production",
    "cloud": "railway",
    "base_url": "https://"
  },
  "metrics": {
    "type": "prometheus",
    "collection_interval": 15,
    "remote_write_url": {
      "$env": "PROMETHEUS_REMOTE_WRITE_URL"
    }
  }
}

Env var:

PROMETHEUS_REMOTE_WRITE_URL=http://prometheus.railway.internal:9090/api/v1/write

Prometheus is running with:

/bin/prometheus --config.file=/etc/prometheus/prom.yml --storage.tsdb.path=/prometheus --web.enable-remote-write-receiver

Expected:

  • either metadata.cloud = "railway" should not resolve to CLOUD_UNSPECIFIED
  • or this fallback on unsupported/self-hosted clouds should not log at warn

Observed with:

  • Encore CLI v1.56.0
  • TypeScript app
  • self-hosted on Railway

0 Replies

Welcome!

Sign in to your Railway account to join the conversation.

Loading...