7 , opentelemetry-collector
11 pname = "opentelemetry-collector";
14 src = fetchFromGitHub {
15 owner = "open-telemetry";
16 repo = "opentelemetry-collector";
18 hash = "sha256-ShVUBohSnIoeq2aTWJ9IMXKt0CeRv3CZjlqpYHR9DhY=";
20 # there is a nested go.mod
21 sourceRoot = "${src.name}/cmd/otelcorecol";
22 vendorHash = "sha256-rXC4lm2ZvO3k6h1ZiYB+FskhW0c2uJyPLZg6n125MZE=";
24 nativeBuildInputs = [ installShellFiles ];
26 # upstream strongly recommends disabling CGO
27 # additionally dependencies have had issues when GCO was enabled that weren't caught upstream
28 # https://github.com/open-telemetry/opentelemetry-collector/blob/main/CONTRIBUTING.md#using-cgo
32 # set the build version, can't be done via ldflags
33 sed -i -E 's/Version:(\s*)".*"/Version:\1"${version}"/' main.go
36 ldflags = [ "-s" "-w" ];
39 installShellCompletion --cmd otelcorecol \
40 --bash <($out/bin/otelcorecol completion bash) \
41 --fish <($out/bin/otelcorecol completion fish) \
42 --zsh <($out/bin/otelcorecol completion zsh)
46 version = testers.testVersion {
48 package = opentelemetry-collector;
49 command = "otelcorecol -v";
51 inherit (nixosTests) opentelemetry-collector;
55 homepage = "https://github.com/open-telemetry/opentelemetry-collector";
56 changelog = "https://github.com/open-telemetry/opentelemetry-collector/blob/v${version}/CHANGELOG.md";
57 description = "Vendor-agnostic implementation on how to receive, process and export telemetry data";
59 The OpenTelemetry Collector offers a vendor-agnostic implementation on how
60 to receive, process and export telemetry data. In addition, it removes the
61 need to run, operate and maintain multiple agents/collectors in order to
62 support open-source telemetry data formats (e.g. Jaeger, Prometheus, etc.)
63 sending to multiple open-source or commercial back-ends.
65 license = licenses.asl20;
66 maintainers = with maintainers; [ uri-canva jk ];
67 mainProgram = "otelcorecol";