rails_loki_exporter 1.0.4 → 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: bce248aa49394ba911efadd30695bc1d71a19ea2e8cd9909099339a4cb2bc5eb
4
- data.tar.gz: c744a44f2bd0ee8f01391d0a2b8da796bc84ff71fad4ac8d1cbf7b5d95c12fc3
3
+ metadata.gz: 733316b790e527c137a95c3a5796b22d1367f53536d9afdaaca0ed8d5afe851d
4
+ data.tar.gz: b9ce3c6abaf28609f52d2783028a43635c45f3e87fdcadcebd892d08603cebe8
5
5
  SHA512:
6
- metadata.gz: 40491ac4ac77da177c05f445ad2e31332535f4784654aaeebf78d81eb1ec15e45f5ad8db6306a955b47e67d887574f22cefcd7efac8759bcd4b050f05ecb3c90
7
- data.tar.gz: 5a5d1ec7f81b184cee101091a3330c6f7c6d31d300681f6028d28e113bb732aa8cf2690aaf99dae689218f9c473bea2c5585299a11f48fe12fa42541bddf7bd6
6
+ metadata.gz: 3ad48d68cda1540c115a7bcfbea1f739ec38b4b373633189d3e1c00daeff525b0e645ca6e37360cee32f0ba86c31baeb0c2f88042b9164fbd088c95fb635d081
7
+ data.tar.gz: d8c4111d0e92fa6b58141cc5eee83f36827d889d4e72304a949c1b00065ad2810ab9c457d8a9c5099c4cb7393447cc0df9f06b324368357aa16b47e76bc36fd1
data/README.md CHANGED
@@ -32,6 +32,8 @@ user_name: 'Your User number'
32
32
  password: 'Your Grafana.com API Token'
33
33
  log_file_path: 'log/#{Rails.env}.log'
34
34
  logs_type: '%w(ERROR WARN FATAL INFO DEBUG)'
35
+ interaction_interval: 5
36
+ max_buffer_size: 100
35
37
  intercept_logs: true
36
38
  ```
37
39
  - Add block for **Rails Loki Exporter** in your `application.rb` file:
@@ -21,8 +21,8 @@ module RailsLokiExporter
21
21
  @auth_enabled = config['auth_enabled']
22
22
  @log_buffer = []
23
23
  @last_interaction_time = nil
24
- @interaction_interval = 1 # in seconds, adjust as needed
25
- @max_buffer_size = 10 # set the maximum number of logs to buffer
24
+ @interaction_interval = (config['interaction_interval'] || '5').to_i # in seconds, adjust as needed
25
+ @max_buffer_size = (config['max_buffer_size'] || '100').to_i # set the maximum number of logs to buffer
26
26
 
27
27
  http = Net::HTTP.new(@base_url.to_s, @base_url.port)
28
28
  http.use_ssl = @base_url.scheme == 'https'
@@ -1,3 +1,3 @@
1
1
  module RailsLokiExporter
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_loki_exporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - planning.how
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-03-04 00:00:00.000000000 Z
13
+ date: 2024-04-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: zeitwerk