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/writePrometheus is running with:
/bin/prometheus --config.file=/etc/prometheus/prom.yml --storage.tsdb.path=/prometheus --web.enable-remote-write-receiverExpected:
- either
metadata.cloud = "railway"should not resolve toCLOUD_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