bitfab 0.78.2 → 0.78.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bitfab/cloudReplay.mjs +24170 -0
- data/lib/bitfab/cloud_replay_cli.rb +4 -3
- data/lib/bitfab/http_client.rb +7 -7
- data/lib/bitfab/version.rb +1 -1
- metadata +2 -2
- data/lib/bitfab/cloudReplay.py +0 -3822
|
@@ -7,7 +7,8 @@ module Bitfab
|
|
|
7
7
|
module CloudReplayCli
|
|
8
8
|
HINT = "Add --cloud to run the same replay on GitHub Actions; bitfab-replay --cloud --help explains it."
|
|
9
9
|
|
|
10
|
-
HELPER = File.expand_path("cloudReplay.
|
|
10
|
+
HELPER = File.expand_path("cloudReplay.mjs", __dir__)
|
|
11
|
+
NO_NODE = "Cloud replay needs Node.js 18+ on PATH as node"
|
|
11
12
|
REPLAY_EXECUTABLE = File.expand_path("../../exe/bitfab-replay", __dir__)
|
|
12
13
|
|
|
13
14
|
module_function
|
|
@@ -21,7 +22,7 @@ module Bitfab
|
|
|
21
22
|
"BITFAB_REPLAY_COMMAND" => JSON.generate([RbConfig.ruby, REPLAY_EXECUTABLE]),
|
|
22
23
|
"BITFAB_SDK_LANGUAGE" => "ruby"
|
|
23
24
|
}
|
|
24
|
-
pid = Process.spawn(env, "
|
|
25
|
+
pid = Process.spawn(env, "node", helper, *argv)
|
|
25
26
|
begin
|
|
26
27
|
_, status = Process.wait2(pid)
|
|
27
28
|
rescue Interrupt
|
|
@@ -29,7 +30,7 @@ module Bitfab
|
|
|
29
30
|
end
|
|
30
31
|
status.exitstatus || ((status.termsig == Signal.list["INT"]) ? 130 : 1)
|
|
31
32
|
rescue Errno::ENOENT
|
|
32
|
-
warn
|
|
33
|
+
warn NO_NODE
|
|
33
34
|
1
|
|
34
35
|
end
|
|
35
36
|
end
|
data/lib/bitfab/http_client.rb
CHANGED
|
@@ -250,13 +250,13 @@ module Bitfab
|
|
|
250
250
|
@trace_completion.record(ref.trace_id, ref.span_id) if ref&.span_id
|
|
251
251
|
transport = trace_transport
|
|
252
252
|
carrier = record.merge("sdkVersion" => VERSION)
|
|
253
|
-
meta = recorded_meta("
|
|
253
|
+
meta = recorded_meta("span", record, ref)
|
|
254
254
|
if snapshot.nil? || !snapshot.content?(carrier)
|
|
255
|
-
transport&.submit("
|
|
255
|
+
transport&.submit("span", carrier, meta)
|
|
256
256
|
elsif transport.respond_to?(:submit_with_snapshot)
|
|
257
|
-
transport.submit_with_snapshot("
|
|
257
|
+
transport.submit_with_snapshot("span", carrier, meta, snapshot)
|
|
258
258
|
else
|
|
259
|
-
transport&.submit("
|
|
259
|
+
transport&.submit("span", snapshot.apply(carrier), meta)
|
|
260
260
|
end
|
|
261
261
|
}
|
|
262
262
|
discard = ->(record) {
|
|
@@ -487,10 +487,10 @@ module Bitfab
|
|
|
487
487
|
|
|
488
488
|
def submit_trace_payload(payload)
|
|
489
489
|
trace_transport&.submit(
|
|
490
|
-
"
|
|
490
|
+
"trace",
|
|
491
491
|
payload.merge("sdkVersion" => VERSION),
|
|
492
492
|
recorded_meta(
|
|
493
|
-
"
|
|
493
|
+
"trace",
|
|
494
494
|
payload,
|
|
495
495
|
(payload["completed"] == true) ? carrier_ref(payload) : nil
|
|
496
496
|
)
|
|
@@ -528,7 +528,7 @@ module Bitfab
|
|
|
528
528
|
|
|
529
529
|
def carrier_name(operation, payload)
|
|
530
530
|
raw_span = payload["rawSpan"]
|
|
531
|
-
if operation == "
|
|
531
|
+
if operation == "span" && raw_span.is_a?(Hash)
|
|
532
532
|
name = raw_span.dig("span_data", "name")
|
|
533
533
|
return name if name.is_a?(String)
|
|
534
534
|
end
|
data/lib/bitfab/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bitfab
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.78.
|
|
4
|
+
version: 0.78.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Harvest Team
|
|
@@ -175,7 +175,7 @@ files:
|
|
|
175
175
|
- lib/bitfab/baml.rb
|
|
176
176
|
- lib/bitfab/categories.rb
|
|
177
177
|
- lib/bitfab/client.rb
|
|
178
|
-
- lib/bitfab/cloudReplay.
|
|
178
|
+
- lib/bitfab/cloudReplay.mjs
|
|
179
179
|
- lib/bitfab/cloud_replay_cli.rb
|
|
180
180
|
- lib/bitfab/commit_ref.rb
|
|
181
181
|
- lib/bitfab/compress.rb
|