class Honeycomb::Aws::ApiHandler::S3Redirect
@private @see github.com/aws/aws-sdk-ruby/blob/379d338406873b0f4b53f118c83fe40761e297ab/gems/aws-sdk-s3/lib/aws-sdk-s3/plugins/s3_signer.rb#L102-L182 @see github.com/aws/aws-sdk-ruby/blob/4c40f6e67e763a0f392ba5b1449254426b68a600/aws-sdk-core/lib/aws-sdk-core/plugins/s3_request_signer.rb#L81-L153
Constants
- REGION_TAG
Public Class Methods
new(context)
click to toggle source
# File lib/honeycomb/integrations/aws.rb, line 344 def initialize(context) @context = context end
Public Instance Methods
happening?()
click to toggle source
# File lib/honeycomb/integrations/aws.rb, line 356 def happening? status == 400 && region && !original_host.include?("fips") end
original_host()
click to toggle source
# File lib/honeycomb/integrations/aws.rb, line 348 def original_host @context.http_request.endpoint.host end
region()
click to toggle source
# File lib/honeycomb/integrations/aws.rb, line 360 def region @region ||= region_from_headers || region_from_body end
region_from_body()
click to toggle source
# File lib/honeycomb/integrations/aws.rb, line 368 def region_from_body body = @context.http_response.body_contents body.match(REGION_TAG) { |tag| tag[1] } end
region_from_headers()
click to toggle source
# File lib/honeycomb/integrations/aws.rb, line 364 def region_from_headers @context.http_response.headers["x-amz-bucket-region"] end
status()
click to toggle source
# File lib/honeycomb/integrations/aws.rb, line 352 def status @context.http_response.status_code end