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 +4 -4
- data/README.md +2 -0
- data/lib/rails_loki_exporter/loki_http_client.rb +2 -2
- data/lib/rails_loki_exporter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 733316b790e527c137a95c3a5796b22d1367f53536d9afdaaca0ed8d5afe851d
|
4
|
+
data.tar.gz: b9ce3c6abaf28609f52d2783028a43635c45f3e87fdcadcebd892d08603cebe8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =
|
25
|
-
@max_buffer_size =
|
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'
|
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
|
+
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-
|
13
|
+
date: 2024-04-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: zeitwerk
|