visionary-sdk 1.1.1 → 1.2.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.
@@ -66,13 +66,25 @@ module Visionary
66
66
  end
67
67
 
68
68
  # Outbound HTTP spans from Net::HTTP (and the many clients built on it).
69
+ # The traceparent comes off the caller's request object afterwards
69
70
  module NetHTTPHook
70
71
  def request(req, body = nil, &block)
71
- rec = Visionary.telemetry
72
72
  # Net::HTTP#request calls itself again once the connection is up;
73
73
  # that inner call is the one measured.
74
- return super unless rec&.spans_on && started? && !Telemetry.internal?
74
+ return super unless started? && !Telemetry.internal?
75
+
76
+ rec = Visionary.telemetry
77
+ unless rec&.spans_on
78
+ added = TraceContext.inject(req, TraceContext.current)
79
+ begin
80
+ return super
81
+ ensure
82
+ added.each { |h| req.delete(h) }
83
+ end
84
+ end
75
85
 
86
+ trace = TraceContext.child
87
+ added = TraceContext.inject(req, trace[0])
76
88
  t0 = Telemetry.now_ms
77
89
  status = "ok"
78
90
  error = nil
@@ -85,11 +97,12 @@ module Visionary
85
97
  error = "#{e.class}: #{e.message}"
86
98
  raise
87
99
  ensure
88
- Telemetry::NetHTTPHook.record(rec, self, req, t0, status, error)
100
+ added.each { |h| req.delete(h) }
101
+ Telemetry::NetHTTPHook.record(rec, self, req, t0, status, error, trace)
89
102
  end
90
103
  end
91
104
 
92
- def self.record(rec, http, req, t0, status, error)
105
+ def self.record(rec, http, req, t0, status, error, trace = nil)
93
106
  host = http.address.to_s
94
107
  scheme = http.use_ssl? ? "https" : "http"
95
108
  port = http.port == (http.use_ssl? ? 443 : 80) ? "" : ":#{http.port}"
@@ -98,7 +111,7 @@ module Visionary
98
111
  rec.span(
99
112
  kind: "http", name: "#{req.method} #{host}", target: host,
100
113
  detail: "#{req.method} #{scheme}://#{host}#{port}#{path}",
101
- start_mono: t0, duration_ms: Telemetry.now_ms - t0, status: status, error: error
114
+ start_mono: t0, duration_ms: Telemetry.now_ms - t0, status: status, error: error, trace: trace
102
115
  )
103
116
  rescue StandardError
104
117
  nil
@@ -12,6 +12,7 @@ module Visionary
12
12
  def self.internal!
13
13
  Thread.current[INTERNAL] = true
14
14
  RequestContext.current = nil
15
+ TraceContext.current = nil
15
16
  end
16
17
 
17
18
  def self.internal? = Thread.current[INTERNAL] == true
@@ -41,11 +42,13 @@ module Visionary
41
42
  @limiter = Errors::Limiter.new
42
43
  end
43
44
 
44
- # start_mono is the CLOCK_MONOTONIC start in ms, duration in ms.
45
- def span(kind:, name:, start_mono:, duration_ms:, target: nil, detail: nil, status: "ok", error: nil, row_count: nil)
45
+ # start_mono and duration_ms are CLOCK_MONOTONIC milliseconds
46
+ def span(kind:, name:, start_mono:, duration_ms:, target: nil, detail: nil, status: "ok", error: nil,
47
+ row_count: nil, trace: nil)
46
48
  return unless @spans_on && @writer
47
49
  return if Telemetry.internal?
48
50
 
51
+ sc, parent_id = trace || TraceContext.child
49
52
  ctx = RequestContext.current
50
53
  duration_ms = duration_ms.to_f
51
54
  started_at = Time.now - ((Telemetry.now_ms - start_mono) / 1000.0)
@@ -54,7 +57,8 @@ module Visionary
54
57
  detail: detail && cut(detail.to_s, SQLText::MAX_DETAIL), started_at: started_at,
