appsignal 1.2.5 → 1.3.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/circle.yml +4 -0
  4. data/ext/agent.yml +11 -11
  5. data/ext/appsignal_extension.c +105 -40
  6. data/lib/appsignal.rb +18 -6
  7. data/lib/appsignal/cli/install.rb +3 -3
  8. data/lib/appsignal/config.rb +19 -5
  9. data/lib/appsignal/event_formatter.rb +3 -2
  10. data/lib/appsignal/event_formatter/elastic_search/search_formatter.rb +1 -1
  11. data/lib/appsignal/event_formatter/mongo_ruby_driver/query_formatter.rb +1 -1
  12. data/lib/appsignal/event_formatter/moped/query_formatter.rb +13 -6
  13. data/lib/appsignal/hooks/mongo_ruby_driver.rb +0 -1
  14. data/lib/appsignal/hooks/net_http.rb +2 -5
  15. data/lib/appsignal/hooks/redis.rb +1 -1
  16. data/lib/appsignal/hooks/sequel.rb +8 -4
  17. data/lib/appsignal/integrations/mongo_ruby_driver.rb +1 -1
  18. data/lib/appsignal/integrations/object.rb +35 -0
  19. data/lib/appsignal/integrations/resque.rb +5 -0
  20. data/lib/appsignal/integrations/sinatra.rb +2 -2
  21. data/lib/appsignal/minutely.rb +41 -0
  22. data/lib/appsignal/params_sanitizer.rb +4 -105
  23. data/lib/appsignal/rack/sinatra_instrumentation.rb +25 -2
  24. data/lib/appsignal/transaction.rb +41 -15
  25. data/lib/appsignal/transmitter.rb +1 -1
  26. data/lib/appsignal/utils.rb +42 -47
  27. data/lib/appsignal/utils/params_sanitizer.rb +58 -0
  28. data/lib/appsignal/utils/query_params_sanitizer.rb +54 -0
  29. data/lib/appsignal/version.rb +1 -1
  30. data/spec/lib/appsignal/config_spec.rb +12 -2
  31. data/spec/lib/appsignal/extension_spec.rb +4 -0
  32. data/spec/lib/appsignal/hooks/net_http_spec.rb +20 -28
  33. data/spec/lib/appsignal/hooks/redis_spec.rb +9 -11
  34. data/spec/lib/appsignal/integrations/object_spec.rb +211 -0
  35. data/spec/lib/appsignal/integrations/sinatra_spec.rb +2 -2
  36. data/spec/lib/appsignal/minutely_spec.rb +54 -0
  37. data/spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb +50 -10
  38. data/spec/lib/appsignal/subscriber_spec.rb +5 -6
  39. data/spec/lib/appsignal/transaction_spec.rb +102 -23
  40. data/spec/lib/appsignal/transmitter_spec.rb +1 -1
  41. data/spec/lib/appsignal/utils/params_sanitizer_spec.rb +122 -0
  42. data/spec/lib/appsignal/utils/query_params_sanitizer_spec.rb +194 -0
  43. data/spec/lib/appsignal/utils_spec.rb +13 -76
  44. data/spec/lib/appsignal_spec.rb +82 -13
  45. metadata +15 -11
  46. data/lib/appsignal/event_formatter/net_http/request_formatter.rb +0 -13
  47. data/lib/appsignal/event_formatter/sequel/sql_formatter.rb +0 -13
  48. data/spec/lib/appsignal/event_formatter/net_http/request_formatter_spec.rb +0 -26
  49. data/spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb +0 -22
  50. data/spec/lib/appsignal/params_sanitizer_spec.rb +0 -200
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 521e9247fc6acfdd862d5ee49fa231906883882b
4
- data.tar.gz: bae55d3f3670ff7119b81bdb9ade0b599669f73d
3
+ metadata.gz: 4023d8cb736130f72754788bec91b9b9fea252b6
4
+ data.tar.gz: d1fd533404476c04494e467db4b4d609c42fc743
5
5
  SHA512:
