Add OpenTelemetry observability to Arrtrix
- Add OTLP/gRPC observability config and resource attributes - Instrument webhook and onboarding handlers with tracing and metrics - Add OpenTelemetry dependencies to go.mod/go.sum - Update NixOS modules to configure observability settings
This commit is contained in:
parent
bbfe6867c8
commit
81f34676c4
11 changed files with 307 additions and 29 deletions
|
|
@ -112,10 +112,9 @@ in {
|
|||
(mkMautrix "mautrix-telegram" 2 {})
|
||||
(mkMautrix "mautrix-whatsapp" 3 {})
|
||||
(mkMautrix "arrtrix" 4 {
|
||||
settings.network.webhooks.radarr = {
|
||||
enabled = true;
|
||||
path = "/_arrtrix/webhooks/radarr";
|
||||
secret = "";
|
||||
settings.observability = {
|
||||
otlp_grpc_endpoint = "http://[::1]:1000";
|
||||
service_name = "arrtrix";
|
||||
};
|
||||
})
|
||||
{
|
||||
|
|
|
|||
|
|
@ -212,6 +212,18 @@ in {
|
|||
|
||||
resource =
|
||||
{
|
||||
"${service}_notification_webhook" = mkIf (lib.elem service ["radarr" "sonarr" "whisparr" "lidarr" "readarr"]) {
|
||||
"arrtrix" =
|
||||
{
|
||||
method = 1; # HTTP METHOD 1=POST, 2=PUT
|
||||
name = "Arrtrix";
|
||||
url = "http://[::1]${config'.services.arrtrix.settings.appservice.port}";
|
||||
}
|
||||
// (lib.optionalAttrs (lib.elem service ["radarr" "whisparr"]) {
|
||||
onMovieDelete = true;
|
||||
});
|
||||
};
|
||||
|
||||
"${service}_root_folder" = mkIf (lib.elem service ["radarr" "sonarr" "whisparr"]) (
|
||||
rootFolders
|
||||
|> lib.imap (i: f: lib.nameValuePair "local${toString i}" {path = f;})
|
||||
|
|
|
|||
|
|
@ -48,6 +48,11 @@
|
|||
time_format = " ";
|
||||
};
|
||||
};
|
||||
observability = {
|
||||
otlp_grpc_endpoint = "";
|
||||
service_name = "arrtrix";
|
||||
resource_attributes = {};
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.services.arrtrix = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue