logstash-output-edge_loki 1.0.3 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28c441e337cfc3425bd57cf691d82882e5148b66c76dff34e01d679a2bc5adaf
4
- data.tar.gz: 3c38908f62e83a123758dc34350a3b99d3f6008cc70c3923b9d21391cb1e726c
3
+ metadata.gz: 566d8ecb5467df002d8472b81050203bf545b61bab5d62eee95e97360515d99d
4
+ data.tar.gz: 404c178ce114082bf0c345f238cad7ea956d78f210d8928747aee4c9a4f1140f
5
5
  SHA512:
6
- metadata.gz: b8a1ae4b94696ecd31c29df8e1f66baad3e588ebecb08e61567ea9d32a56828430d10db9cc8af943f6fc905aa3e4e379bf73184f9ab19889de23a667a0504ca7
7
- data.tar.gz: 54070a3792e40b6bae0865afe354d28dfbc2c0a0dcd8a6d73b979f58281f12de3c7005520769aaaa532dee00de6ab2850a0702030964755831db59d61cefc831
6
+ metadata.gz: 189f31a68e1791ad9dce43de4cb9a5106ae95a8b20bfd63ae9dbf867f241eea7c78d6511eee90684850aa06ca9dc41fbdb75293e77f6ea48093f7e40734a4693
7
+ data.tar.gz: 4c041143bb13e7c0466311f01b01f98ef796e80900091d9170857928aa0298f305b3cdfdeae14095b35663255f563c456f17799943ce1837482765e1cb806334
@@ -94,6 +94,7 @@ class LogStash::Outputs::EDGE_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
@@ -105,7 +106,6 @@ class LogStash::Outputs::EDGE_Loki < LogStash::Outputs::Base
105
106
  @mutex.synchronize do
106
107
  if !add_entry_to_batch(e)
107
108
  @logger.debug("Max batch_size is reached. Sending batch to loki")
108
- createClient()
109
109
  send(@batch)
110
110
  @batch = Batch.new(e)
111
111
  end
@@ -223,6 +223,8 @@ class LogStash::Outputs::EDGE_Loki < LogStash::Outputs::Base
223
223
  end
224
224
 
225
225
  def send(batch)
226
+ @logger.info("send: started method")
227
+ createClient()
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::EDGE_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::EDGE_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.3'
3
+ s.version = '1.0.5'
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.3
4
+ version: 1.0.5
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