miniapm 1.3.0 → 1.3.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/CHANGELOG.md +6 -0
- data/lib/miniapm/configuration.rb +11 -1
- data/lib/miniapm/instrumentations/activerecord.rb +10 -0
- data/lib/miniapm/version.rb +1 -1
- 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: 83b0d150b9b3726489be0f60b057b7f88220e159fbcb2fdff0c908f50666891b
|
|
4
|
+
data.tar.gz: 53415be3a6facc48a9baa9ccec55d5d98334ad64fb74c354b4007e519c358f71
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 24b383ee8664419cd4393cfd07532bc2ab7aee2d9d7bc922ab30db878a50623b6d844688bedbf73c605005b51b0cc2bff255cd5fcf7f741953068068bdbefe42
|
|
7
|
+
data.tar.gz: 23cdb70815eb61eae638f17b860fa3c8309443d89ed58f1f332006b53026393b6a42ce8b2c7a6e95a1650e6f2be5e59990ccccb483e1634c058f63a548e5729e
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.3.1] - 2026-01-04
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Filter SolidCable/SolidQueue polling queries by default to reduce noise
|
|
14
|
+
- New `ignored_tables` option for ActiveRecord instrumentation (supports strings and regex)
|
|
15
|
+
|
|
10
16
|
## [1.0.0] - 2026-01-03
|
|
11
17
|
|
|
12
18
|
### Added
|
|
@@ -136,9 +136,19 @@ module MiniAPM
|
|
|
136
136
|
end
|
|
137
137
|
|
|
138
138
|
class InstrumentationConfig
|
|
139
|
+
# Tables used for internal polling by Rails infrastructure gems
|
|
140
|
+
# These create noise in traces without providing value
|
|
141
|
+
INTERNAL_POLLING_TABLES = %w[
|
|
142
|
+
solid_cable_messages
|
|
143
|
+
solid_queue_processes
|
|
144
|
+
solid_queue_ready_executions
|
|
145
|
+
solid_queue_scheduled_executions
|
|
146
|
+
solid_queue_semaphores
|
|
147
|
+
].freeze
|
|
148
|
+
|
|
139
149
|
DEFAULTS = {
|
|
140
150
|
rails: { enabled: true },
|
|
141
|
-
activerecord: { enabled: true, log_sql: true },
|
|
151
|
+
activerecord: { enabled: true, log_sql: true, ignored_tables: INTERNAL_POLLING_TABLES },
|
|
142
152
|
activejob: { enabled: true },
|
|
143
153
|
sidekiq: { enabled: true },
|
|
144
154
|
cache: { enabled: true },
|
|
@@ -33,6 +33,9 @@ module MiniAPM
|
|
|
33
33
|
operation = extract_operation(sql)
|
|
34
34
|
table = extract_table(sql)
|
|
35
35
|
|
|
36
|
+
# Skip queries to ignored tables (e.g., SolidCable/SolidQueue polling)
|
|
37
|
+
return if table && ignored_table?(table)
|
|
38
|
+
|
|
36
39
|
name = [operation, table].compact.join(" ")
|
|
37
40
|
name = operation if name.empty?
|
|
38
41
|
|
|
@@ -114,6 +117,13 @@ module MiniAPM
|
|
|
114
117
|
def truncate_sql(sql, max_length: 2000)
|
|
115
118
|
sql.length > max_length ? sql[0...max_length] + "..." : sql
|
|
116
119
|
end
|
|
120
|
+
|
|
121
|
+
def ignored_table?(table)
|
|
122
|
+
ignored = MiniAPM.configuration.instrumentations.options(:activerecord)[:ignored_tables]
|
|
123
|
+
return false unless ignored
|
|
124
|
+
|
|
125
|
+
ignored.any? { |pattern| pattern.is_a?(Regexp) ? table.match?(pattern) : table == pattern }
|
|
126
|
+
end
|
|
117
127
|
end
|
|
118
128
|
end
|
|
119
129
|
end
|
data/lib/miniapm/version.rb
CHANGED