Skip to content

Commit a26beaf

Browse files
kenhysWatson1978
andauthored
Bundle opentelemetry gem (#853)
Signed-off-by: Kentaro Hayashi <[email protected]> Signed-off-by: Shizuo Fujita <[email protected]> Co-authored-by: Shizuo Fujita <[email protected]>
1 parent 6dea172 commit a26beaf

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed

fluent-package/Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ gem "opensearch-ruby", "3.4.0"
7979
gem "fluent-plugin-opensearch", "1.1.5"
8080
gem "fluent-plugin-fluent-package-update-notifier", "0.1.0"
8181
gem "fluent-plugin-obsolete-plugins", "0.1.1"
82+
gem "fluent-plugin-opentelemetry", "0.2.0"
8283

8384
windows_platforms = [:mingw, :x64_mingw] # :mswin
8485
# ffi-win32-extensions doesn't support ffi 1.17.1 or later

fluent-package/Gemfile.lock

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ GEM
165165
faraday_middleware-aws-sigv4 (~> 1.0.1)
166166
fluentd (>= 0.14.22)
167167
opensearch-ruby (>= 3.0.1)
168+
fluent-plugin-opentelemetry (0.2.0)
169+
async-http (~> 0.88)
170+
excon (~> 1.2)
171+
fluentd (~> 1.18)
172+
google-protobuf (~> 4.30)
168173
fluent-plugin-parser-winevt_xml (0.2.8)
169174
base64 (~> 0.2)
170175
csv (~> 3.2)
@@ -205,6 +210,17 @@ GEM
205210
fluent-plugin-windows-exporter (1.0.0)
206211
bindata (~> 2.4)
207212
fluentd (>= 0.14.10, < 2)
213+
google-protobuf (4.31.1)
214+
bigdecimal
215+
rake (>= 13)
216+
google-protobuf (4.31.1-x64-mingw-ucrt)
217+
bigdecimal
218+
rake (>= 13)
219+
google-protobuf (4.31.1-x86_64-linux-gnu)
220+
bigdecimal
221+
rake (>= 13)
222+
googleapis-common-protos-types (1.20.0)
223+
google-protobuf (>= 3.18, < 5.a)
208224
hirb (0.7.3)
209225
http_parser.rb (0.8.0)
210226
httpclient (2.9.0)
@@ -307,9 +323,8 @@ GEM
307323
zstd-ruby (1.5.6.6)
308324

309325
PLATFORMS
326+
aarch64-linux
310327
x64-mingw-ucrt
311-
x64-mingw32
312-
x86_64-darwin-18
313328
x86_64-linux
314329

315330
DEPENDENCIES
@@ -338,6 +353,7 @@ DEPENDENCIES
338353
fluent-plugin-metrics-cmetrics (= 0.1.2)
339354
fluent-plugin-obsolete-plugins (= 0.1.1)
340355
fluent-plugin-opensearch (= 1.1.5)
356+
fluent-plugin-opentelemetry (= 0.2.0)
341357
fluent-plugin-parser-winevt_xml (= 0.2.8)
342358
fluent-plugin-prometheus (= 2.2.1)
343359
fluent-plugin-prometheus_pushgateway (= 0.2.1)

fluent-package/Rakefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,6 +1146,19 @@ class BuildTask
11461146
remove_files("ports", true) if gem_dir.start_with?("#{gem_staging_dir}/gems/cmetrics-")
11471147
end
11481148
end
1149+
1150+
# Remove unnecessary precompiled libraries from fat gems
1151+
ruby_version = /(\d+\.\d+)/.match(BUNDLED_RUBY_VERSION).to_s
1152+
Dir.glob("#{gem_staging_dir}/gems/google-protobuf*").each do |gem_dir|
1153+
cd(gem_dir) do
1154+
Dir.glob("lib/google/*/protobuf_c.so").each do |so_path|
1155+
unless so_path.include?(ruby_version)
1156+
rm_f(so_path)
1157+
end
1158+
end
1159+
end
1160+
end
1161+
11491162
Dir.glob("#{fluent_package_staging_dir}/lib/lib*.a").each do |static_library|
11501163
unless static_library.end_with?(".dll.a")
11511164
rm_f(static_library)

fluent-package/msi/pkgsize-test.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ catch {
2121

2222
$msi = (Get-Item "fluent-package\\msi\\repositories\\fluent-package-*.msi") | Sort-Object -Descending { $_.LastWriteTime } | Select-Object -First 1
2323
"Checking package size: {0}" -F $msi.FullName | Write-Host
24-
$package_size_threshold = $response.RawContentLength * 1.2
24+
$package_size_threshold = $response.RawContentLength * 1.3
2525
$previous_msi = (Get-Item $previous_msi_name)
2626
"{0:0.0} MiB ({1}) {2}" -F ($previous_msi.Length / 1024 / 1024), $previous_msi.Length, $previous_msi.Name | Write-Host
2727
"{0:0.0} MiB ({1}) {2}" -F ($msi.Length / 1024 / 1024), $msi.Length, $msi.Name | Write-Host

0 commit comments

Comments
 (0)