@@ -36,7 +36,7 @@ class HTTP
3636 # you can drop the log messages instead by passing a {DroppingSizedQueue} via the
3737 # `:request_queue` option.
3838 #
39- # @param api_key [String] The API key provided to you after you add your application to
39+ # @param source_token [String] The API key provided to you after you add your application to
4040 # [Logtail](https://logtail.com).
4141 # @param [Hash] options the options to create a HTTP log device with.
4242 # @option attributes [Symbol] :batch_size (1000) Determines the maximum of log lines in
@@ -64,13 +64,13 @@ class HTTP
6464 # The default is set via {LOGTAIL_HOST}.
6565 #
6666 # @example Basic usage
67- # Logtail::Logger.new(Logtail::LogDevices::HTTP.new("my_logtail_api_key "))
67+ # Logtail::Logger.new(Logtail::LogDevices::HTTP.new("my_logtail_source_token "))
6868 #
6969 # @example Apply back pressure instead of dropping messages
70- # http_log_device = Logtail::LogDevices::HTTP.new("my_logtail_api_key ", request_queue: SizedQueue.new(25))
70+ # http_log_device = Logtail::LogDevices::HTTP.new("my_logtail_source_token ", request_queue: SizedQueue.new(25))
7171 # Logtail::Logger.new(http_log_device)
72- def initialize ( api_key , options = { } )
73- @api_key = api_key || raise ( ArgumentError . new ( "The api_key parameter cannot be blank" ) )
72+ def initialize ( source_token , options = { } )
73+ @source_token = source_token || raise ( ArgumentError . new ( "The source_token parameter cannot be blank" ) )
7474 @logtail_host = options [ :logtail_host ] || ENV [ 'LOGTAIL_HOST' ] || LOGTAIL_HOST
7575 @logtail_port = options [ :logtail_port ] || ENV [ 'LOGTAIL_PORT' ] || LOGTAIL_PORT
7676 @logtail_scheme = options [ :logtail_scheme ] || ENV [ 'LOGTAIL_SCHEME' ] || LOGTAIL_SCHEME
@@ -168,7 +168,7 @@ def verify_delivery!
168168 end
169169
170170 raise <<-MESSAGE
171-
171+
172172Log delivery failed! No request was made.
173173
174174You can enable internal debug logging with the following:
@@ -361,7 +361,7 @@ def deliver_requests(conn)
361361
362362 # Builds the `Authorization` header value for HTTP delivery to the Logtail API.
363363 def authorization_payload
364- "Bearer #{ @api_key } "
364+ "Bearer #{ @source_token } "
365365 end
366366 end
367367 end
0 commit comments