MCPcopy Index your code
hub / github.com/VictoriaMetrics/metricsql

github.com/VictoriaMetrics/metricsql @v0.87.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.87.2 ↗ · + Follow
294 symbols 890 edges 22 files 76 documented · 26% 6 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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.

Extension points exported contracts — how you extend this code

Expr (Interface)
Expr holds any of *Expr types. [13 implementers]
parser.go

Core symbols most depended-on inside this repo

AppendString
called by 65
parser.go
Next
called by 64
lexer.go
appendIndent
called by 18
prettifier.go
appendEscapedIdent
called by 16
lexer.go
Parse
called by 14
parser.go
Prev
called by 14
lexer.go
isIdentPrefix
called by 13
lexer.go
getCommonLabelFilters
called by 10
optimizer.go

Shape

Function 208
Method 67
Struct 17
Interface 1
TypeAlias 1

Languages

Go100%

Modules by API surface

parser.go110 symbols
lexer.go42 symbols
optimizer.go41 symbols
lexer_test.go19 symbols
binaryop/funcs.go18 symbols
regexp_cache.go11 symbols
binary_op.go10 symbols
binary_op_test.go8 symbols
utils_test.go5 symbols
utils.go5 symbols
prettifier.go5 symbols
regexp_cache_test.go3 symbols

For agents

$ claude mcp add metricsql \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page