55
58
  offset_ms: ctx ? (start_mono - ctx.started_mono).round(3) : nil,
56
59
  duration_ms: duration_ms.round(3), status: status, error: error && cut(error.to_s, 500),
57
- row_count: row_count, request_id: ctx&.request_id
60
+ row_count: row_count, request_id: ctx&.request_id,
61
+ trace_id: sc.trace_id, span_id: sc.span_id, parent_span_id: parent_id
58
62
  )
59
63
  if ctx
60
64
  # A late span (its request was already logged) is written on its
@@ -70,7 +74,8 @@ module Visionary
70
74
 
71
75
  def span_row(span)
72
76
  [Visionary.timestamp(span.started_at), span.request_id, @cfg.service, @instance, span.kind, span.name,
73
- span.target, span.detail, span.offset_ms, span.duration_ms, span.status, span.error, span.row_count]
77
+ span.target, span.detail, span.offset_ms, span.duration_ms, span.status, span.error, span.row_count,
78
+ span.trace_id, span.span_id, span.parent_span_id]
74
79
  end
75
80
 
76
81
  # Rows for a finished request's spans, kept for every request.
@@ -0,0 +1,111 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Visionary
4
+ # W3C trace context (https://www.w3.org/TR/trace-context/)
5
+ module TraceContext
6
+ KEY = :visionary_span
7
+ TRACEPARENT = "traceparent"
8
+ TRACESTATE = "tracestate"
9
+
10
+ # state is the caller's tracestate, passed on unchanged
11
+ SpanContext = Struct.new(:trace_id, :span_id, :flags, :state) do
12
+ def traceparent = "00-#{trace_id}-#{span_id}-#{flags || '01'}"
13
+ end
14
+
15
+ HEX = /\A[0-9a-f]+\z/
16
+
17
+ module_function
18
+
19
+ # The innermost custom, background or request span, nil outside a trace
20
+ if Fiber.respond_to?(:[])
21
+ def current = Fiber[KEY]
22
+
23
+ def current=(sc)
24
+ Fiber[KEY] = sc
25
+ end
26
+ else
27
+ def current = Thread.current[KEY]
28
+
29
+ def current=(sc)
30
+ Thread.current[KEY] = sc
31
+ end
32
+ end
33
+
34
+ def with(sc)
35
+ outer = current
36
+ self.current = sc
37
+ yield
38
+ ensure
39
+ self.current = outer
40
+ end
41
+
42
+ # nil when malformed, version ff or an all-zero id
43
+ def parse(header)
44
+ parts = String.new(header.to_s.strip, encoding: Encoding::UTF_8).split("-", -1)
45
+ return nil if parts.size < 4
46
+
47
+ version, trace, span, flags = parts
48
+ return nil unless version.size == 2 && version != "ff" && trace.size == 32 && span.size == 16 && flags.size == 2
49
+ # Version 00 has exactly four fields, later versions may append more
50
+ return nil if version == "00" && parts.size != 4
51
+ return nil unless [version, trace, span, flags].all? { |p| p.match?(HEX) }
52
+ return nil if trace.delete("0").empty? || span.delete("0").empty?
53
+
54
+ SpanContext.new(trace, span, flags, nil)
55
+ end
56
+
57
+ def new_trace_id = random_hex(16)
58
+
59
+ def new_span_id = random_hex(8)
60
+
61
+ # Not secrets, so Ruby's seeded generator is enough
62
+ def random_hex(bytes)
63
+ loop do
64
+ hex = Random.bytes(bytes).unpack1("H*")
65
+ return hex unless hex.delete("0").empty?
66
+ end
67
+ end
68
+
69
+ def request_span(env)
70
+ if (otel = otel_span)
71
+ return [SpanContext.new(otel.trace_id, new_span_id, otel.flags, env["HTTP_TRACESTATE"]), otel.span_id]
72
+ end
73
+ if (sc = parse(env["HTTP_TRACEPARENT"]))
74
+ state = String.new(env["HTTP_TRACESTATE"].to_s, encoding: Encoding::UTF_8)
75
+ return [SpanContext.new(sc.trace_id, new_span_id, sc.flags, state.empty? ? nil : state), sc.span_id]
76
+ end
77
+ [SpanContext.new(new_trace_id, new_span_id, "01", nil), nil]
78
+ end
79
+
80
+ def child(parent = current)
81
+ return [SpanContext.new(new_trace_id, new_span_id, "01", nil), nil] unless parent
82
+
83
+ [SpanContext.new(parent.trace_id, new_span_id, parent.flags, parent.state), parent.span_id]
84
+ end
85
+
86
+ # Leaves a traceparent the caller set alone and returns the header names it added
87
+ def inject(req, sc)
88
+ return [] if sc.nil? || req[TRACEPARENT]
89
+
90
+ req[TRACEPARENT] = sc.traceparent
91
+ added = [TRACEPARENT]
92
+ if sc.state && !sc.state.empty? && req[TRACESTATE].nil?
93
+ req[TRACESTATE] = sc.state
94
+ added << TRACESTATE
95
+ end
96
+ added
97
+ end
98
+
99
+ # An OpenTelemetry SDK in the app has already read the header
100
+ def otel_span
101
+ return nil unless defined?(::OpenTelemetry::Trace)
102
+
103
+ sc = ::OpenTelemetry::Trace.current_span.context
104
+ return nil unless sc.valid?
105
+
106
+ SpanContext.new(sc.hex_trace_id, sc.hex_span_id, sc.trace_flags.sampled? ? "01" : "00", nil)
107
+ rescue StandardError
108
+ nil
109
+ end
110
+ end
111
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Visionary
4
- VERSION = "1.1.1"
4
+ VERSION = "1.2.1"
5
5
  end
