appsignal 1.2.0.alpha.3 → 1.2.0.alpha.4
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/ext/agent.yml +9 -13
- data/ext/appsignal_extension.c +16 -0
- data/lib/appsignal.rb +4 -0
- data/lib/appsignal/config.rb +1 -1
- data/lib/appsignal/transaction.rb +4 -1
- data/lib/appsignal/version.rb +1 -1
- data/lib/tasks/diag.rake +6 -2
- data/spec/lib/appsignal_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2ff73e89a8b3eb74dd286291bc97bed89436b27
|
4
|
+
data.tar.gz: 0d94e85529cec5b6542ee31b59ba91402ad741cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 489c2779aa02038bde3bda1f3234f84d20ffd13abbf3c995247462c574e641cddcbbd2e2b68720560bd77d66d8a875043c795feb1aa90f555f26d419513808a2
|
7
|
+
data.tar.gz: 343e5893974f367981fe483b8304b3ae6974abea8078d1c3c1be290749f2a0e6d071060a3d0bf21d39b960c31509c239d4792b0c6963f17c270f85c5455eb266
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,13 @@
|
|
3
3
|
* Beta version of collecting host metrics (disabled by default)
|
4
4
|
* Hooks for Shuryoken
|
5
5
|
|
6
|
+
# 1.1.9
|
7
|
+
* Fix for race condition when creating working dir exactly at the same time
|
8
|
+
* Make diag Rake task resilient to missing config
|
9
|
+
|
10
|
+
# 1.1.8
|
11
|
+
* Require json to fix problem with using from Capistrano
|
12
|
+
|
6
13
|
# 1.1.7
|
7
14
|
* Make logging resilient for closing FD's (daemons gem does this)
|
8
15
|
* Add support for using Resque through ActiveJob
|
data/ext/agent.yml
CHANGED
@@ -1,19 +1,15 @@
|
|
1
1
|
---
|
2
|
-
version:
|
2
|
+
version: c5f733e
|
3
3
|
triples:
|
4
4
|
x86_64-linux:
|
5
|
-
checksum:
|
6
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
7
|
-
lib_filename: libappsignal.a
|
5
|
+
checksum: 222b6eeb2a356439b2f16fbee7693f028f8fc9ab8ba7aebae98ec6fdb7ab78b1
|
6
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/c5f733e/appsignal-x86_64-linux-all-static.tar.gz
|
8
7
|
i686-linux:
|
9
|
-
checksum:
|
10
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
11
|
-
lib_filename: libappsignal.a
|
8
|
+
checksum: 5989723aa1ace7005e5bfdcde2703532362d17cfde39cec9c2969f5136eb65fa
|
9
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/c5f733e/appsignal-i686-linux-all-static.tar.gz
|
12
10
|
x86-linux:
|
13
|
-
checksum:
|
14
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
15
|
-
lib_filename: libappsignal.a
|
11
|
+
checksum: 5989723aa1ace7005e5bfdcde2703532362d17cfde39cec9c2969f5136eb65fa
|
12
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/c5f733e/appsignal-i686-linux-all-static.tar.gz
|
16
13
|
x86_64-darwin:
|
17
|
-
checksum:
|
18
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
19
|
-
lib_filename: libappsignal.a
|
14
|
+
checksum: 81bb1d29e9d13394f45d3634b9a53c2eb4f4bfcebfbe7b6178dd7c6295a28e99
|
15
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/c5f733e/appsignal-x86_64-darwin-all-static.tar.gz
|
data/ext/appsignal_extension.c
CHANGED
@@ -17,10 +17,23 @@ static VALUE stop(VALUE self) {
|
|
17
17
|
return Qnil;
|
18
18
|
}
|
19
19
|
|
20
|
+
static VALUE get_server_state(VALUE self, VALUE key) {
|
21
|
+
char * ptr = appsignal_get_server_state(StringValueCStr(key));
|
22
|
+
|
23
|
+
Check_Type(key, T_STRING);
|
24
|
+
|
25
|
+
if (ptr) {
|
26
|
+
return rb_str_new2(ptr);
|
27
|
+
} else {
|
28
|
+
return Qnil;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
20
32
|
static VALUE start_transaction(VALUE self, VALUE transaction_id, VALUE namespace) {
|
21
33
|
appsignal_transaction* transaction;
|
22
34
|
|
23
35
|
Check_Type(transaction_id, T_STRING);
|
36
|
+
Check_Type(namespace, T_STRING);
|
24
37
|
|
25
38
|
transaction = appsignal_start_transaction(
|
26
39
|
StringValueCStr(transaction_id),
|
@@ -242,6 +255,9 @@ void Init_appsignal_extension(void) {
|
|
242
255
|
rb_define_singleton_method(Extension, "start", start, 0);
|
243
256
|
rb_define_singleton_method(Extension, "stop", stop, 0);
|
244
257
|
|
258
|
+
// Server state
|
259
|
+
rb_define_singleton_method(Extension, "get_server_state", get_server_state, 1);
|
260
|
+
|
245
261
|
// Start transaction
|
246
262
|
rb_define_singleton_method(Extension, "start_transaction", start_transaction, 2);
|
247
263
|
|
data/lib/appsignal.rb
CHANGED
data/lib/appsignal/config.rb
CHANGED
@@ -172,7 +172,7 @@ module Appsignal
|
|
172
172
|
%w(APPSIGNAL_ACTIVE APPSIGNAL_DEBUG APPSIGNAL_INSTRUMENT_NET_HTTP
|
173
173
|
APPSIGNAL_SKIP_SESSION_DATA APPSIGNAL_ENABLE_FRONTEND_ERROR_CATCHING
|
174
174
|
APPSIGNAL_ENABLE_ALLOCATION_TRACKING APPSIGNAL_ENABLE_GC_INSTRUMENTATION
|
175
|
-
APPSIGNAL_RUNNING_IN_CONTAINER).each do |var|
|
175
|
+
APPSIGNAL_RUNNING_IN_CONTAINER APPSIGNAL_COLLECT_HOST_METRICS).each do |var|
|
176
176
|
if env_var = ENV[var]
|
177
177
|
config[ENV_TO_KEY_MAPPING[var]] = env_var == 'true'
|
178
178
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
1
3
|
module Appsignal
|
2
4
|
class Transaction
|
3
5
|
HTTP_REQUEST = 'http_request'.freeze
|
@@ -14,7 +16,8 @@ module Appsignal
|
|
14
16
|
HTTP_X_QUEUE_TIME HTTP_X_HEROKU_QUEUE_WAIT_TIME HTTP_X_APPLICATION_START
|
15
17
|
HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING HTTP_ACCEPT_LANGUAGE
|
16
18
|
HTTP_CACHE_CONTROL HTTP_CONNECTION HTTP_USER_AGENT HTTP_FROM HTTP_NEGOTIATE
|
17
|
-
HTTP_PRAGMA HTTP_REFERER HTTP_X_FORWARDED_FOR HTTP_CLIENT_IP HTTP_RANGE
|
19
|
+
HTTP_PRAGMA HTTP_REFERER HTTP_X_FORWARDED_FOR HTTP_CLIENT_IP HTTP_RANGE
|
20
|
+
HTTP_X_AUTH_TOKEN)
|
18
21
|
|
19
22
|
JSON_EXCEPTIONS = [
|
20
23
|
IOError,
|
data/lib/appsignal/version.rb
CHANGED
data/lib/tasks/diag.rake
CHANGED
@@ -20,8 +20,12 @@ namespace :appsignal do
|
|
20
20
|
|
21
21
|
desc "Checks if config is present and shows the values"
|
22
22
|
task :config => :start_appsignal do
|
23
|
-
Appsignal.config.config_hash
|
24
|
-
|
23
|
+
if Appsignal.config && Appsignal.config.config_hash
|
24
|
+
Appsignal.config.config_hash.each do |key, val|
|
25
|
+
puts "Config #{key}: #{val}"
|
26
|
+
end
|
27
|
+
else
|
28
|
+
puts "No config present"
|
25
29
|
end
|
26
30
|
end
|
27
31
|
|
data/spec/lib/appsignal_spec.rb
CHANGED
@@ -204,6 +204,18 @@ describe Appsignal do
|
|
204
204
|
end
|
205
205
|
end
|
206
206
|
|
207
|
+
describe ".get_server_state" do
|
208
|
+
it "should call server state on the extension" do
|
209
|
+
Appsignal::Extension.should_receive(:get_server_state).with('key')
|
210
|
+
|
211
|
+
Appsignal.get_server_state('key')
|
212
|
+
end
|
213
|
+
|
214
|
+
it "should get nil by default" do
|
215
|
+
Appsignal.get_server_state('key').should be_nil
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
207
219
|
context "not active" do
|
208
220
|
describe ".monitor_transaction" do
|
209
221
|
it "should do nothing but still yield the block" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.0.alpha.
|
4
|
+
version: 1.2.0.alpha.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-06-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|