Metrics

Thee who watches the watchers

notes

discovery.process "all" {}

discovery.relabel "btm" {
    targets = discovery.process.all.targets
    // Filter needed processes
    rule {
        source_labels = ["__meta_process_exe"]
        regex = ".*/btm"
        action = "keep"
    }
     // provide arbitrary service_name label, otherwise it will be "unspecified"
    rule {
        source_labels = ["__meta_process_exe"]
        target_label = "service_name"
        regex = ".*/btm"
        action = "replace"
        replacement = "bottom"
    }
}
pyroscope.ebpf "instance" {
    demangle = "full"
    off_cpu_threshold = 1
    forward_to = [pyroscope.write.endpoint.receiver]
    targets = discovery.relabel.btm.output
}

pyroscope.write "endpoint" {
    endpoint {
        url = "http://localhost:4040"
    }
}