@@ -7,16 +7,28 @@ module Visionary
7
7
  :request_id, :started_at, :method, :path, :route, :query, :status, :duration_ms, :ip, :user_agent,
8
8
  :user_id, :user_handle, :user_role, :login_account, :headers, :request_content_type, :request_body, :request_truncated,
9
9
  :request_size, :response_content_type, :response_body, :response_truncated, :response_size,
10
- :totals, :span_rows, :error_rows,
10
+ :totals, :span_rows, :error_rows, :trace_id, :span_id, :parent_span_id,
11
11
  keyword_init: true
12
12
  )
13
13
 
14
- # The single background thread that batches api_logs, spans, errors and
15
- # releases rows, and CPU profiles. Queue items are [:request, Entry],
16
- # [:span, row], [:error, row], [:release, row] or [:profile, row].
14
+ WriterStats = Struct.new(:queued, :written, :dropped, keyword_init: true) do
15
+ def +(other)
16
+ WriterStats.new(queued: queued + other.queued, written: written + other.written,
17
+ dropped: dropped + other.dropped)
18
+ end
19
+ end
20
+
21
+ # Queue items are [:request, Entry], [:span, row], [:error, row], [:release, row] or [:profile, row]
17
22
  class Writer
23
+ # D1 takes 50 statements a call, SQLite allows 32766 parameters
24
+ D1_BATCH = 50
25
+ SQL_BATCH = 500
26
+ MAX_SQL_BATCH = 2000
27
+ MAX_PARAMS = 30_000
28
+
18
29
  INSERTS = {
19
- request: "api_logs", span: "spans", error: "errors", release: "releases", profile: "profiles", log: "app_logs"
30
+ request: "api_logs", span: "spans", error: "errors", release: "releases", profile: "profiles", log: "app_logs",
31
+ metric: "metrics"
20
32
  }.freeze
21
33
 
22
34
  def initialize(cfg, store, schemas, logger)
@@ -25,7 +37,11 @@ module Visionary
25
37
  @schemas = schemas
26
38
  @logger = logger
27
39
  @redactor = Redactor.new(cfg.redact_headers, cfg.redact_fields, cfg.redact_request_fields)
28
- @batch_size = cfg.batch_size.between?(1, 50) ? cfg.batch_size : 50
40
+ @batch_size = if store.string_params?
41
+ cfg.batch_size.between?(1, D1_BATCH) ? cfg.batch_size : D1_BATCH
42
+ else
43
+ cfg.batch_size.between?(1, MAX_SQL_BATCH) ? cfg.batch_size : SQL_BATCH
44
+ end
29
45
  @flush_interval = cfg.flush_interval.to_f.positive? ? cfg.flush_interval.to_f : 3.0
30
46
  @queue_size = cfg.queue_size.positive? ? cfg.queue_size : 5000
31
47
  @sql = INSERTS.transform_values { |t| Schema.insert_sql(t, store.string_params?) }
@@ -52,6 +68,12 @@ module Visionary
52
68
  @queue.push(item)
53
69
  end
54
70
 
71
+ def stats
72
+ @stats.synchronize do
73
+ WriterStats.new(queued: @queue.size, written: @written, dropped: @lost + @queue.dropped_total)
74
+ end
75
+ end
76
+
55
77
  # Stops the thread after it has drained the queue, waiting at most
56
78
  # timeout seconds. False if it was still busy then.
57
79
  def close(timeout)
@@ -72,11 +94,14 @@ module Visionary
72
94
  def reset
73
95
  @queue = BoundedQueue.new(@queue_size)
74
96
  @thread = nil
97
+ @stats = Mutex.new
98
+ @written = @lost = 0
75
99
  end
76
100
 
77
101
  def run
78
102
  Telemetry.internal!
79
103
  @groups.each { |g| @schemas.ensure(g) }
104
+ work = start_flushers
80
105
  next_flush = mono + @flush_interval
81
106
  batch = []
82
107
  loop do
@@ -85,7 +110,11 @@ module Visionary
85
110
  batch.concat(items)
86
111
  closed = @queue.closed? && @queue.size.zero?
87
112
  if batch.size >= @batch_size || mono >= next_flush || closed
88
- write(batch) unless batch.empty?
113
+ if work
114
+ work.push(batch) unless batch.empty?
115
+ elsif !batch.empty?
116
+ write(batch)
117
+ end
89
118
  batch = []
90
119
  report_drops
91
120
  next_flush = mono + @flush_interval
@@ -94,6 +123,28 @@ module Visionary
94
123
  end
95
124
  rescue StandardError => e
96
125
  @logger.error("visionary: writer stopped: #{e.class}: #{e.message}")
126
+ ensure
127
+ if work
128
+ work.close
129
+ @flushers.each(&:join)
130
+ end
131
+ end
132
+
133
+ # SQLite, D1 and an ActiveRecord pool take one batch at a time, on this thread
134
+ def start_flushers
135
+ n = @store.respond_to?(:parallel) ? @store.parallel : 1
136
+ return nil if n <= 1
137
+
138
+ work = SizedQueue.new(1)
139
+ @flushers = Array.new(n) do
140
+ Thread.new do
141
+ Telemetry.internal!
142
+ while (b = work.pop)
143
+ write(b)
144
+ end
145
+ end
146
+ end
147
+ work
97
148
  end
98
149
 
99
150
  def report_drops
@@ -110,11 +161,13 @@ module Visionary
110
161
  end
111
162
 
112
163
  def commit(batch)
113
- stmts = begin
164
+ begin
114
165
  users = lookup_users(batch)
115
- batch.flat_map { |kind, item| statements(kind, item, users) }
166
+ rows = batch.flat_map { |kind, item| statements(kind, item, users) }
167
+ stmts = inserts(rows)
116
168
  rescue StandardError => e
117
169
  @logger.error("visionary: building rows failed; #{batch.size} entries dropped: #{e.class}: #{e.message}")
