diff --git a/fluent-package/Gemfile b/fluent-package/Gemfile index 5b6e647c4..ad20c7fa0 100644 --- a/fluent-package/Gemfile +++ b/fluent-package/Gemfile @@ -79,6 +79,7 @@ gem "opensearch-ruby", "3.4.0" gem "fluent-plugin-opensearch", "1.1.5" gem "fluent-plugin-fluent-package-update-notifier", "0.1.0" gem "fluent-plugin-obsolete-plugins", "0.1.1" +gem "fluent-plugin-opentelemetry", "0.2.0" windows_platforms = [:mingw, :x64_mingw] # :mswin # ffi-win32-extensions doesn't support ffi 1.17.1 or later diff --git a/fluent-package/Gemfile.lock b/fluent-package/Gemfile.lock index d040b1faa..70f7b5d67 100644 --- a/fluent-package/Gemfile.lock +++ b/fluent-package/Gemfile.lock @@ -165,6 +165,11 @@ GEM faraday_middleware-aws-sigv4 (~> 1.0.1) fluentd (>= 0.14.22) opensearch-ruby (>= 3.0.1) + fluent-plugin-opentelemetry (0.2.0) + async-http (~> 0.88) + excon (~> 1.2) + fluentd (~> 1.18) + google-protobuf (~> 4.30) fluent-plugin-parser-winevt_xml (0.2.8) base64 (~> 0.2) csv (~> 3.2) @@ -205,6 +210,17 @@ GEM fluent-plugin-windows-exporter (1.0.0) bindata (~> 2.4) fluentd (>= 0.14.10, < 2) + google-protobuf (4.31.1) + bigdecimal + rake (>= 13) + google-protobuf (4.31.1-x64-mingw-ucrt) + bigdecimal + rake (>= 13) + google-protobuf (4.31.1-x86_64-linux-gnu) + bigdecimal + rake (>= 13) + googleapis-common-protos-types (1.20.0) + google-protobuf (>= 3.18, < 5.a) hirb (0.7.3) http_parser.rb (0.8.0) httpclient (2.9.0) @@ -307,9 +323,8 @@ GEM zstd-ruby (1.5.6.6) PLATFORMS + aarch64-linux x64-mingw-ucrt - x64-mingw32 - x86_64-darwin-18 x86_64-linux DEPENDENCIES @@ -338,6 +353,7 @@ DEPENDENCIES fluent-plugin-metrics-cmetrics (= 0.1.2) fluent-plugin-obsolete-plugins (= 0.1.1) fluent-plugin-opensearch (= 1.1.5) + fluent-plugin-opentelemetry (= 0.2.0) fluent-plugin-parser-winevt_xml (= 0.2.8) fluent-plugin-prometheus (= 2.2.1) fluent-plugin-prometheus_pushgateway (= 0.2.1) diff --git a/fluent-package/Rakefile b/fluent-package/Rakefile index 941e0467b..8b908bbd5 100755 --- a/fluent-package/Rakefile +++ b/fluent-package/Rakefile @@ -1146,6 +1146,19 @@ class BuildTask remove_files("ports", true) if gem_dir.start_with?("#{gem_staging_dir}/gems/cmetrics-") end end + + # Remove unnecessary precompiled libraries from fat gems + ruby_version = /(\d+\.\d+)/.match(BUNDLED_RUBY_VERSION).to_s + Dir.glob("#{gem_staging_dir}/gems/google-protobuf*").each do |gem_dir| + cd(gem_dir) do + Dir.glob("lib/google/*/protobuf_c.so").each do |so_path| + unless so_path.include?(ruby_version) + rm_f(so_path) + end + end + end + end + Dir.glob("#{fluent_package_staging_dir}/lib/lib*.a").each do |static_library| unless static_library.end_with?(".dll.a") rm_f(static_library) diff --git a/fluent-package/msi/pkgsize-test.ps1 b/fluent-package/msi/pkgsize-test.ps1 index 7b8071c4c..0552b905f 100644 --- a/fluent-package/msi/pkgsize-test.ps1 +++ b/fluent-package/msi/pkgsize-test.ps1 @@ -21,7 +21,7 @@ catch { $msi = (Get-Item "fluent-package\\msi\\repositories\\fluent-package-*.msi") | Sort-Object -Descending { $_.LastWriteTime } | Select-Object -First 1 "Checking package size: {0}" -F $msi.FullName | Write-Host -$package_size_threshold = $response.RawContentLength * 1.2 +$package_size_threshold = $response.RawContentLength * 1.3 $previous_msi = (Get-Item $previous_msi_name) "{0:0.0} MiB ({1}) {2}" -F ($previous_msi.Length / 1024 / 1024), $previous_msi.Length, $previous_msi.Name | Write-Host "{0:0.0} MiB ({1}) {2}" -F ($msi.Length / 1024 / 1024), $msi.Length, $msi.Name | Write-Host