6
- metadata.gz: d68f09956247bbe23c0a0b0ffcb4a6cd531973752f998977aea39073ab9fc30e386595fb9933e21043e618476ffb3e22183f3fee974be3e906e6ba3dc293daf7
7
- data.tar.gz: fa176448701886352cfacd5e2b4f9a8dcf39669a74372c5876306332a751e14f48cc1e7baf87a2f5464ef584661d0fbdc70a405bd425169ab6d12a35f60e7b40
6
+ metadata.gz: 93c63a9ba4b9c27dcb3df5338406b27fec2bf037c078071473dca6821accf280bfc827591e805ab5cbc0acac457238587374349b1717c5b81465159b15d04f8e
7
+ data.tar.gz: 3fc6023b24f6734cb73aa336beba37e6c22592506a186f96c8a7b32f5be16b2e39e77babfbf8fc3e79d2e2b86608f5d11ca0dc149fbeb71a48c7b157161ebada
@@ -1,3 +1,17 @@
1
+ # 1.3.0
2
+ * Host metrics is now enabled by default
3
+ * Beta of minutely probes including GC metrics
4
+ * Refactor of param sanitization
5
+ * Param filtering for non-Rails frameworks
6
+ * Support for modular Sinatra applications
7
+ * Add Sinatra middleware to `Sinatra::Base` by default
8
+ * Allow a new transaction to be forced by sinatra instrumentation
9
+ * Allow hostname to be set with environment variable
10
+ * Helpers for easy method instrumentation
11
+ * `Appsignal.instrument` helper to easily instrument blocks of code
12
+ * `record_event` method to instrument events without a start hook
13
+ * `send_params` is now configurable via the environment
14
+
1
15
  # 1.2.5
2
16
  * Bugfix in CPU utilization calculation for host metrics
3
17
 
data/circle.yml CHANGED
@@ -1,3 +1,7 @@
1
+ machine:
2
+ ruby:
3
+ version: 2.3.0
4
+
1
5
  dependencies:
2
6
  override:
3
7
  - bundle
@@ -1,18 +1,18 @@
1
1
  ---
2
- version: d9d702b
2
+ version: ec934f7
3
3
  triples:
4
4
  x86_64-linux:
5
- checksum: b5b8fb84a3f7702b1a67cb0f2712997413d58aaa9a1da8d72e356360e1cabcd5
6
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/d9d702b/appsignal-x86_64-linux-all-static.tar.gz
5
+ checksum: 1a247a98823bcf4648363d86d600f2c5f2a4ee147551c6fcee641cef1b109a21
6
+ download_url: https://appsignal-agent-releases.global.ssl.fastly.net/ec934f7/appsignal-x86_64-linux-all-static.tar.gz
7
7
  i686-linux:
8
- checksum: 432c8539e817febe7999d89291bd57fbc6d8dd9450b7003a8f6305083533b49e
9
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/d9d702b/appsignal-i686-linux-all-static.tar.gz
8
+ checksum: cac5e0b0b39d7f546caf8a2f03cf0c063cfa5aa4123c8e85e59bfe667cb8e0ee
9
+ download_url: https://appsignal-agent-releases.global.ssl.fastly.net/ec934f7/appsignal-i686-linux-all-static.tar.gz
10
10
  x86-linux:
11
- checksum: 432c8539e817febe7999d89291bd57fbc6d8dd9450b7003a8f6305083533b49e
12
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/d9d702b/appsignal-i686-linux-all-static.tar.gz
11
+ checksum: cac5e0b0b39d7f546caf8a2f03cf0c063cfa5aa4123c8e85e59bfe667cb8e0ee
12
+ download_url: https://appsignal-agent-releases.global.ssl.fastly.net/ec934f7/appsignal-i686-linux-all-static.tar.gz
13
13
  x86_64-darwin:
