Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/pkg/engine/internal/planner/logical/printer.go

22 lines
386 B

package logical
import (
"fmt"
"io"
"github.com/grafana/loki/v3/pkg/engine/internal/util/tree"
)
func WriteMermaidFormat(w io.Writer, p *Plan) {
var t treeFormatter
for _, inst := range p.Instructions {
switch inst := inst.(type) {
case *Return:
node := t.convert(inst.Value)
printer := tree.NewMermaid(w)
_ = printer.Write(node)
fmt.Fprint(w, "\n\n")
}
}
}