atatus 2.1.0 → 2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/atatus/collector/base.rb +5 -1
- data/lib/atatus/collector/builder.rb +8 -1
- data/lib/atatus/config.rb +46 -2
- data/lib/atatus/error_builder.rb +9 -0
- data/lib/atatus/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: ea5141dce6994d4be6f81f07c03c02f0f887e35043866324933d0685ac2035c6
|
|
4
|
+
data.tar.gz: bdcad2fc202b6d7d1c942782744114bd5b05c627ad0b5c036521ef34095d2a3d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b7f2771481a672d9911c370489c13c4380cf00e0e99ba50c4916d71e0e2333191fca443fff66f9eda8dc7a085c4556d8db0d45b300d317a2ef6d9f79935fd57b
|
|
7
|
+
data.tar.gz: 13d69bb85b3edf99667b6eb70b1dc01d056f82d5abfd2e11936bdb5d363541322e2893d04741d3d90d42646d035e11c60983c9d115e8895c50e4aa77d6a5313d
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## 2.2.1 (Wed, 29 Apr 2026)
|
|
8
|
+
|
|
9
|
+
- Bug Fixes
|
|
10
|
+
|
|
11
|
+
## 2.2.0 (Wed, 29 Apr 2026)
|
|
12
|
+
|
|
13
|
+
- Added support for default ruby exceptions.
|
|
14
|
+
- Added support for query params and request headers in exceptions.
|
|
15
|
+
|
|
16
|
+
|
|
7
17
|
## 2.1.0 (Wed, 7 Jan 2026)
|
|
8
18
|
|
|
9
19
|
- Fixed host details fetching issue in docker.
|
|
@@ -571,7 +571,11 @@ module Atatus
|
|
|
571
571
|
|
|
572
572
|
if @collect_counter % 30 == 0
|
|
573
573
|
@hostinfo_response = @transport.hostinfo(start_time)
|
|
574
|
-
|
|
574
|
+
|
|
575
|
+
if @hostinfo_response.key?("ignoreTxnUrlPatterns")
|
|
576
|
+
@config.transaction_ignore_urls = @transaction_ignore_urls | @hostinfo_response["ignoreTxnUrlPatterns"]
|
|
577
|
+
end
|
|
578
|
+
|
|
575
579
|
if @hostinfo_response.key?("errorLimit")
|
|
576
580
|
@error_limit = @hostinfo_response["errorLimit"]
|
|
577
581
|
end
|
|
@@ -198,6 +198,7 @@ module Atatus
|
|
|
198
198
|
request[:method] = r.method if !r.method.nil?
|
|
199
199
|
if !r.headers.nil?
|
|
200
200
|
h = r.headers
|
|
201
|
+
request[:headers] = h
|
|
201
202
|
request[:accept] = h['Accept'] if h.key?('Accept')
|
|
202
203
|
request[:'accept-encoding'] = h['Accept-Encoding'] if h.key?('Accept-Encoding')
|
|
203
204
|
request[:'accept-language'] = h['Accept-Language'] if h.key?('Accept-Language')
|
|
@@ -208,7 +209,13 @@ module Atatus
|
|
|
208
209
|
u = r.url
|
|
209
210
|
request[:host] = u.hostname if !u.hostname.nil?
|
|
210
211
|
request[:port] = (u.port).to_i if !u.port.nil?
|
|
211
|
-
|
|
212
|
+
|
|
213
|
+
path_name = u.pathname if !u.pathname.nil?
|
|
214
|
+
query_param = u.search != '' ? ('?' + u.search) : ''
|
|
215
|
+
final_path = path_name + query_param
|
|
216
|
+
|
|
217
|
+
request[:path] = final_path
|
|
218
|
+
request[:url] = u.full
|
|
212
219
|
end
|
|
213
220
|
end
|
|
214
221
|
|
data/lib/atatus/config.rb
CHANGED
|
@@ -151,6 +151,8 @@ module Atatus
|
|
|
151
151
|
|
|
152
152
|
@__view_paths ||= []
|
|
153
153
|
@__root_path ||= Dir.pwd
|
|
154
|
+
|
|
155
|
+
self.filter_exception_types.concat(self.get_default_ignore_exceptions(:sinatra))
|
|
154
156
|
end
|
|
155
157
|
|
|
156
158
|
attr_accessor :__view_paths, :__root_path, :logger
|
|
@@ -286,7 +288,7 @@ module Atatus
|
|
|
286
288
|
begin
|
|
287
289
|
read = File.read(config_file)
|
|
288
290
|
evaled = parse_erb(read)
|
|
289
|
-
|
|
291
|
+
|
|
290
292
|
# YAML.safe_load(evaled)
|
|
291
293
|
|
|
292
294
|
loaded_config = YAML.load(evaled)
|
|
@@ -294,7 +296,7 @@ module Atatus
|
|
|
294
296
|
if loaded_config.key?("default")
|
|
295
297
|
unless loaded_config.key?(env)
|
|
296
298
|
warn "[Atatus] ERROR : atatus.yml does not include '#{env}' section!"
|
|
297
|
-
loaded_config = loaded_config["default"]
|
|
299
|
+
loaded_config = loaded_config["default"]
|
|
298
300
|
end
|
|
299
301
|
end
|
|
300
302
|
|
|
@@ -354,6 +356,10 @@ module Atatus
|
|
|
354
356
|
self.framework_name = framework_name || 'Sinatra'
|
|
355
357
|
self.framework_version = framework_version || ::Sinatra::VERSION
|
|
356
358
|
self.__root_path = Dir.pwd
|
|
359
|
+
|
|
360
|
+
if self.filter_exception_types.nil? || self.filter_exception_types.empty?
|
|
361
|
+
self.filter_exception_types = get_default_ignore_exceptions(:sinatra)
|
|
362
|
+
end
|
|
357
363
|
end
|
|
358
364
|
|
|
359
365
|
def set_rails(app)
|
|
@@ -366,6 +372,10 @@ module Atatus
|
|
|
366
372
|
self.__root_path = ::Rails.root.to_s
|
|
367
373
|
self.__view_paths = app.config.paths['app/views'].existent +
|
|
368
374
|
[::Rails.root.to_s]
|
|
375
|
+
|
|
376
|
+
if self.filter_exception_types.nil? || self.filter_exception_types.empty?
|
|
377
|
+
self.filter_exception_types = get_default_ignore_exceptions(:rails)
|
|
378
|
+
end
|
|
369
379
|
end
|
|
370
380
|
|
|
371
381
|
def rails_app_name(app)
|
|
@@ -379,5 +389,39 @@ module Atatus
|
|
|
379
389
|
def format_name(str)
|
|
380
390
|
str&.gsub('::', '_')
|
|
381
391
|
end
|
|
392
|
+
|
|
393
|
+
def get_default_ignore_exceptions(framework)
|
|
394
|
+
rails_exceptions = [
|
|
395
|
+
"AbstractController::ActionNotFound",
|
|
396
|
+
"ActionController::ParameterMissing",
|
|
397
|
+
"ActiveRecord::RecordNotFound",
|
|
398
|
+
"ActionController::BadRequest",
|
|
399
|
+
"ActionController::InvalidCrossOriginRequest",
|
|
400
|
+
"ActionController::UnknownFormat",
|
|
401
|
+
"ActionDispatch::Http::MimeNegotiation::InvalidType",
|
|
402
|
+
"ActionController::RoutingError",
|
|
403
|
+
"ActionController::InvalidAuthenticityToken",
|
|
404
|
+
"ActionController::NotImplemented",
|
|
405
|
+
"ActionController::UnknownHttpMethod",
|
|
406
|
+
"ActionDispatch::Http::Parameters::ParseError",
|
|
407
|
+
# "ActionController::MethodNotAllowed",
|
|
408
|
+
# "ActionController::UnknownAction",
|
|
409
|
+
]
|
|
410
|
+
|
|
411
|
+
sinatra_exceptions = [
|
|
412
|
+
"Sinatra::NotFound",
|
|
413
|
+
"Rack::QueryParser::InvalidParameterError",
|
|
414
|
+
"Rack::QueryParser::ParameterTypeError",
|
|
415
|
+
]
|
|
416
|
+
|
|
417
|
+
case framework
|
|
418
|
+
when :rails
|
|
419
|
+
rails_exceptions
|
|
420
|
+
when :sinatra
|
|
421
|
+
sinatra_exceptions
|
|
422
|
+
else
|
|
423
|
+
[]
|
|
424
|
+
end
|
|
425
|
+
end
|
|
382
426
|
end
|
|
383
427
|
end
|
data/lib/atatus/error_builder.rb
CHANGED
|
@@ -76,6 +76,7 @@ module Atatus
|
|
|
76
76
|
error.transaction_id = transaction.id
|
|
77
77
|
error.transaction_name = transaction.name
|
|
78
78
|
error.transaction = {
|
|
79
|
+
name: transaction.name,
|
|
79
80
|
sampled: transaction.sampled?,
|
|
80
81
|
type: transaction.type
|
|
81
82
|
}
|
|
@@ -87,6 +88,14 @@ module Atatus
|
|
|
87
88
|
Util.reverse_merge!(error.context.labels, transaction.context.labels)
|
|
88
89
|
Util.reverse_merge!(error.context.custom, transaction.context.custom)
|
|
89
90
|
|
|
91
|
+
# Copy request and response from transaction context
|
|
92
|
+
if transaction.context.request && !error.context.request
|
|
93
|
+
error.context.request = transaction.context.request
|
|
94
|
+
end
|
|
95
|
+
if transaction.context.response && !error.context.response
|
|
96
|
+
error.context.response = transaction.context.response
|
|
97
|
+
end
|
|
98
|
+
|
|
90
99
|
return unless transaction.context.user
|
|
91
100
|
|
|
92
101
|
error.context.user = transaction.context.user
|
data/lib/atatus/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: atatus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1
|
|
4
|
+
version: 2.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Atatus
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-04-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: concurrent-ruby
|