Hudson River Trading

HeraclesQL: A Python DSL for Writing Alerts

Oct 28, 2025ndepalo
HeraclesQL: A Python DSL for Writing Alerts
SummaryAI, from the source post

This post details the technical implementation of HeraclesQL, a Python DSL for writing VictoriaMetrics alerts. It explains how HeraclesQL addresses code duplication, expressiveness, and footguns in MetricsQL by generating type-safe MetricsQL. The post provides examples of HeraclesQL syntax for simple queries, binary operators, and custom functions, demonstrating how it generates MetricsQL and improves alert development and maintenance. It also highlights the static type safety provided by MyPy and Pyright.