170
+ count(:@lost, batch.size)
118
171
  return
119
172
  end
120
173
  err = nil
@@ -122,28 +175,47 @@ module Visionary
122
175
  @groups.each { |g| @schemas.ensure(g) }
123
176
  begin
124
177
  @store.batch(stmts)
178
+ count(:@written, rows.size)
125
179
  return
126
180
  rescue StandardError => e
127
181
  err = e
128
182
  end
129
183
  sleep(attempt + 1) if attempt < 2
130
184
  end
131
- @logger.error("visionary: batch write failed; #{batch.size} entries dropped: #{err.message}")
185
+ @logger.error("visionary: batch write failed; #{rows.size} rows dropped: #{err.message}")
186
+ count(:@lost, rows.size)
187
+ end
188
+
189
+ def count(var, n)
190
+ @stats.synchronize { instance_variable_set(var, instance_variable_get(var) + n) }
191
+ end
192
+
193
+ # One INSERT per row for D1, else multi-row INSERTs split at MAX_PARAMS
194
+ def inserts(rows)
195
+ return rows.map { |kind, values| [@sql.fetch(kind), values] } if @store.string_params?
196
+
197
+ rows.group_by(&:first).flat_map do |kind, group|
198
+ table = INSERTS.fetch(kind)
199
+ per = [MAX_PARAMS / Schema::TABLES.fetch(table).size, 1].max
200
+ group.each_slice(per).map do |slice|
201
+ [Schema.insert_rows_sql(table, slice.size), slice.flat_map(&:last)]
202
+ end
203
+ end
132
204
  end
133
205
 
134
206
  def statements(kind, item, users)
135
207
  if kind == :request
136
- out = [stmt(:request, request_row(item, users))]
137
- item.span_rows&.each { |r| out << stmt(:span, r) }
138
- item.error_rows&.each { |r| out << stmt(:error, r) }
208
+ out = [fit(:request, request_row(item, users))]
209
+ item.span_rows&.each { |r| out << fit(:span, r) }
210
+ item.error_rows&.each { |r| out << fit(:error, r) }
139
211
  out
140
212
  else
141
- [stmt(kind, item)]
213
+ [fit(kind, item)]
142
214
  end
143
215
  end
144
216
 
145
- def stmt(kind, row)
146
- [@sql.fetch(kind), Store.fit(@store.dialect, INSERTS.fetch(kind), row)]
217
+ def fit(kind, row)
218
+ [kind, Store.fit(@store.dialect, INSERTS.fetch(kind), row)]
147
219
  end
148
220
 
149
221
  # Resolves each distinct user missing a handle or role once per batch.
@@ -189,7 +261,7 @@ module Visionary
189
261
  nz(@redactor.headers(e.headers)), nz(e.request_content_type), nz(req_body), e.request_truncated ? 1 : 0,
190
262
  e.request_size, nz(e.response_content_type), nz(resp_body), e.response_truncated ? 1 : 0, e.response_size,
191
263
  nz(code), nz(key), @cfg.service, @cfg.version, db_count, db_ms, http_count, http_ms,
192
- nz(clip_login(e.login_account))
264
+ nz(clip_login(e.login_account)), e.trace_id, e.span_id, e.parent_span_id
193
265
  ]
194
266
  end
195
267
 
data/lib/visionary.rb CHANGED
@@ -7,11 +7,15 @@ require_relative "visionary/store"
7
7
  require_relative "visionary/schemas"
8
8
  require_relative "visionary/redactor"
9
9
  require_relative "visionary/context"
10
+ require_relative "visionary/trace_context"
10
11
  require_relative "visionary/queue"
11
12
  require_relative "visionary/writer"
12
13
  require_relative "visionary/logs"
13
14
  require_relative "visionary/retention"
15
+ require_relative "visionary/metrics"
16
+ require_relative "visionary/skip_list"
14
17
  require_relative "visionary/system/sources"
18
+ require_relative "visionary/system/host_stats"
15
19
  require_relative "visionary/system/cgroup"
16
20
  require_relative "visionary/system/recorder"
17
21
  require_relative "visionary/telemetry"
@@ -24,8 +28,8 @@ require_relative "visionary/fork"
24
28
 
25
29
  # Visionary collects what the Visionary server analyses, straight from a Ruby
26
30
  # service: one api_logs row per HTTP request, spans for database and outbound
27
- # HTTP calls, errors, deploy markers, periodic system_metrics samples and the
28
- # app's own log lines (app_logs).
31
+ # HTTP calls, errors, deploy markers, periodic system_metrics samples, the
32
+ # app's own log lines (app_logs) and its custom metrics (metrics)
29
33
  #
30
34
  # # config.ru (Sinatra, Roda, Hanami, any Rack app)
31
35
  # require "visionary"
@@ -106,6 +110,11 @@ module Visionary
106
110
  # The agent's span and error recorder, or nil when collection is off.
107
111
  def telemetry = @agent&.telemetry
108
112
 
113
+ # Rows queued, written and dropped since start
114
+ def writer_stats
115
+ @agent ? @agent.writer_stats : WriterStats.new(queued: 0, written: 0, dropped: 0)
116
+ end
117
+
109
118
  # Flushes and stops collection, waiting at most timeout seconds.
110
119
  def close(timeout = 10)
111
120
  @agent&.close(timeout)
@@ -141,25 +150,26 @@ module Visionary
141
150
 
142
151
  # Measures the block as a span and returns its value. kind is "custom",
143
152
  # "cache", "queue", "db", "http", "graphql" or "background"; name should be low-cardinality (the
144
- # operation, not its arguments).
153
+ # operation, not its arguments)
145
154
  #
146
155
  # Visionary.span("charge card", kind: "http", target: "api.stripe.com") { stripe.charge(...) }
147
- def span(name, kind: "custom", target: nil, detail: nil)
156
+ def span(name, kind: "custom", target: nil, detail: nil, &block)
148
157
  rec = telemetry
149
158
  return yield unless rec&.spans_on
150
159
 
160
+ trace = TraceContext.child
151
161
  t0 = Telemetry.now_ms
152
162
  status = "ok"
153
163
  error = nil
154
164
  begin
155
- yield
165
+ TraceContext.with(trace[0], &block)
156
166
  rescue Exception => e # re-raised; only observed here
157
167
  status = "error"
158
168
  error = "#{e.class}: #{e.message}"
159
169
  raise
160
170
  ensure
161
171
  rec.span(kind: kind, name: name, target: target, detail: detail, start_mono: t0,
162
- duration_ms: Telemetry.now_ms - t0, status: status, error: error)
172
+ duration_ms: Telemetry.now_ms - t0, status: status, error: error, trace: trace)
163
173
  end
164
174
  end
165
175
 
@@ -169,7 +179,7 @@ module Visionary
169
179
  # request_id and offset_ms even after the response was sent; those ending
170
180
  # after the request was logged are written on their own and never change
171
181
  # its totals. Outside a request the span is a lone span (kept when it
172
- # takes at least VISIONARY_SPAN_THRESHOLD_MS).
182
+ # takes at least VISIONARY_SPAN_THRESHOLD_MS)
173
183
  #
174
184
  # If the block raises, the span gets status "error" and the message, and
175
185
  # the exception is re-raised in the thread as Ruby normally does: printed
@@ -181,12 +191,27 @@ module Visionary
181
191
  raise ArgumentError, "Visionary.background needs a block" unless block
182
192
 
183
193
  ctx = RequestContext.current # thread locals don't carry over on Ruby 3.1
194
+ trace = TraceContext.current
184
195
  Thread.new do
185
196
  RequestContext.current = ctx
197
+ TraceContext.current = trace
186
198
  span(name, kind: "background", &block)
187
199
  end
188
200
  end
189
201
 
202
+ # Labels are a Hash or keywords, and each distinct set is one series
203
+ def counter(name, labels = nil, **kw) = Metrics.counter(name, Metrics.labels(labels, kw))
204
+
205
+ def gauge(name, labels = nil, **kw) = Metrics.gauge(name, Metrics.labels(labels, kw))
206
+
207
+ def histogram(name, labels = nil, **kw) = Metrics.histogram(name, Metrics.labels(labels, kw))
208
+
209
+ # Sets a metric's unit and bucket upper bounds, before its first use
210
+ def describe_metric(name, unit: nil, buckets: nil)
211
+ Metrics.describe(name, unit: unit, buckets: buckets)
212
+ nil
213
+ end
214
+
190
215
  # Records a handled error (handled = 1). Inside a request it links to it.
191
216
  #
192
217
  # rescue PaymentError => e
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: visionary-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - styropyr0
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-30 00:00:00.000000000 Z
11
+ date: 2026-10-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  The Ruby collector for Visionary. A Rack middleware (with a Railtie for Rails)
@@ -32,6 +32,7 @@ files:
32
32
  - lib/visionary/logs.rb
33
33
  - lib/visionary/logs/logger.rb
34
34
  - lib/visionary/logs/pipeline.rb
35
+ - lib/visionary/metrics.rb
35
36
  - lib/visionary/middleware.rb
36
37
  - lib/visionary/profiler.rb
37
38
  - lib/visionary/queue.rb
@@ -40,34 +41,40 @@ files:
40
41
  - lib/visionary/retention.rb
41
42
  - lib/visionary/schema.rb
42
43
  - lib/visionary/schema/mysql/logs.sql
44
+ - lib/visionary/schema/mysql/metrics.sql
43
45
  - lib/visionary/schema/mysql/requests.sql
44
46
  - lib/visionary/schema/mysql/system.sql
45
47
  - lib/visionary/schema/mysql/telemetry.sql
46
48
  - lib/visionary/schema/postgres/logs.sql
49
+ - lib/visionary/schema/postgres/metrics.sql
47
50
  - lib/visionary/schema/postgres/requests.sql
48
51
  - lib/visionary/schema/postgres/system.sql
49
52
  - lib/visionary/schema/postgres/telemetry.sql
50
53
  - lib/visionary/schema/sqlite/logs.sql
54
+ - lib/visionary/schema/sqlite/metrics.sql
51
55
  - lib/visionary/schema/sqlite/requests.sql
52
56
  - lib/visionary/schema/sqlite/system.sql
53
57
  - lib/visionary/schema/sqlite/telemetry.sql
54
58
  - lib/visionary/schemas.rb
59
+ - lib/visionary/skip_list.rb
55
60
  - lib/visionary/store.rb
56
61
  - lib/visionary/store/active_record.rb
57
62
  - lib/visionary/store/d1.rb
58
63
  - lib/visionary/store/sql.rb
59
64
  - lib/visionary/system/cgroup.rb
65
+ - lib/visionary/system/host_stats.rb
60
66
  - lib/visionary/system/recorder.rb
61
67
  - lib/visionary/system/sources.rb
62
68
  - lib/visionary/telemetry.rb
63
69
  - lib/visionary/telemetry/errors.rb
64
70
  - lib/visionary/telemetry/hooks.rb
65
71
  - lib/visionary/telemetry/sql_text.rb
72
+ - lib/visionary/trace_context.rb
66
73
  - lib/visionary/version.rb
67
74
  - lib/visionary/writer.rb
68
75
  homepage: https://github.com/styropyr0/Visionary
69
76
  licenses:
70
- - LicenseRef-VNCL-1.0
77
+ - LicenseRef-VSAL-2.0
71
78
  metadata:
72
79
  homepage_uri: https://github.com/styropyr0/Visionary
73
80
  source_code_uri: https://github.com/styropyr0/Visionary/tree/main/sdks/ruby