Class: Aws::Plugins::UserAgent Private
- Inherits:
-
Seahorse::Client::Plugin
- Object
- Seahorse::Client::Plugin
- Aws::Plugins::UserAgent
- Defined in:
- lib/aws-sdk-core/plugins/user_agent.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: Handler
Constant Summary collapse
- METRICS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Aws::Json.load(<<-METRICS) { "RESOURCE_MODEL": "A", "WAITER": "B", "PAGINATOR": "C", "RETRY_MODE_LEGACY": "D", "RETRY_MODE_STANDARD": "E", "RETRY_MODE_ADAPTIVE": "F", "S3_TRANSFER": "G", "S3_CRYPTO_V1N": "H", "S3_CRYPTO_V2": "I", "S3_EXPRESS_BUCKET": "J", "S3_ACCESS_GRANTS": "K", "GZIP_REQUEST_COMPRESSION": "L", "PROTOCOL_RPC_V2_CBOR": "M", "ENDPOINT_OVERRIDE": "N", "ACCOUNT_ID_ENDPOINT": "O", "ACCOUNT_ID_MODE_PREFERRED": "P", "ACCOUNT_ID_MODE_DISABLED": "Q", "ACCOUNT_ID_MODE_REQUIRED": "R", "SIGV4A_SIGNING": "S", "RESOLVED_ACCOUNT_ID": "T" } METRICS
Class Method Summary collapse
-
.feature(_feature, &block) ⇒ Object
private
Deprecated - must exist for old service gems.
- .metric(*metrics, &block) ⇒ Object private
Methods inherited from Seahorse::Client::Plugin
#add_handlers, #add_options, after_initialize, #after_initialize, after_initialize_hooks, #before_initialize, before_initialize, before_initialize_hooks, handlers, literal, option, options
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response, #handler_for, #new_handler
Class Method Details
.feature(_feature, &block) ⇒ 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.
Deprecated - must exist for old service gems
52 53 54 |
# File 'lib/aws-sdk-core/plugins/user_agent.rb', line 52 def self.feature(_feature, &block) block.call end |
.metric(*metrics, &block) ⇒ 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.
56 57 58 59 60 61 62 63 |
# File 'lib/aws-sdk-core/plugins/user_agent.rb', line 56 def self.metric(*metrics, &block) Thread.current[:aws_sdk_core_user_agent_metric] ||= [] metrics = metrics.map { |metric| METRICS[metric] }.compact Thread.current[:aws_sdk_core_user_agent_metric].concat(metrics) block.call ensure Thread.current[:aws_sdk_core_user_agent_metric].pop(metrics.size) end |