• Stars
    star
    170
  • Rank 223,357 (Top 5 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Standalone PromQL and MetricsQL parser

GoDoc Go Report

metricsql

Package metricsql implements MetricsQL and PromQL parser in Go.

Usage

    expr, err := metricsql.Parse(`sum(rate(foo{bar="baz"}[5m])) by (job)`)
    if err != nil {
        // parse error
    }
    // Now expr contains parsed MetricsQL as `*Expr` structs.
    // See Parse examples for more details.

See docs for more details.