ecs_exporter icon indicating copy to clipboard operation
ecs_exporter copied to clipboard

Surface failed metric collections to the collector

Open isker opened this issue 11 months ago • 0 comments

We swallow errors making ECS task metadata API requests here and here. There is actually a way to surface errors to the caller: NewInvalidMetric.

I think we should use it so that errors are surfaced at write time, as in promhttp. The ECS APIs are supposed to be infallible, so the default behavior of serving an HTTP 500 on the /metrics request probably makes sense for everyone in all situations, though we could add a flag to control the behavior.

isker avatar Jan 29 '25 22:01 isker