2023-06-02 19:33:03 +03:00
|
|
|
{ config, cluster, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (config) links;
|
|
|
|
in
|
2022-10-19 21:25:19 +03:00
|
|
|
|
|
|
|
{
|
|
|
|
systemd.services.ipfs = {
|
|
|
|
environment = {
|
|
|
|
OTEL_TRACES_EXPORTER = "otlp";
|
|
|
|
OTEL_EXPORTER_OTLP_PROTOCOL = "grpc";
|
2023-06-02 18:38:12 +03:00
|
|
|
OTEL_EXPORTER_OTLP_ENDPOINT = cluster.config.links.tempo-otlp-grpc.url;
|
2022-10-19 21:25:19 +03:00
|
|
|
OTEL_TRACES_SAMPLER = "parentbased_traceidratio";
|
2023-05-14 00:29:53 +03:00
|
|
|
OTEL_TRACES_SAMPLER_ARG = "0.50";
|
2022-10-19 21:25:19 +03:00
|
|
|
};
|
|
|
|
};
|
2023-06-02 19:33:03 +03:00
|
|
|
|
|
|
|
services.grafana-agent.settings.metrics.configs = lib.singleton {
|
|
|
|
name = "metrics-ipfs";
|
|
|
|
scrape_configs = lib.singleton {
|
|
|
|
job_name = "ipfs";
|
|
|
|
metrics_path = links.ipfsMetrics.path;
|
|
|
|
static_configs = lib.singleton {
|
|
|
|
targets = lib.singleton links.ipfsMetrics.tuple;
|
|
|
|
labels.instance = config.networking.hostName;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-10-19 21:25:19 +03:00
|
|
|
}
|