Module: Atatus::Spies::AzureStorageTableSpy::Helpers Private

Defined in:
lib/atatus/spies/azure_storage_table.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.instrument(operation_name, table_name = nil, service:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/atatus/spies/azure_storage_table.rb', line 30

def instrument(operation_name, table_name = nil, service:)
  span_name = span_name(operation_name, table_name)
  action = formatted_op_name(operation_name)
   = (service.storage_service_host[:primary])

  destination = Atatus::Span::Context::Destination.from_uri(service.storage_service_host[:primary])
  destination.service.resource = "#{SUBTYPE}/#{}"

  context = Atatus::Span::Context.new(destination: destination)

  Atatus.with_span(span_name, TYPE, subtype: SUBTYPE, action: action, context: context) do
    Atatus::Spies.without_faraday do
      Atatus::Spies.without_net_http do
        yield
      end
    end
  end
end