flare 0.1.0 → 0.1.1
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 +4 -4
- data/lib/flare/version.rb +1 -1
- data/lib/flare.rb +8 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0fb9866f1a34be35ebd27efe1cd0b1eb6c9ea7109e21b18a6aa34d003ac32220
|
|
4
|
+
data.tar.gz: 772b2542a8d1a35026dd11db71116b9f7a7d492cc2b36ece8920ceea5f30cac6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6f990ff07a6013e217574d08b0af5a7deb519bfb18b0104cbeac5c9e765b40e053b62bd3fe018854c8741e123acf885a07584ee21a410da4754d88e6ba052e6a
|
|
7
|
+
data.tar.gz: c6903cc313cbb726cdc373a2307a53e8ef7cde7180e5b4c38fee9eac0667924ce1c3089ddabffac7e373da94f92b3bfbabbb9f996ff862f4bd1475f096bd18df
|
data/lib/flare/version.rb
CHANGED
data/lib/flare.rb
CHANGED
|
@@ -67,7 +67,9 @@ module Flare
|
|
|
67
67
|
require_relative "flare/sqlite_exporter"
|
|
68
68
|
SQLiteExporter.new(configuration.database_path)
|
|
69
69
|
rescue LoadError
|
|
70
|
-
|
|
70
|
+
warn "[Flare] sqlite3 gem not found. Spans are disabled. Add `gem 'sqlite3'` to your Gemfile to enable the development dashboard."
|
|
71
|
+
configuration.spans_enabled = false
|
|
72
|
+
nil
|
|
71
73
|
end
|
|
72
74
|
end
|
|
73
75
|
|
|
@@ -158,7 +160,7 @@ module Flare
|
|
|
158
160
|
c.service_name = service_name
|
|
159
161
|
|
|
160
162
|
# Spans: detailed trace data stored in SQLite
|
|
161
|
-
if configuration.spans_enabled
|
|
163
|
+
if configuration.spans_enabled && exporter
|
|
162
164
|
c.add_span_processor(span_processor)
|
|
163
165
|
log "Spans enabled (database=#{configuration.database_path})"
|
|
164
166
|
end
|
|
@@ -188,7 +190,7 @@ module Flare
|
|
|
188
190
|
|
|
189
191
|
at_exit do
|
|
190
192
|
log "Shutting down..."
|
|
191
|
-
if configuration.spans_enabled
|
|
193
|
+
if configuration.spans_enabled && @span_processor
|
|
192
194
|
span_processor.force_flush
|
|
193
195
|
span_processor.shutdown
|
|
194
196
|
log "Span processor flushed and stopped"
|
|
@@ -386,7 +388,9 @@ module Flare
|
|
|
386
388
|
require_relative "flare/storage/sqlite"
|
|
387
389
|
Storage::SQLite.new(configuration.database_path)
|
|
388
390
|
rescue LoadError
|
|
389
|
-
|
|
391
|
+
warn "[Flare] sqlite3 gem not found. Dashboard is disabled. Add `gem 'sqlite3'` to your Gemfile to enable it."
|
|
392
|
+
configuration.spans_enabled = false
|
|
393
|
+
nil
|
|
390
394
|
end
|
|
391
395
|
end
|
|
392
396
|
|