Module: ElasticAPM::Spies::AzureStorageTableSpy::Helpers Private
- Defined in:
- lib/elastic_apm/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/elastic_apm/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) account_name = account_name_from_storage_table_host(service.storage_service_host[:primary]) destination = ElasticAPM::Span::Context::Destination.from_uri(service.storage_service_host[:primary]) destination.service.resource = "#{SUBTYPE}/#{account_name}" context = ElasticAPM::Span::Context.new(destination: destination) ElasticAPM.with_span(span_name, TYPE, subtype: SUBTYPE, action: action, context: context) do ElasticAPM::Spies.without_faraday do ElasticAPM::Spies.without_net_http do yield end end end end |