Merge pull request #230746 from tylerjl/otel-collector-contrib-76

opentelemetry-collector-contrib: 0.66.0 -> 0.76.1
This commit is contained in:
Uri Baghin 2023-05-13 12:27:56 +10:00 committed by GitHub
commit ff1f622c81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,28 +2,45 @@
, fetchFromGitHub
, lib
, stdenv
, systemdMinimal
, withSystemd ? false
}:
buildGoModule rec {
pname = "opentelemetry-collector-contrib";
version = "0.66.0";
version = "0.76.1";
src = fetchFromGitHub {
owner = "open-telemetry";
repo = "opentelemetry-collector-contrib";
rev = "v${version}";
sha256 = "sha256-FT5AoqCHNf2sdKyejALOsL/zHrrxP7vdntagR9vA00I=";
sha256 = "sha256-Aeiq9IJReUxJUpeq5mSReK5foC5aY4fMSZli0ZUjYPc=";
};
# proxy vendor to avoid hash missmatches between linux and macOS
proxyVendor = true;
vendorSha256 = "sha256-65bfTCMRJ8iL5ABGPqvkayw4zSn4KkCriEkWYa0Pe68=";
vendorSha256 = "sha256-vLbx/qmSZuteuvChnyA/wcEcIjU3zWkxSjfk8VBdgU4=";
subPackages = [ "cmd/otelcontribcol" ];
# there is a nested go.mod
sourceRoot = "source/cmd/otelcontribcol";
# CGO_ENABLED=0 required for mac - "error: 'TARGET_OS_MAC' is not defined, evaluates to 0"
# https://github.com/shirou/gopsutil/issues/976
CGO_ENABLED = if stdenv.isLinux then 1 else 0;
# journalctl is required in-$PATH for the journald receiver tests.
nativeCheckInputs = lib.optionals stdenv.isLinux [ systemdMinimal ];
# We don't inject the package into propagatedBuildInputs unless
# asked to avoid hard-requiring a large package. For the journald
# receiver to work, journalctl will need to be available in-$PATH,
# so expose this as an option for those who want more control over
# it instead of trusting the global $PATH.
propagatedBuildInputs = lib.optionals withSystemd [ systemdMinimal ];
# This test fails on darwin for mysterious reasons.
checkFlags = lib.optionals stdenv.isDarwin
[ "-skip" "TestDefaultExtensions/memory_ballast" ];
ldflags = [
"-s"
"-w"