prestodb/presto · error · PrestoException
PROMETHEUS_UNKNOWN_ERROR
PROMETHEUS_UNKNOWN_ERROR
Error message
unable to deserialize timestamp: ${e.getMessage()} What it means
Catch in PrometheusTimestampDeserializer.deserialize: the JSON timestamp string is not a parseable decimal epoch value (NumberFormatException) or the parse overflows, so it cannot be converted to an Instant. Fires when Prometheus (or an intermediary) returns timestamps in an unexpected format.
Source
Thrown at presto-prometheus/src/main/java/com/facebook/presto/plugin/prometheus/PrometheusTimestampDeserializer.java:45
public class PrometheusTimestampDeserializer
extends JsonDeserializer<Instant>
{
static Instant decimalEpochTimestampToSQLTimestamp(String timestamp)
{
long promTimestampMillis = (long) (Double.parseDouble(timestamp) * 1000);
return ofEpochMilli(promTimestampMillis);
}
@Override
public Instant deserialize(JsonParser jsonParser, DeserializationContext context)
throws IOException
{
String timestamp = jsonParser.getText().trim();
try {
return decimalEpochTimestampToSQLTimestamp(timestamp);
}
catch (NumberFormatException e) {
throw new PrestoException(PROMETHEUS_UNKNOWN_ERROR, "unable to deserialize timestamp: " + e.getMessage());
}
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Verify the Prometheus server returns RFC3339/decimal-epoch timestamps as expected
- Skip or log the malformed sample instead of failing the whole response
- Check for non-numeric placeholder values in the response
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at presto-prometheus/src/main/java/com/facebook/presto/plugin/prometheus/PrometheusTimestampDeserializer.java:45 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/94bb8f906fabad95.
Report an issue: GitHub.