14
- checksum: d23f701015bc0f35f8919b15abb74cedf267a88a7ecb6e712ce83eb08c960582
15
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/d9d702b/appsignal-x86_64-darwin-all-static.tar.gz
14
+ checksum: 0c0a61129c40362eee779889cf51e84b97e44366ee3d60a81113655673d6d541
15
+ download_url: https://appsignal-agent-releases.global.ssl.fastly.net/ec934f7/appsignal-x86_64-darwin-all-static.tar.gz
16
16
  universal-darwin:
17
- checksum: d23f701015bc0f35f8919b15abb74cedf267a88a7ecb6e712ce83eb08c960582
18
- download_url: https://appsignal-agent-releases.global.ssl.fastly.net/d9d702b/appsignal-x86_64-darwin-all-static.tar.gz
17
+ checksum: 0c0a61129c40362eee779889cf51e84b97e44366ee3d60a81113655673d6d541
18
+ download_url: https://appsignal-agent-releases.global.ssl.fastly.net/ec934f7/appsignal-x86_64-darwin-all-static.tar.gz
@@ -1,6 +1,20 @@
1
1
  #include "ruby/ruby.h"
2
+ #include "ruby/encoding.h"
2
3
  #include "appsignal_extension.h"
3
4
 
5
+ static inline appsignal_string_t make_appsignal_string(VALUE str) {
6
+ return (appsignal_string_t) {
7
+ .len = RSTRING_LEN(str),
8
+ .buf = RSTRING_PTR(str)
9
+ };
10
+ }
11
+
12
+ static inline VALUE make_ruby_string(appsignal_string_t string) {
13
+ VALUE str = rb_str_new(string.buf, string.len);
14
+ rb_enc_associate(str, rb_utf8_encoding());
15
+ return str;
16
+ }
17
+
4
18
  VALUE Appsignal;
5
19
  VALUE Extension;
6
20
  VALUE ExtTransaction;
@@ -18,26 +32,27 @@ static VALUE stop(VALUE self) {
18
32
  }
19
33
 
