bitfab 0.67.1 → 0.67.3
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/http_client.rb +2 -2
- data/lib/bitfab/otel.rb +2 -2
- data/lib/bitfab/scenarios.rb +12 -0
- data/lib/bitfab/subtree.rb +5 -8
- data/lib/bitfab/version.rb +1 -1
- metadata +19 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3d1b6f82e669d8a99caa8d5b2e94a9057456b4246d739cb80bade802d9bc4214
|
|
4
|
+
data.tar.gz: c429087a28e28243c339127692797f069dbec86a7c39c61547ee5510612710a3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: da254947e50206457558b7d897e47fa3fe9c53ce2a700299cec3eec4cd0e2546b5d363a33fc3fa12cd9a1c27cddf53dccf48b08281c81437156f86e7c543741e
|
|
7
|
+
data.tar.gz: 9d34b5617f75d6d5bcfbae28ced5eda7df437d4854e442d1f661a2053989ac5189cb98feeb0fc99224e0dcf70cc5b17348e892b6718bf486c27c804f14c3ca09
|
data/lib/bitfab/http_client.rb
CHANGED
|
@@ -22,10 +22,10 @@ module Bitfab
|
|
|
22
22
|
# What a caller learns about one tracked trace once it takes it back.
|
|
23
23
|
# server_trace_id is the server's assigned traces.id, read back off the OTLP
|
|
24
24
|
# ingest response; nil when the server predates the field or nothing was acked.
|
|
25
|
-
DeliveryReport = Struct.new(:span_count, :closed, :delivered, :server_trace_id
|
|
25
|
+
DeliveryReport = Struct.new(:span_count, :closed, :delivered, :server_trace_id)
|
|
26
26
|
|
|
27
27
|
TraceDelivery = Struct.new(:submitted_span_ids, :acked_span_ids, :closed, :closing_acked,
|
|
28
|
-
:server_trace_id
|
|
28
|
+
:server_trace_id)
|
|
29
29
|
|
|
30
30
|
class HttpClient
|
|
31
31
|
OTLP_TRACES_ENDPOINT = "/api/sdk/otel/v1/traces"
|
data/lib/bitfab/otel.rb
CHANGED
|
@@ -56,7 +56,7 @@ module Bitfab
|
|
|
56
56
|
#
|
|
57
57
|
# span_id is nil for the carrier that closes a trace, which is what tells
|
|
58
58
|
# the transport the trace's expected set has stopped growing.
|
|
59
|
-
CarrierRef = Struct.new(:trace_id, :span_id
|
|
59
|
+
CarrierRef = Struct.new(:trace_id, :span_id)
|
|
60
60
|
|
|
61
61
|
# Everything the transport needs to know ABOUT a payload without reading
|
|
62
62
|
# one. Supplied by the caller that built it; each field falls back to
|
|
@@ -64,7 +64,7 @@ module Bitfab
|
|
|
64
64
|
#
|
|
65
65
|
# ref is nil for carriers nobody accounts for, name defaults to
|
|
66
66
|
# "bitfab.<operation>", nil timestamps let OTel stamp the carrier itself.
|
|
67
|
-
CarrierMeta = Struct.new(:ref, :name, :started_at, :ended_at, :errored
|
|
67
|
+
CarrierMeta = Struct.new(:ref, :name, :started_at, :ended_at, :errored)
|
|
68
68
|
|
|
69
69
|
# The invariant head and tail of an OTLP request for one export window. Key
|
|
70
70
|
# order matches what JSON.generate emits for the equivalent Hash, so a body
|
data/lib/bitfab/scenarios.rb
CHANGED
|
@@ -13,6 +13,18 @@ module Bitfab
|
|
|
13
13
|
@http_client.get(scenario_path(trace_id))["scenario"]
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
+
# Starts building the scenario for trace_id and returns at once, without waiting for it. Read it later with
|
|
17
|
+
# get_scenario. Returns {"status", "traceId", "scenarioId"}: "status" is "started" while Bitfab builds it in the
|
|
18
|
+
# background, or "already_generated" when the trace already has a scenario, which is left as it is and named by
|
|
19
|
+
# "scenarioId". "scenarioId" is nil while the trace has no scenario yet.
|
|
20
|
+
#
|
|
21
|
+
# A replay, a trace outside the organization, or a trace Bitfab cannot build a scenario for (not
|
|
22
|
+
# noah-agent-turn and no scenario callback) raises an error. Adding a trace to a dataset starts the same build
|
|
23
|
+
# only when the organization has a scenario callback.
|
|
24
|
+
def generate_scenario(trace_id)
|
|
25
|
+
@http_client.request("#{scenario_path(trace_id)}/generate", {})["generation"]
|
|
26
|
+
end
|
|
27
|
+
|
|
16
28
|
# Updates the scenario built from trace_id and returns the saved hash.
|
|
17
29
|
#
|
|
18
30
|
# name:, description:, trigger:, and data: each replace the saved value whole. Keywords left out are kept.
|
data/lib/bitfab/subtree.rb
CHANGED
|
@@ -19,16 +19,15 @@ module Bitfab
|
|
|
19
19
|
REALPATH_MUTEX = Mutex.new
|
|
20
20
|
SDK_PREFIX = "#{File.realpath(File.expand_path("..", __dir__))}#{File::SEPARATOR}".freeze
|
|
21
21
|
|
|
22
|
-
CaptureConfig = Struct.new(:root, :root_path, :exclude
|
|
23
|
-
FiberContext = Struct.new(:session, :fiber, :thread, :span_stack, :inherited_span, :parent
|
|
22
|
+
CaptureConfig = Struct.new(:root, :root_path, :exclude)
|
|
23
|
+
FiberContext = Struct.new(:session, :fiber, :thread, :span_stack, :inherited_span, :parent)
|
|
24
24
|
|
|
25
25
|
Boundary = Struct.new(
|
|
26
26
|
:receiver,
|
|
27
27
|
:method_name,
|
|
28
28
|
:span_id,
|
|
29
29
|
:counts_toward_depth,
|
|
30
|
-
:skip_next_call
|
|
31
|
-
keyword_init: true
|
|
30
|
+
:skip_next_call
|
|
32
31
|
)
|
|
33
32
|
|
|
34
33
|
MethodMetadata = Struct.new(
|
|
@@ -37,8 +36,7 @@ module Bitfab
|
|
|
37
36
|
:name,
|
|
38
37
|
:excluded,
|
|
39
38
|
:passthrough,
|
|
40
|
-
:jev
|
|
41
|
-
keyword_init: true
|
|
39
|
+
:jev
|
|
42
40
|
)
|
|
43
41
|
|
|
44
42
|
OpenSpan = Struct.new(
|
|
@@ -57,8 +55,7 @@ module Bitfab
|
|
|
57
55
|
:contexts,
|
|
58
56
|
:prompt,
|
|
59
57
|
:jev_started_at,
|
|
60
|
-
:jev_recorded_below
|
|
61
|
-
keyword_init: true
|
|
58
|
+
:jev_recorded_below
|
|
62
59
|
)
|
|
63
60
|
|
|
64
61
|
module_function
|
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.67.
|
|
4
|
+
version: 0.67.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Harvest Team
|
|
@@ -29,7 +29,7 @@ dependencies:
|
|
|
29
29
|
requirements:
|
|
30
30
|
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version:
|
|
32
|
+
version: 1.13.1
|
|
33
33
|
- - "<"
|
|
34
34
|
- !ruby/object:Gem::Version
|
|
35
35
|
version: '2'
|
|
@@ -39,7 +39,7 @@ dependencies:
|
|
|
39
39
|
requirements:
|
|
40
40
|
- - ">="
|
|
41
41
|
- !ruby/object:Gem::Version
|
|
42
|
-
version:
|
|
42
|
+
version: 1.13.1
|
|
43
43
|
- - "<"
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
45
|
version: '2'
|
|
@@ -57,20 +57,34 @@ dependencies:
|
|
|
57
57
|
- - "~>"
|
|
58
58
|
- !ruby/object:Gem::Version
|
|
59
59
|
version: '1.3'
|
|
60
|
+
- !ruby/object:Gem::Dependency
|
|
61
|
+
name: ostruct
|
|
62
|
+
requirement: !ruby/object:Gem::Requirement
|
|
63
|
+
requirements:
|
|
64
|
+
- - "~>"
|
|
65
|
+
- !ruby/object:Gem::Version
|
|
66
|
+
version: '0.6'
|
|
67
|
+
type: :development
|
|
68
|
+
prerelease: false
|
|
69
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
70
|
+
requirements:
|
|
71
|
+
- - "~>"
|
|
72
|
+
- !ruby/object:Gem::Version
|
|
73
|
+
version: '0.6'
|
|
60
74
|
- !ruby/object:Gem::Dependency
|
|
61
75
|
name: rake
|
|
62
76
|
requirement: !ruby/object:Gem::Requirement
|
|
63
77
|
requirements:
|
|
64
78
|
- - "~>"
|
|
65
79
|
- !ruby/object:Gem::Version
|
|
66
|
-
version: '13.
|
|
80
|
+
version: '13.4'
|
|
67
81
|
type: :development
|
|
68
82
|
prerelease: false
|
|
69
83
|
version_requirements: !ruby/object:Gem::Requirement
|
|
70
84
|
requirements:
|
|
71
85
|
- - "~>"
|
|
72
86
|
- !ruby/object:Gem::Version
|
|
73
|
-
version: '13.
|
|
87
|
+
version: '13.4'
|
|
74
88
|
- !ruby/object:Gem::Dependency
|
|
75
89
|
name: rspec
|
|
76
90
|
requirement: !ruby/object:Gem::Requirement
|