opentelemetry-collector: 0.40.0 -> 0.43.1

This commit is contained in:
06kellyjac 2022-01-27 13:11:34 +00:00
parent 3445b70e5b
commit c2df0ad320
2 changed files with 34 additions and 10 deletions

View File

@ -1,30 +1,52 @@
{ buildGoModule
, fetchFromGitHub
, lib
, writeScript
}:
let
otelcontribcol = writeScript "otelcontribcol" ''
echo 'ERROR: otelcontribcol is now in `pkgs.opentelemetry-collector-contrib`, call the collector with `otelcorecol` or move to `pkgs.opentelemetry-collector-contrib`' >&2
exit 1
'';
in
buildGoModule rec {
pname = "opentelemetry-collector";
version = "0.40.0";
version = "0.43.1";
src = fetchFromGitHub {
owner = "open-telemetry";
repo = "opentelemetry-collector-contrib";
repo = "opentelemetry-collector";
rev = "v${version}";
sha256 = "sha256-YFgAS4WReyMnzb6FOeRUXHf1LUgknH5gWObiZNKMbv8=";
sha256 = "sha256-hYhJv5LbebUA9Sp8/admfKWXBoOVvXdr3Mzc3qG8GlM=";
};
# there is a nested go.mod
sourceRoot = "source/cmd/otelcorecol";
vendorSha256 = "sha256-w5uyAVZ1TrurD4CEWTTk1fWmdlQn8eAFWZrNpISB5Rk=";
vendorSha256 = "sha256-DTZLYF3BoQGou59KaL56pkxySsoQ0xeJ5aF/SkewziE=";
proxyVendor = true;
preBuild = ''
# set the build version, can't be done via ldflags
sed -i -E 's/Version:(\s*)".*"/Version:\1"${version}"/' main.go
'';
CGO_ENABLED = 0;
ldflags = [ "-s" "-w" ];
subPackages = [ "cmd/otelcontribcol" ];
postInstall = ''
cp ${otelcontribcol} $out/bin/otelcontribcol
'';
meta = with lib; {
homepage = "https://github.com/open-telemetry/opentelemetry-collector";
description = "OpenTelemetry Collector";
changelog = "https://github.com/open-telemetry/opentelemetry-collector/blob/v${version}/CHANGELOG.md";
description = "OpenTelemetry Collector offers a vendor-agnostic implementation on how to receive, process and export telemetry data";
longDescription = ''
The OpenTelemetry Collector offers a vendor-agnostic implementation on how
to receive, process and export telemetry data. In addition, it removes the
need to run, operate and maintain multiple agents/collectors in order to
support open-source telemetry data formats (e.g. Jaeger, Prometheus, etc.)
sending to multiple open-source or commercial back-ends.
'';
license = licenses.asl20;
maintainers = [ maintainers.uri-canva ];
maintainers = with maintainers; [ uri-canva jk ];
};
}

View File

@ -8474,7 +8474,9 @@ with pkgs;
opae = callPackage ../development/libraries/opae { };
opentelemetry-collector = callPackage ../tools/misc/opentelemetry-collector { };
opentelemetry-collector = callPackage ../tools/misc/opentelemetry-collector {
buildGoModule = buildGo117Module;
};
opentracing-cpp = callPackage ../development/libraries/opentracing-cpp { };