20
34
  static VALUE get_server_state(VALUE self, VALUE key) {
21
- char * ptr = appsignal_get_server_state(StringValueCStr(key));
35
+ appsignal_string_t string;
22
36
 
23
37
  Check_Type(key, T_STRING);
24
38
 
25
- if (ptr) {
26
- return rb_str_new2(ptr);
39
+ string = appsignal_get_server_state(make_appsignal_string(key));
40
+ if (string.len > 0) {
41
+ return make_ruby_string(string);
27
42
  } else {
28
43
  return Qnil;
29
44
  }
30
45
  }
31
46
 
32
47
  static VALUE start_transaction(VALUE self, VALUE transaction_id, VALUE namespace) {
33
- appsignal_transaction* transaction;
48
+ appsignal_transaction_t* transaction;
34
49
 
35
50
  Check_Type(transaction_id, T_STRING);
36
51
  Check_Type(namespace, T_STRING);
37
52
 
38
53
  transaction = appsignal_start_transaction(
39
- StringValueCStr(transaction_id),
40
- StringValueCStr(namespace)
54
+ make_appsignal_string(transaction_id),
55
+ make_appsignal_string(namespace)
41
56
  );
42
57
 
43
58
  if (transaction) {
@@ -48,9 +63,9 @@ static VALUE start_transaction(VALUE self, VALUE transaction_id, VALUE namespace
48
63
  }
49
64
 
50
65
  static VALUE start_event(VALUE self) {
51
- appsignal_transaction* transaction;
66
+ appsignal_transaction_t* transaction;
52
67
 
53
- Data_Get_Struct(self, appsignal_transaction, transaction);
68
+ Data_Get_Struct(self, appsignal_transaction_t, transaction);
54
69
 
55
70
  appsignal_start_event(transaction);
56
71
 
@@ -58,71 +73,96 @@ static VALUE start_event(VALUE self) {
58
73
  }
59
74
 
60
75
  static VALUE finish_event(VALUE self, VALUE name, VALUE title, VALUE body, VALUE body_format) {
61
- appsignal_transaction* transaction;
76
+ appsignal_transaction_t* transaction;
62
77
 
63
78
  Check_Type(name, T_STRING);
64
79
  Check_Type(title, T_STRING);
65
80
  Check_Type(body, T_STRING);
66
81
  Check_Type(body_format, T_FIXNUM);
67
- Data_Get_Struct(self, appsignal_transaction, transaction);
82
+ Data_Get_Struct(self, appsignal_transaction_t, transaction);
68
83
 
69
84
  appsignal_finish_event(
70
85
  transaction,
71
- StringValueCStr(name),
72
- StringValueCStr(title),
73
- StringValueCStr(body),
86
+ make_appsignal_string(name),
87
+ make_appsignal_string(title),
88
+ make_appsignal_string(body),
74
89
  FIX2INT(body_format)
75
90
  );
76
91
  return Qnil;
77
92
  }
78
93
 
94
+ static VALUE record_event(VALUE self, VALUE name, VALUE title, VALUE body, VALUE duration, VALUE body_format) {
95
+ appsignal_transaction_t* transaction;
96
+ int duration_type;
97
+
98
+ Check_Type(name, T_STRING);
99
+ Check_Type(title, T_STRING);
100
+ Check_Type(body, T_STRING);
101
+ duration_type = TYPE(duration);
102
+ if (duration_type != T_FIXNUM && duration_type != T_BIGNUM) {
103
+ rb_raise(rb_eTypeError, "duration should be a Fixnum or Bignum");
104
+ }
105
+ Check_Type(body_format, T_FIXNUM);
106
+ Data_Get_Struct(self, appsignal_transaction_t, transaction);
107
+
108
+ appsignal_record_event(
109
+ transaction,
110
+ make_appsignal_string(name),
111
+ make_appsignal_string(title),
112
+ make_appsignal_string(body),
113
+ FIX2INT(body_format),
114
+ NUM2LONG(duration)
115
+ );
116
+ return Qnil;
117
+ }
118
+
79
119
  static VALUE set_transaction_error(VALUE self, VALUE name, VALUE message, VALUE backtrace) {
80
- appsignal_transaction* transaction;
120
+ appsignal_transaction_t* transaction;
81
121
 
82
122
  Check_Type(name, T_STRING);
83
123
  Check_Type(message, T_STRING);
84
124
  Check_Type(backtrace, T_STRING);
85
- Data_Get_Struct(self, appsignal_transaction, transaction);
125
+ Data_Get_Struct(self, appsignal_transaction_t, transaction);
86
126
 
87
127
  appsignal_set_transaction_error(
88
128
  transaction,
89
- StringValueCStr(name),
90
- StringValueCStr(message),
91
- StringValueCStr(backtrace)
129
+ make_appsignal_string(name),
130
+ make_appsignal_string(message),
131
+ make_appsignal_string(backtrace)
92
132
  );
93
133
  return Qnil;
94
134
  }
95
135
 
96
136
  static VALUE set_transaction_sample_data(VALUE self, VALUE key, VALUE payload) {
97
- appsignal_transaction* transaction;
137
+ appsignal_transaction_t* transaction;
98
138
 
99
139
  Check_Type(key, T_STRING);
100
140
  Check_Type(payload, T_STRING);
101
- Data_Get_Struct(self, appsignal_transaction, transaction);
141
+ Data_Get_Struct(self, appsignal_transaction_t, transaction);
102
142
 
103
143
  appsignal_set_transaction_sample_data(
104
144
  transaction,
105
- StringValueCStr(key),
106
- StringValueCStr(payload)
145
+ make_appsignal_string(key),
146
+ make_appsignal_string(payload)
107
147
  );
108
148
  return Qnil;
109
149
  }
110
150
 
111
151
  static VALUE set_transaction_action(VALUE self, VALUE action) {
112
- appsignal_transaction* transaction;
152
+ appsignal_transaction_t* transaction;
113
153
 
114
154
  Check_Type(action, T_STRING);
115
- Data_Get_Struct(self, appsignal_transaction, transaction);
155
+ Data_Get_Struct(self, appsignal_transaction_t, transaction);
116
156
 
117
157
  appsignal_set_transaction_action(
118
158
  transaction,
119
- StringValueCStr(action)
159
+ make_appsignal_string(action)
120
160
  );
121
161
  return Qnil;
122
162
  }
123
163
 
124
164
  static VALUE set_transaction_queue_start(VALUE self, VALUE queue_start) {
125
- appsignal_transaction* transaction;
165
+ appsignal_transaction_t* transaction;
126
166
  int queue_start_type;
127
167
 
128
168
  queue_start_type = TYPE(queue_start);
@@ -130,7 +170,7 @@ static VALUE set_transaction_queue_start(VALUE self, VALUE queue_start) {
130
170
  rb_raise(rb_eTypeError, "queue_start should be a Fixnum or Bignum");
131
171
  }
132
172
 
133
- Data_Get_Struct(self, appsignal_transaction, transaction);
173
+ Data_Get_Struct(self, appsignal_transaction_t, transaction);
134
174
 
135
175
  appsignal_set_transaction_queue_start(
136
176
  transaction,
@@ -140,34 +180,34 @@ static VALUE set_transaction_queue_start(VALUE self, VALUE queue_start) {
140
180
  }
141
181
 
142
182
  static VALUE set_transaction_metadata(VALUE self, VALUE key, VALUE value) {
143
- appsignal_transaction* transaction;
183
+ appsignal_transaction_t* transaction;
144
184
 
145
185
  Check_Type(key, T_STRING);
146
186
  Check_Type(value, T_STRING);
147
- Data_Get_Struct(self, appsignal_transaction, transaction);
187
+ Data_Get_Struct(self, appsignal_transaction_t, transaction);
148
188
 
149
189
  appsignal_set_transaction_metadata(
150
190
  transaction,
151
- StringValueCStr(key),
152
- StringValueCStr(value)
191
+ make_appsignal_string(key),
192
+ make_appsignal_string(value)
153
193
  );
154
194
  return Qnil;
155
195
  }
156
196
 
157
197
  static VALUE finish_transaction(VALUE self) {
158
- appsignal_transaction* transaction;
198
+ appsignal_transaction_t* transaction;
159
199
  int sample;
160
200
 
161
- Data_Get_Struct(self, appsignal_transaction, transaction);
201
+ Data_Get_Struct(self, appsignal_transaction_t, transaction);
162
202
 
163
203
  sample = appsignal_finish_transaction(transaction);
164
204
  return sample == 1 ? Qtrue : Qfalse;
165
205
  }
166
206
 
167
207
  static VALUE complete_transaction(VALUE self) {
168
- appsignal_transaction* transaction;
208
+ appsignal_transaction_t* transaction;
169
209
 
170
- Data_Get_Struct(self, appsignal_transaction, transaction);
210
+ Data_Get_Struct(self, appsignal_transaction_t, transaction);
171
211
 
172
212
  appsignal_complete_transaction(transaction);
173
213
  return Qnil;
@@ -178,7 +218,29 @@ static VALUE set_gauge(VALUE self, VALUE key, VALUE value) {
178
218
  Check_Type(value, T_FLOAT);
179
219
 
180
220
  appsignal_set_gauge(
181
- StringValueCStr(key),
221
+ make_appsignal_string(key),
222
+ NUM2DBL(value)
223
+ );
224
+ return Qnil;
225
+ }
226
+
227
+ static VALUE set_host_gauge(VALUE self, VALUE key, VALUE value) {
228
+ Check_Type(key, T_STRING);
229
+ Check_Type(value, T_FLOAT);
230
+
231
+ appsignal_set_host_gauge(
232
+ make_appsignal_string(key),
233
+ NUM2DBL(value)
234
+ );
235
+ return Qnil;
236
+ }
237
+
238
+ static VALUE set_process_gauge(VALUE self, VALUE key, VALUE value) {
239
+ Check_Type(key, T_STRING);
240
+ Check_Type(value, T_FLOAT);
241
+
242
+ appsignal_set_process_gauge(
243
+ make_appsignal_string(key),
182
244
  NUM2DBL(value)
183
245
  );
184
246
  return Qnil;
@@ -189,7 +251,7 @@ static VALUE increment_counter(VALUE self, VALUE key, VALUE count) {
189
251
  Check_Type(count, T_FIXNUM);
190
252
 
191
253
  appsignal_increment_counter(
192
- StringValueCStr(key),
254
+ make_appsignal_string(key),
193
255
  FIX2INT(count)
194
256
  );
195
257
  return Qnil;
@@ -200,7 +262,7 @@ static VALUE add_distribution_value(VALUE self, VALUE key, VALUE value) {
200
262
  Check_Type(value, T_FLOAT);
201
263
 
202
264
  appsignal_add_distribution_value(
203
- StringValueCStr(key),
265
+ make_appsignal_string(key),
204
266
  NUM2DBL(value)
205
267
  );
206
268
  return Qnil;
@@ -240,10 +302,10 @@ static VALUE install_gc_event_hooks() {
240
302
  Qnil
241
303
  );
242
304
  #endif
243
- #if defined(RUBY_INTERNAL_EVENT_GC_END_SWEEP)
305
+ #if defined(RUBY_INTERNAL_EVENT_GC_END_MARK)
244
306
  rb_add_event_hook(
245
307
  track_gc_end,
246
- RUBY_INTERNAL_EVENT_GC_END_MARK | RUBY_INTERNAL_EVENT_GC_END_SWEEP,
308
+ RUBY_INTERNAL_EVENT_GC_END_MARK,
247
309
  Qnil
248
310
  );
249
311
  #endif
@@ -269,6 +331,7 @@ void Init_appsignal_extension(void) {
269
331
  // Transaction instance methods
270
332
  rb_define_method(ExtTransaction, "start_event", start_event, 0);
271
333
  rb_define_method(ExtTransaction, "finish_event", finish_event, 4);
334
+ rb_define_method(ExtTransaction, "record_event", record_event, 5);
272
335
  rb_define_method(ExtTransaction, "set_error", set_transaction_error, 3);
273
336
  rb_define_method(ExtTransaction, "set_sample_data", set_transaction_sample_data, 2);
274
337
  rb_define_method(ExtTransaction, "set_action", set_transaction_action, 1);
@@ -283,6 +346,8 @@ void Init_appsignal_extension(void) {
283
346
 
284
347
  // Metrics
285
348
  rb_define_singleton_method(Extension, "set_gauge", set_gauge, 2);
349
+ rb_define_singleton_method(Extension, "set_host_gauge", set_host_gauge, 2);
350
+ rb_define_singleton_method(Extension, "set_process_gauge", set_process_gauge, 2);
286
351
  rb_define_singleton_method(Extension, "increment_counter", increment_counter, 2);
287
352
  rb_define_singleton_method(Extension, "add_distribution_value", add_distribution_value, 2);
288
353
  }
@@ -58,7 +58,11 @@ module Appsignal
58
58
  Appsignal::EventFormatter.initialize_formatters
59
59
  initialize_extensions
60
60
  Appsignal::Extension.install_allocation_event_hook if config[:enable_allocation_tracking]
61
- Appsignal::Extension.install_gc_event_hooks if config[:enable_gc_instrumentation]
61
+ if config[:enable_gc_instrumentation]
62
+ Appsignal::Extension.install_gc_event_hooks
63
+ Appsignal::Minutely.add_gc_probe
64
+ end
65
+ Appsignal::Minutely.start if config[:enable_minutely_probes]
62
66
  @subscriber = Appsignal::Subscriber.new
63
67
  else
64
68
  logger.info("Not starting, not active for #{config.env}")
@@ -177,32 +181,39 @@ module Appsignal
177
181
  end
178
182
  alias :tag_job :tag_request
179
183
 
184
+ def instrument(name, title=nil, body=nil, body_format=Appsignal::EventFormatter::DEFAULT)
185
+ Appsignal::Transaction.current.start_event
186
+ r = yield
187
+ Appsignal::Transaction.current.finish_event(name, title, body, body_format)
188
+ r
189
+ end
190
+
180
191
  def set_gauge(key, value)
181
- Appsignal::Extension.set_gauge(key, value.to_f)
192
+ Appsignal::Extension.set_gauge(key.to_s, value.to_f)
182
193
  rescue RangeError
183
194
  Appsignal.logger.warn("Gauge value #{value} for key '#{key}' is too big")
184
195
  end
185
196
 
186
197
  def set_host_gauge(key, value)
187
- Appsignal::Extension.set_host_gauge(key, value.to_f)
198
+ Appsignal::Extension.set_host_gauge(key.to_s, value.to_f)
188
199
  rescue RangeError
189
200
  Appsignal.logger.warn("Host gauge value #{value} for key '#{key}' is too big")
190
201
  end
191
202
 
192
203
  def set_process_gauge(key, value)
193
- Appsignal::Extension.set_process_gauge(key, value.to_f)
204
+ Appsignal::Extension.set_process_gauge(key.to_s, value.to_f)
194
205
  rescue RangeError
195
206
  Appsignal.logger.warn("Process gauge value #{value} for key '#{key}' is too big")
196
207
  end
197
208
 
198
209
  def increment_counter(key, value=1)
199
- Appsignal::Extension.increment_counter(key, value)
210
+ Appsignal::Extension.increment_counter(key.to_s, value)
200
211
  rescue RangeError
201
212
  Appsignal.logger.warn("Counter value #{value} for key '#{key}' is too big")
202
213
  end
203
214
 
204
215
  def add_distribution_value(key, value)
205
- Appsignal::Extension.add_distribution_value(key, value.to_f)
216
+ Appsignal::Extension.add_distribution_value(key.to_s, value.to_f)
206
217
  rescue RangeError
207
218
  Appsignal.logger.warn("Distribution value #{value} for key '#{key}' is too big")
208
219
  end
@@ -280,6 +291,7 @@ require 'appsignal/config'
280
291
  require 'appsignal/event_formatter'
281
292
  require 'appsignal/hooks'
282
293
  require 'appsignal/marker'
294
+ require 'appsignal/minutely'
283
295
  require 'appsignal/params_sanitizer'
284
296
  require 'appsignal/integrations/railtie' if defined?(::Rails)
285
297
  require 'appsignal/integrations/resque'
@@ -85,7 +85,7 @@ module Appsignal
85
85
  puts 'Installing for Sinatra'
86
86
  config[:name] = required_input(' Enter application name: ')
87
87
  puts
88
- configure(config, ['production', 'staging'], true)
88
+ configure(config, ['development', 'production', 'staging'], true)
89
89
 
90
90
  puts "Finish Sinatra configuration"
91
91
  puts " Sinatra requires some manual configuration."
@@ -107,7 +107,7 @@ module Appsignal
107
107
  config[:name] = required_input(' Enter application name: ')
108
108
  puts
109
109
 
110
- configure(config, ['production', 'staging'], true)
110
+ configure(config, ['development', 'production', 'staging'], true)
111
111
 
112
112
  puts "Finish Padrino installation"
113
113
  puts " Padrino requires some manual configuration."
@@ -127,7 +127,7 @@ module Appsignal
127
127
  config[:name] = required_input(' Enter application name: ')
128
128
  puts
129
129
 
130
- configure(config, ['production', 'staging'], true)
130
+ configure(config, ['development', 'production', 'staging'], true)
131
131
 
132
132
  puts "Manual Grape configuration needed"
133
133
  puts " See the installation instructions here:"