From 00d8f940f83a712c7d5a8fc131759795b17eae25 Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Thu, 12 Jun 2025 18:27:17 +0900 Subject: [PATCH 1/9] bundle fluent-plugin-opentelemetry Signed-off-by: Kentaro Hayashi --- fluent-package/Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/fluent-package/Gemfile b/fluent-package/Gemfile index 5b6e647c4..8d3c50c75 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.1.0" windows_platforms = [:mingw, :x64_mingw] # :mswin # ffi-win32-extensions doesn't support ffi 1.17.1 or later From 410f6e77ddd51685f7a7d46f22ee5e4affa7d220 Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Thu, 12 Jun 2025 18:28:48 +0900 Subject: [PATCH 2/9] Update lockfile for fluent-plugin-opentelemetry Signed-off-by: Kentaro Hayashi --- fluent-package/Gemfile.lock | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/fluent-package/Gemfile.lock b/fluent-package/Gemfile.lock index d040b1faa..bf53e9709 100644 --- a/fluent-package/Gemfile.lock +++ b/fluent-package/Gemfile.lock @@ -165,6 +165,12 @@ GEM faraday_middleware-aws-sigv4 (~> 1.0.1) fluentd (>= 0.14.22) opensearch-ruby (>= 3.0.1) + fluent-plugin-opentelemetry (0.1.0) + async-http (~> 0.88) + excon (~> 1.2) + fluentd (~> 1.18) + google-protobuf (~> 4.30) + grpc (~> 1.71) fluent-plugin-parser-winevt_xml (0.2.8) base64 (~> 0.2) csv (~> 3.2) @@ -205,6 +211,23 @@ 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-darwin) + 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) + grpc (1.72.0) + google-protobuf (>= 3.25, < 5.0) + googleapis-common-protos-types (~> 1.0) hirb (0.7.3) http_parser.rb (0.8.0) httpclient (2.9.0) @@ -338,6 +361,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.1.0) fluent-plugin-parser-winevt_xml (= 0.2.8) fluent-plugin-prometheus (= 2.2.1) fluent-plugin-prometheus_pushgateway (= 0.2.1) From dc9b2800276f30acfe720152ad7880c95c34a50f Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Thu, 19 Jun 2025 16:44:25 +0900 Subject: [PATCH 3/9] Bump version to 1.73.0 Signed-off-by: Kentaro Hayashi --- fluent-package/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fluent-package/Gemfile.lock b/fluent-package/Gemfile.lock index bf53e9709..e2b125bf6 100644 --- a/fluent-package/Gemfile.lock +++ b/fluent-package/Gemfile.lock @@ -225,7 +225,7 @@ GEM rake (>= 13) googleapis-common-protos-types (1.20.0) google-protobuf (>= 3.18, < 5.a) - grpc (1.72.0) + grpc (1.73.0) google-protobuf (>= 3.25, < 5.0) googleapis-common-protos-types (~> 1.0) hirb (0.7.3) From 12f82358b636a320859569464022a587dccbb005 Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Fri, 20 Jun 2025 12:54:05 +0900 Subject: [PATCH 4/9] Use fat gem to install grpc Signed-off-by: Shizuo Fujita --- fluent-package/Gemfile.lock | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/fluent-package/Gemfile.lock b/fluent-package/Gemfile.lock index e2b125bf6..cdcef02cc 100644 --- a/fluent-package/Gemfile.lock +++ b/fluent-package/Gemfile.lock @@ -225,7 +225,28 @@ GEM rake (>= 13) googleapis-common-protos-types (1.20.0) google-protobuf (>= 3.18, < 5.a) - grpc (1.73.0) + grpc (1.73.0-x64-mingw-ucrt) + google-protobuf (>= 3.25, < 5.0) + googleapis-common-protos-types (~> 1.0) + grpc (1.73.0-aarch64-linux) + google-protobuf (>= 3.25, < 5.0) + googleapis-common-protos-types (~> 1.0) + grpc (1.73.0-x86_64-linux) + google-protobuf (>= 3.25, < 5.0) + googleapis-common-protos-types (~> 1.0) + grpc (1.73.0-x86-linux) + google-protobuf (>= 3.25, < 5.0) + googleapis-common-protos-types (~> 1.0) + grpc (1.73.0-x86_64-darwin) + google-protobuf (>= 3.25, < 5.0) + googleapis-common-protos-types (~> 1.0) + grpc (1.73.0-arm64-darwin) + google-protobuf (>= 3.25, < 5.0) + googleapis-common-protos-types (~> 1.0) + grpc (1.73.0-x86-mingw32) + google-protobuf (>= 3.25, < 5.0) + googleapis-common-protos-types (~> 1.0) + grpc (1.73.0-x64-mingw32) google-protobuf (>= 3.25, < 5.0) googleapis-common-protos-types (~> 1.0) hirb (0.7.3) @@ -330,9 +351,8 @@ GEM zstd-ruby (1.5.6.6) PLATFORMS + aarch64-linux x64-mingw-ucrt - x64-mingw32 - x86_64-darwin-18 x86_64-linux DEPENDENCIES From b053713e4ee5e5b6615daf12f81293d705855890 Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Fri, 20 Jun 2025 17:31:26 +0900 Subject: [PATCH 5/9] Remove unused platform Signed-off-by: Shizuo Fujita --- fluent-package/Gemfile.lock | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/fluent-package/Gemfile.lock b/fluent-package/Gemfile.lock index cdcef02cc..2c2567d34 100644 --- a/fluent-package/Gemfile.lock +++ b/fluent-package/Gemfile.lock @@ -217,9 +217,6 @@ GEM google-protobuf (4.31.1-x64-mingw-ucrt) bigdecimal rake (>= 13) - google-protobuf (4.31.1-x86_64-darwin) - bigdecimal - rake (>= 13) google-protobuf (4.31.1-x86_64-linux-gnu) bigdecimal rake (>= 13) @@ -234,21 +231,6 @@ GEM grpc (1.73.0-x86_64-linux) google-protobuf (>= 3.25, < 5.0) googleapis-common-protos-types (~> 1.0) - grpc (1.73.0-x86-linux) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.73.0-x86_64-darwin) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.73.0-arm64-darwin) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.73.0-x86-mingw32) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.73.0-x64-mingw32) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) hirb (0.7.3) http_parser.rb (0.8.0) httpclient (2.9.0) From 4e459a552a6f5c67c664ca8b9d1634a459f74536 Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Mon, 23 Jun 2025 15:55:39 +0900 Subject: [PATCH 6/9] Remove unnecessary precompiled libraries from fat gems Signed-off-by: Shizuo Fujita --- fluent-package/Rakefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/fluent-package/Rakefile b/fluent-package/Rakefile index 941e0467b..bf13bfc5c 100755 --- a/fluent-package/Rakefile +++ b/fluent-package/Rakefile @@ -1146,6 +1146,28 @@ 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("#{gem_staging_dir}/gems/grpc*").each do |gem_dir| + cd(gem_dir) do + Dir.glob("src/ruby/lib/grpc/*/grpc_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) From d47a9420599a2ec6ee6a930d4cf0c021403c1afa Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Tue, 24 Jun 2025 09:52:46 +0900 Subject: [PATCH 7/9] Remove unnecessary test files Signed-off-by: Shizuo Fujita --- fluent-package/Rakefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fluent-package/Rakefile b/fluent-package/Rakefile index bf13bfc5c..b112da709 100755 --- a/fluent-package/Rakefile +++ b/fluent-package/Rakefile @@ -1164,6 +1164,8 @@ class BuildTask unless so_path.include?(ruby_version) rm_f(so_path) end + # Remove unnecessary test files + rm_rf("src/ruby/spec") end end end From 294cbc2ab2f42e1671cb5d744883e6101fc09e99 Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Tue, 24 Jun 2025 11:08:17 +0900 Subject: [PATCH 8/9] Relax threshold of package size Signed-off-by: Shizuo Fujita --- fluent-package/msi/pkgsize-test.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 300a8e02d56a4e95976e9c3d2dbce4788ede00e4 Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Thu, 26 Jun 2025 11:23:36 +0900 Subject: [PATCH 9/9] Use fluent-plugin-opentelemetry 0.2.0 Signed-off-by: Shizuo Fujita --- fluent-package/Gemfile | 2 +- fluent-package/Gemfile.lock | 14 ++------------ fluent-package/Rakefile | 11 ----------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/fluent-package/Gemfile b/fluent-package/Gemfile index 8d3c50c75..ad20c7fa0 100644 --- a/fluent-package/Gemfile +++ b/fluent-package/Gemfile @@ -79,7 +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.1.0" +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 2c2567d34..70f7b5d67 100644 --- a/fluent-package/Gemfile.lock +++ b/fluent-package/Gemfile.lock @@ -165,12 +165,11 @@ GEM faraday_middleware-aws-sigv4 (~> 1.0.1) fluentd (>= 0.14.22) opensearch-ruby (>= 3.0.1) - fluent-plugin-opentelemetry (0.1.0) + fluent-plugin-opentelemetry (0.2.0) async-http (~> 0.88) excon (~> 1.2) fluentd (~> 1.18) google-protobuf (~> 4.30) - grpc (~> 1.71) fluent-plugin-parser-winevt_xml (0.2.8) base64 (~> 0.2) csv (~> 3.2) @@ -222,15 +221,6 @@ GEM rake (>= 13) googleapis-common-protos-types (1.20.0) google-protobuf (>= 3.18, < 5.a) - grpc (1.73.0-x64-mingw-ucrt) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.73.0-aarch64-linux) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.73.0-x86_64-linux) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) hirb (0.7.3) http_parser.rb (0.8.0) httpclient (2.9.0) @@ -363,7 +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.1.0) + 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 b112da709..8b908bbd5 100755 --- a/fluent-package/Rakefile +++ b/fluent-package/Rakefile @@ -1158,17 +1158,6 @@ class BuildTask end end end - Dir.glob("#{gem_staging_dir}/gems/grpc*").each do |gem_dir| - cd(gem_dir) do - Dir.glob("src/ruby/lib/grpc/*/grpc_c.so").each do |so_path| - unless so_path.include?(ruby_version) - rm_f(so_path) - end - # Remove unnecessary test files - rm_rf("src/ruby/spec") - end - end - end Dir.glob("#{fluent_package_staging_dir}/lib/lib*.a").each do |static_library| unless static_library.end_with?(".dll.a")