Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
42 lines
858 B
Nix
42 lines
858 B
Nix
{ ... }:
|
|
{
|
|
services.alloy = {
|
|
enable = true;
|
|
};
|
|
|
|
environment.etc."alloy/config.alloy" = {
|
|
enable = true;
|
|
mode = "0644";
|
|
text = ''
|
|
pyroscope.write "local_pyroscope" {
|
|
endpoint {
|
|
url = "http://localhost:4040";
|
|
}
|
|
}
|
|
|
|
pyroscope.scrape "labmon" {
|
|
targets = [{"__address__" = "localhost:9969", "service_name" = "labmon"}]
|
|
forward_to = [pyroscope.write.local_pyroscope.receiver]
|
|
|
|
profiling_config {
|
|
profile.process_cpu {
|
|
enabled = true;
|
|
}
|
|
profile.memory {
|
|
enabled = true;
|
|
}
|
|
profile.mutex {
|
|
enabled = true;
|
|
}
|
|
profile.block {
|
|
enabled = true;
|
|
}
|
|
profile.goroutine {
|
|
enabled = true;
|
|
}
|
|
}
|
|
}
|
|
'';
|
|
};
|
|
}
|