lib/aws-sdk-appsync/plugins/endpoints.rb in aws-sdk-appsync-1.85.0 vs lib/aws-sdk-appsync/plugins/endpoints.rb in aws-sdk-appsync-1.86.0

- old
+ new

@@ -38,13 +38,22 @@ end context[:auth_scheme] = Aws::Endpoints.resolve_auth_scheme(context, endpoint) - @handler.call(context) + with_metrics(context) { @handler.call(context) } end private + + def with_metrics(context, &block) + metrics = [] + metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint + if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a' + metrics << 'SIGV4A_SIGNING' + end + Aws::Plugins::UserAgent.metric(*metrics, &block) + end def apply_endpoint_headers(context, headers) headers.each do |key, values| value = values .compact