bitfab 0.64.11 → 0.64.12

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca0982d902b32b704685f3942b2aa7a4f1caee10db462d4560674a291e0139c2
4
- data.tar.gz: afe8094259621f9719aa45c2446f682b5c3a485443625663f4ddfc5086b730da
3
+ metadata.gz: 0230d80db2a1be11423ea398d2e948cad51571ff1e539f4837557c409f6bfe5f
4
+ data.tar.gz: 44fce3d40aa1e12945fed6a2b5b88707f04bf5533abcadd13a361442fd174c1a
5
5
  SHA512:
6
- metadata.gz: fc314e448b508c5ecef57cb62736e77faef740a830f56cd5bfd3cc29e5209dc97df84a8b7e94641f9cd4c23a34311db60d4e64695c87c77bc1078dc05a1df115
7
- data.tar.gz: 13c217d4efd1704e20315748e4b710f3d7ab92e351c5cc5c6e13af98f2c008a8bbf65a7e9315b304618e5750c6ce748aadebdab1df26c4f2b9d2d7ba20106bb8
6
+ metadata.gz: 8c483c3c65d9d50049901c5d0e9769a85502fdf082ecd7b95dfc0f55904fb9cdd98948d1e9d166678f12e74fac73cb33763d2571bbea647502b1d0a776859ff2
7
+ data.tar.gz: 0ae1075d5dfb6a0efae6841c87d4f0f4cccbebd27f83e0561fe2a4498b2e42aed4f895d3c2be8d444aa4d9013bbc00385e52a957cf783e142da3ebef3574bdfe
data/lib/bitfab/client.rb CHANGED
@@ -393,6 +393,12 @@ module Bitfab
393
393
  @http_client.get_trace_span(trace_id, id:, name:, occurrence:)
394
394
  end
395
395
 
396
+ def get_span(span_id)
397
+ raise ArgumentError, "span_id must be a non-empty string" unless span_id.is_a?(String) && !span_id.strip.empty?
398
+
399
+ @http_client.get_span(span_id)
400
+ end
401
+
396
402
  # Execute a block inside a span context, sending trace data on completion.
397
403
  # Called by Traceable, not intended for direct use.
398
404
  def execute_span(trace_function_key:, span_name:, span_type:, function_name:, args:, kwargs:,
@@ -334,6 +334,11 @@ module Bitfab
334
334
  )["span"]
335
335
  end
336
336
 
337
+ def get_span(span_id)
338
+ encoded_span_id = URI.encode_www_form_component(span_id).gsub("+", "%20")
339
+ get("/api/sdk/spans/#{encoded_span_id}", timeout: 30)["span"]
340
+ end
341
+
337
342
  # Fetch the span tree rooted at an external span. Blocking GET request.
338
343
  # Used by replay when a mock strategy is active so child spans can be
339
344
  # matched against their historical outputs.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bitfab
4
- VERSION = "0.64.11"
4
+ VERSION = "0.64.12"
5
5
  end
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.64.11
4
+ version: 0.64.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harvest Team