Prometheus has some additional restrictions on info:
if n.Func.Name == "info" && len(n.Args) > 1 {
// Check the type is correct first
if n.Args[1].Type() != ValueTypeVector {
p.addParseErrf(node.PositionRange(), "expected type %s in %s, got %s", DocumentedType(ValueTypeVector), fmt.Sprintf("call to function %q", n.Func.Name), DocumentedType(n.Args[1].Type()))
}
// Check the vector selector in the input doesn't contain a metric name
if vs, ok := n.Args[1].(*VectorSelector); ok && vs.Name != "" {
p.addParseErrf(n.Args[1].PositionRange(), "expected label selectors only, got vector selector instead")
} else if ok {
// Set Vector Selector flag to bypass empty matcher check
vs.BypassEmptyMatcherCheck = true
} else {
p.addParseErrf(n.Args[1].PositionRange(), "expected label selectors only")
}
}
Address this in our arity check as well.
Prometheus has some additional restrictions on
info:Address this in our arity check as well.