appmap 0.93.0 → 0.93.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/appmap/middleware/remote_recording.rb +39 -32
- data/lib/appmap/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: 065c32b4761f0e0c6ddbe31d008e6e015935b327a78a948ba546fea284e2e1c5
|
4
|
+
data.tar.gz: e960cde3aca40d4d103ffdbb1b9384e827555a0ae53f135142744fdbcd5adc99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2efd8e697df46ae1f65630b49567283e437586b9a4bb6177d08d481a27a13167d2bae303ca27a9b17bcb57d396ed51f4683a1fa617804eb61222deb0ae0fb95
|
7
|
+
data.tar.gz: 2cc2eeba86b6b35452dd2b2b3f76b0adeffdcfe0fb54e6a03c85a445de3004abec26dea56b07c117a8e90ce3e9e52115398b993cdc5e322801cf248accbcbbd6
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.93.1](https://github.com/getappmap/appmap-ruby/compare/v0.93.0...v0.93.1) (2022-10-04)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* Unyield static asset requests ([4041e4b](https://github.com/getappmap/appmap-ruby/commit/4041e4bbfb44612c5ade2cba334e1ab36a7929e5))
|
7
|
+
|
1
8
|
# [0.93.0](https://github.com/getappmap/appmap-ruby/compare/v0.92.1...v0.93.0) (2022-09-22)
|
2
9
|
|
3
10
|
|
@@ -89,39 +89,46 @@ module AppMap
|
|
89
89
|
# into a separate Tracer.
|
90
90
|
tracer = AppMap.tracing.trace(thread: Thread.current) if record_all_requests?
|
91
91
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
92
|
+
record_request = lambda do |args|
|
93
|
+
return unless tracer
|
94
|
+
|
95
|
+
AppMap.tracing.delete(tracer)
|
96
|
+
|
97
|
+
status, headers = args
|
98
|
+
events = tracer.events.map(&:to_h)
|
99
|
+
|
100
|
+
event_fields = events.map(&:keys).flatten.map(&:to_sym).uniq.sort
|
101
|
+
return unless %i[http_server_request http_server_response].all? { |field| event_fields.include?(field) }
|
102
|
+
|
103
|
+
path = req.path.gsub(/\/{2,}/, '/') # Double slashes have been observed
|
104
|
+
appmap_name = "#{req.request_method} #{path} (#{status}) - #{start_time.strftime('%T.%L')}"
|
105
|
+
appmap_file_name = AppMap::Util.scenario_filename([ start_time.to_f, req.url ].join('_'))
|
106
|
+
output_dir = File.join(AppMap::DEFAULT_APPMAP_DIR, 'requests')
|
107
|
+
appmap_file_path = File.join(output_dir, appmap_file_name)
|
108
|
+
|
109
|
+
metadata = AppMap.detect_metadata
|
110
|
+
metadata[:name] = appmap_name
|
111
|
+
metadata[:timestamp] = start_time.to_f
|
112
|
+
metadata[:recorder] = {
|
113
|
+
name: 'rack',
|
114
|
+
type: 'requests'
|
115
|
+
}
|
116
|
+
|
117
|
+
appmap = {
|
118
|
+
version: AppMap::APPMAP_FORMAT_VERSION,
|
119
|
+
classMap: AppMap.class_map(tracer.event_methods),
|
120
|
+
metadata: metadata,
|
121
|
+
events: events
|
122
|
+
}
|
123
|
+
|
124
|
+
FileUtils.mkdir_p(output_dir)
|
125
|
+
File.write(appmap_file_path, JSON.generate(appmap))
|
126
|
+
|
127
|
+
headers['AppMap-Name'] = File.expand_path(appmap_name)
|
128
|
+
headers['AppMap-File-Name'] = File.expand_path(appmap_file_path)
|
124
129
|
end
|
130
|
+
|
131
|
+
@app.call(env).tap(&record_request)
|
125
132
|
end
|
126
133
|
|
127
134
|
def recording_state
|
data/lib/appmap/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appmap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.93.
|
4
|
+
version: 0.93.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Gilpin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: method_source
|