logstash-output-edge_loki 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00d5df0131344e327df327ecd450bead0a4ba2c0fe04030d40745d9a0cb0f144
4
- data.tar.gz: f37acca3d7f6d71e3451aa257466bd1b5ef5d84ff7d03a54ac7db8774fa5cc0c
3
+ metadata.gz: 4187b11e7fe8b7f4d5a672882c182be74ff14871e812d6de192f11243a995401
4
+ data.tar.gz: 7ab41d25c52eeb293bf3fd381417c842b80e6b3030a5071cbad542b69defdcd1
5
5
  SHA512:
6
- metadata.gz: 84f1d809b03e6e29636bc0bf755b35a3f0187fab208b9f56a7d32056cd0f5d7e748688c390f051ea933917609fd78a87c172fbd08992e1915ecb8f05087b940f
7
- data.tar.gz: 6d3d0ae93d5473cf9dc6e93048b63bc1a3f1c77e82a6991b248cfc1d0c21dbecc33b30d3fda26788e353406ff93efc675af36ffcefe78f6b8a85060554c4892e
6
+ metadata.gz: 30360d62e5784535e782c98b5a5b4d9c476f8fd568928a44aaf819689f2541f15e543ea85f08097a8722c10030df2167fd370dd21a84cb23293309b30d61f6bf
7
+ data.tar.gz: 7501c3ecf89dc2f2180548111c70b87b1acb686708f383033672dcb8370b58781f2cdabbe80745c484b64749b8f82ea7efdc86f2ecda73b5e7cd8f2495ef72aa
@@ -9,9 +9,9 @@ require 'uri'
9
9
  require 'json'
10
10
  require 'oauth2'
11
11
 
12
- class LogStash::Outputs::Loki < LogStash::Outputs::Base
12
+ class LogStash::Outputs::EDGE_Loki < LogStash::Outputs::Base
13
13
  include Loki
14
- config_name "loki"
14
+ config_name "edge_loki"
15
15
 
16
16
  ## 'A single instance of the Output will be shared among the pipeline worker threads'
17
17
  concurrency :single
@@ -94,6 +94,7 @@ class LogStash::Outputs::Loki < LogStash::Outputs::Base
94
94
  end
95
95
 
96
96
  def max_batch_size
97
+ @logger.info("max_batch_size: started method")
97
98
  loop do
98
99
  @mutex.synchronize do
99
100
  return if @stop
@@ -223,6 +224,7 @@ class LogStash::Outputs::Loki < LogStash::Outputs::Base
223
224
  end
224
225
 
225
226
  def send(batch)
227
+ @logger.info("send: started method")
226
228
  payload = batch.to_json
227
229
  res = loki_http_request(payload)
228
230
  if res.is_a?(Net::HTTPSuccess)
@@ -233,6 +235,7 @@ class LogStash::Outputs::Loki < LogStash::Outputs::Base
233
235
  end
234
236
 
235
237
  def loki_http_request(payload)
238
+ @logger.info("loki_http_request: started method")
236
239
  req = Net::HTTP::Post.new(
237
240
  @uri.request_uri
238
241
  )
@@ -272,6 +275,7 @@ class LogStash::Outputs::Loki < LogStash::Outputs::Base
272
275
  end
273
276
 
274
277
  def createClient
278
+ @logger.info("createClient: started method")
275
279
  client = OAuth2::Client.new(@client_id, @client_secret, site: @url)
276
280
  client.auth_code.authorize_url(redirect_uri: @token_url)
277
281
  return client
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-edge_loki'
3
- s.version = '1.0.2'
3
+ s.version = '1.0.4'
4
4
  s.authors = ['Britto Prabhu']
5
5
  s.email = ['britto.prabhu@apmterminals.com']
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-edge_loki
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Britto Prabhu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-02 00:00:00.000000000 Z
11
+ date: 2023-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +81,7 @@ extra_rdoc_files: []
81
81
  files:
82
82
  - Gemfile
83
83
  - README.md
84
- - lib/logstash/outputs/loki.rb
84
+ - lib/logstash/outputs/edge_loki.rb
85
85
  - lib/logstash/outputs/loki/batch.rb
86
86
  - lib/logstash/outputs/loki/entry.rb
87
87
  - logstash-output-edge_loki.gemspec