Sha256: e6c04236e6fa40f8e211ae325a994e0c96dd2318be33882ccf80ba9c2a8198bd
Contents?: true
Size: 842 Bytes
Versions: 18
Compression:
Stored size: 842 Bytes
Contents
require "logtail/context" module Logtail module Contexts # @private class HTTP < Context attr_reader :host, :method, :path, :remote_addr, :request_id def initialize(attributes) @host = attributes[:host] @method = attributes[:method] @path = attributes[:path] @remote_addr = attributes[:remote_addr] @request_id = attributes[:request_id] end # Builds a hash representation containing simple objects, suitable for serialization (JSON). def to_hash @to_hash ||= { http: Util::NonNilHashBuilder.build do |h| h.add(:host, host) h.add(:method, method) h.add(:path, path) h.add(:remote_addr, remote_addr) h.add(:request_id, request_id) end } end end end end
Version data entries
18 entries across 18 versions & 2 rubygems