elastic-apm 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.ci/Jenkinsfile +4 -1
  3. data/CHANGELOG.asciidoc +497 -0
  4. data/CHANGELOG.md +1 -359
  5. data/Rakefile +2 -2
  6. data/docs/advanced.asciidoc +0 -2
  7. data/docs/api.asciidoc +12 -1
  8. data/docs/configuration.asciidoc +15 -4
  9. data/docs/custom-instrumentation.asciidoc +2 -2
  10. data/docs/debugging.asciidoc +1 -1
  11. data/docs/getting-started-rack.asciidoc +4 -1
  12. data/docs/getting-started-rails.asciidoc +2 -2
  13. data/docs/index.asciidoc +8 -9
  14. data/docs/introduction.asciidoc +17 -15
  15. data/docs/opentracing.asciidoc +13 -13
  16. data/docs/release-notes.asciidoc +11 -1
  17. data/docs/set-up.asciidoc +16 -0
  18. data/docs/supported-technologies.asciidoc +2 -4
  19. data/lib/elastic_apm.rb +2 -2
  20. data/lib/elastic_apm/agent.rb +4 -4
  21. data/lib/elastic_apm/central_config.rb +7 -3
  22. data/lib/elastic_apm/config.rb +2 -2
  23. data/lib/elastic_apm/config/options.rb +6 -0
  24. data/lib/elastic_apm/context.rb +15 -1
  25. data/lib/elastic_apm/instrumenter.rb +8 -7
  26. data/lib/elastic_apm/normalizers.rb +0 -9
  27. data/lib/elastic_apm/normalizers/rails.rb +10 -0
  28. data/lib/elastic_apm/normalizers/{action_controller.rb → rails/action_controller.rb} +0 -0
  29. data/lib/elastic_apm/normalizers/{action_mailer.rb → rails/action_mailer.rb} +0 -0
  30. data/lib/elastic_apm/normalizers/{action_view.rb → rails/action_view.rb} +0 -0
  31. data/lib/elastic_apm/normalizers/{active_record.rb → rails/active_record.rb} +0 -0
  32. data/lib/elastic_apm/rails.rb +1 -0
  33. data/lib/elastic_apm/sinatra.rb +36 -0
  34. data/lib/elastic_apm/transaction.rb +13 -6
  35. data/lib/elastic_apm/transport/serializers/context_serializer.rb +13 -1
  36. data/lib/elastic_apm/version.rb +1 -1
  37. metadata +10 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 77a4cbfd5c5c3031b8d83865203a8b0fa2d4b7146b98e1b52828a3ac9513765d
4
- data.tar.gz: bbed03cae2b396e1967a82036d67feaf00d86cc07d8d0eef51a5bb9bb5cf9607
3
+ metadata.gz: 123006390aa4ec1e409d45dfb91547a6f724c65e054b68278c93d2658dbc39fc
4
+ data.tar.gz: 38961a4b6606f592cf32ed7298d302beaa19673c4409f9561dbba5f468fad5da
5
5
  SHA512:
6
- metadata.gz: 9621a7cf92e596e45a26d863f781e4ad9f8f9122bc976d0906f78e1c1d5e80801aec4ab402677f542022769f4ef7c101aec77fa80f8cb7e40d486ea76a977a58
7
- data.tar.gz: f32184577052ee7be8f72b24cb9d41445bd072f945541080d08edffe980549d4eb2807a7909ae30676a0620890140f8022a49fd11d903abece0ac267baa44588
6
+ metadata.gz: 956689269daf15587d89a0f578fd7ddff3f05536f8fd98a758978a8d50d8cfabd0ddd6908c9d7ba8c76418f6df9542f0d7d1278f95cd809d5026320e696bd45b
7
+ data.tar.gz: 9f866f05c3e0d8b43ffcdc31f54665db68a239abf5915b2913dca74154f7a1f91c50b3dbacb7eeee97a90a64584973c796b105c37ae442fa5d21ae47cbabf73d
@@ -141,7 +141,10 @@ pipeline {
141
141
  script {
142
142
  def versions = readYaml(file: ".ci/.jenkins_ruby.yml")
143
143
  def benchmarkTask = [:]
144
- versions['RUBY_VERSION'].each{ v ->
144
+ // TODO: benchmark for the jruby:9.2 and similar versions got some issues with
145
+ // NoMethodError: undefined method `[]' for nil:NilClass
146
+ // <main> at bench/report.rb:48
147
+ versions['RUBY_VERSION'].findAll { !it.contains('9.2') }.each{ v ->
145
148
  benchmarkTask[v] = runBenchmark(v)
146
149
  }
147
150
  parallel(benchmarkTask)
@@ -0,0 +1,497 @@
1
+ ifdef::env-github[]
2
+ NOTE: Release notes are best read in our documentation at
3
+ https://www.elastic.co/guide/en/apm/agent/ruby/current/release-notes.html[elastic.co]
4
+ endif::[]
5
+
6
+ ////
7
+ [[release-notes-x.x.x]]
8
+ ==== x.x.x (YYYY-MM-DD)
9
+
10
+ [float]
11
+ ===== Breaking changes
12
+ - Breaking change
13
+
14
+ [float]
15
+ ===== Deprecated
16
+ - Deprecation {pull}2526[#2526]
17
+
18
+ [float]
19
+ ===== Added
20
+ - Feature {pull}2526[#2526]
21
+
22
+ [float]
23
+ ===== Changed
24
+ - Change {pull}2526[#2526]
25
+
26
+ [float]
27
+ ===== Fixed
28
+ - Fix {pull}2526[#2526]
29
+ ////
30
+
31
+ [[release-notes-3.x]]
32
+ === Ruby Agent version 3.x
33
+
34
+ [[release-notes-3.1.0]]
35
+ ==== 3.1.0 (2019-10-21)
36
+
37
+ [float]
38
+ ===== Added
39
+
40
+ - Add `ElasticAPM::Sinatra.start` API. {pull}556[#566]
41
+
42
+ [float]
43
+ ===== Changes
44
+
45
+ - Log 404s from CentralConfig on debug level {pull}553[#553]
46
+
47
+ [float]
48
+ ===== Fixed
49
+
50
+ - Fix Central Config url path {pull}578[#578]
51
+
52
+ [[release-notes-3.0.0]]
53
+ ==== 3.0.0 (2019-10-08)
54
+
55
+ [float]
56
+ ===== Breaking Changes
57
+
58
+ The following changes are breaking, as they may change the way data is grouped or shown in Kibana or how your app
59
+ defines agent settings.
60
+
61
+ - Decrease stack_trace_limit to 50 {pull}515[#515]
62
+ - Errors' `message` no longer include their `type` {pull}323[#323]
63
+ - External request spans now have type `external.http.{library}` {pull}514[#514]
64
+ - Durations are measured using monotonic time {pull}550[#550]
65
+ - Rename set_tag to set_label {pull}543[#543]
66
+ - Rename disabled_spies to disabled_instrumentations {pull}539[#539]
67
+
68
+ [[release-notes-2.x]]
69
+ === Ruby Agent version 2.x
70
+
71
+ [[release-notes-2.12.0]]
72
+ ==== 2.12.0 (2019-10-01)
73
+
74
+ [float]
75
+ ===== Changed
76
+
77
+ - `disabled_spies` renamed to `disabled_instrumentations` with fallback {pull}539[#539]
78
+ - Rename `set_tag` to `set_label` and deprecate `set_tag` {pull}543[#543]
79
+ - Allow non-String label values {pull}543[#543]
80
+
81
+ [float]
82
+ ===== Fixed
83
+
84
+ - Handles a case where stacktrace frames are empty {pull}538[#538]
85
+
86
+ [float]
87
+ ===== Deprecated
88
+
89
+ - Deprecate `set_tag` {pull}543[#543]
90
+
91
+ [[release-notes-2.11.0]]
92
+ ==== 2.11.0 (2019-09-23)
93
+
94
+ [float]
95
+ ===== Added
96
+
97
+ - Add `Rails` module with `#start` method to run Rails setup explicitly {pull}522[#522]
98
+ - Support for log/trace correlation {pull}527[#527]
99
+
100
+ [float]
101
+ ===== Changed
102
+
103
+ - Split dot-separated `span.type` into `.type`, `.subtype` and `.action` (auto-upgrades dot style) {pull}531[#531]
104
+
105
+ [[release-notes-2.10.1]]
106
+ ==== 2.10.1
107
+
108
+ [float]
109
+ ===== Fixed
110
+
111
+ - Fixed loading options from a config file specified by `ELASTIC_APM_CONFIG_FILE` {pull}518[#518]
112
+ - Fixed an issue with CentralConfig polling not starting {pull}525[#525]
113
+
114
+ [float]
115
+ ===== Added
116
+
117
+ - Support for chained exceptions {pull}488[#488]
118
+
119
+ [[release-notes-2.10.0]]
120
+ ==== 2.10.0
121
+
122
+ [float]
123
+ ===== Added
124
+
125
+ - Add Ruby specific metrics {pull}437[#437]
126
+ - Support for APM Agent Configuration via Kibana {pull}464[#464]
127
+ - Change span name format and add command to context's db.statement for `MongoSpy` {pull}488[#488]
128
+
129
+ [float]
130
+ ===== Changed
131
+
132
+ - `ElasticAPM.report` and `ElasticAPM.report_message` return the string ID of the generated `Error` objects {pull}507[#507]
133
+
134
+ [[release-notes-2.9.1]]
135
+ ==== 2.9.1 (2019-06-28)
136
+
137
+ [float]
138
+ ===== Fixed
139
+
140
+ - Use system CA certificate if none is specified {pull}460[#460]
141
+
142
+ [[release-notes-2.9.0]]
143
+ ==== 2.9.0 (2019-06-25)
144
+
145
+ [float]
146
+ ===== Security
147
+
148
+ - **NB:** If you are using a custom CA cert via `server_ca_cert`, versions of the agent prior to 2.9.0 may not have validated the certificate of APM Server correctly.
149
+
150
+ [float]
151
+ ===== Added
152
+
153
+ - Add `transaction.type` to errors {pull}434[#434]
154
+ - Add cookies to `request.cookies` {pull}448[#448]
155
+
156
+ [float]
157
+ ===== Fixed
158
+
159
+ - Fix support for older versions of Http.rb {pull}438[#438]
160
+ - Strip `Cookie` and `Set-Cookie` from headers {pull}448[#448]
161
+ - Fix disabling SSL verification {pull}449[#449]
162
+
163
+ [[release-notes-2.8.1]]
164
+ ==== 2.8.1 (2019-05-29)
165
+
166
+ [float]
167
+ ===== Fixed
168
+
169
+ - Database statements are properly truncated {pull}431[#431]
170
+
171
+ [[release-notes-2.8.0]]
172
+ ==== 2.8.0 (2019-05-20)
173
+
174
+ [float]
175
+ ===== Added
176
+
177
+ - The option `stack_trace_limit` {pull}424[#424]
178
+
179
+ [float]
180
+ ===== Changed
181
+
182
+ - Use standardized User-Agent {pull}419[#419]
183
+
184
+ [float]
185
+ ===== Fixed
186
+
187
+ - `error.culprit` is properly truncated to 1024 characters {pull}418[#418]
188
+ - Force convert `transaction.context.response.status_code` to integer {pull}423[#423]
189
+
190
+ [[release-notes-2.7.0]]
191
+ ==== 2.7.0 (2019-05-07)
192
+
193
+ [float]
194
+ ===== Added
195
+
196
+ - Added `disable_start_message` for those wanting complete silence on boot {pull}397[#397]
197
+
198
+ [float]
199
+ ===== Changed
200
+
201
+ - Attempt to strip secrets from `request.env` {pull}410[#410]
202
+
203
+ [float]
204
+ ===== Fixed
205
+
206
+ - Rewritten most of the internal transport code, streaming events to APM Server {pull}372[#372]
207
+ - Re-added `default_tags` {pull}395[#395]
208
+ - A bug in the Faraday spy when disabling the Net::HTTP spy {pull}396[#396]
209
+ - Fix disabling the ActionDispatch spy {pull}399[#399]
210
+
211
+ [[release-notes-2.6.1]]
212
+ ==== 2.6.1 (2019-03-28)
213
+
214
+ [float]
215
+ ===== Fixed
216
+
217
+ - Setting `config_file` via `ELASTIC_APM_CONFIG_FILE` {pull}363[#363]
218
+ - Stopping the Metrics collector when it is disabled {pull}357[#357]
219
+ - HTTP proxy settings can now be set by ENV variable {pull}367[#367]
220
+
221
+ [[release-notes-2.6.0]]
222
+ ==== 2.6.0 (2019-03-19)
223
+
224
+ [float]
225
+ ===== Deprecated
226
+
227
+ - `ElasticAPM.build_context` now takes two keyword arguments instead of a single, normal argument. https://www.elastic.co/guide/en/apm/agent/ruby/2.x/api.html#api-agent-build-context[Docs].
228
+ - The option `capture_body` has a string value instead of boolean. https://www.elastic.co/guide/en/apm/agent/ruby/2.x/configuration.html#config-capture-body[Docs].
229
+
230
+ Both APIs are backwards compatible with fallbacks and deprecation warnings, scheduled for removal in next major release.
231
+
232
+ [float]
233
+ ===== Added
234
+
235
+ - Configuration options to use an HTTP proxy {pull}352[#352]
236
+
237
+ [float]
238
+ ===== Changed
239
+
240
+ - Errors get their own contexts, perhaps leading to slightly different (but more correct) results. {pull}335[#335]
241
+ - The agent no longer starts automatically inside Rails' console {pull}343[#343]
242
+
243
+ [float]
244
+ ===== Fixed
245
+
246
+ - Fixed reading available memory on older Linux kernels {pull}351[#351]
247
+ - Don't apply filters to original response headers {pull}354[#354]
248
+
249
+ [[release-notes-2.5.0]]
250
+ ==== 2.5.0 (2019-03-01)
251
+
252
+ [float]
253
+ ===== Added
254
+
255
+ - Added the option `active` that will prevent the agent from starting if set to `false` {pull}338[#338]
256
+
257
+ [float]
258
+ ===== Fixed
259
+
260
+ - Fix error with `capture_body` and nested request bodies {pull}339[#339]
261
+
262
+ [[release-notes-2.4.0]]
263
+ ==== 2.4.0 (2019-02-27)
264
+
265
+ [float]
266
+ ===== Added
267
+
268
+ - Added option to specify a custom server CA certificate {pull}315[#315]
269
+
270
+ [float]
271
+ ===== Changed
272
+
273
+ - **NB:** Default value of option `capture_body` flipped to `false` to align with other agents. Set `capture_body: true` in your configuration to get them back. {pull}324[#324]
274
+
275
+ [float]
276
+ ===== Fixed
277
+
278
+ - Reading CPU stats from `/proc/stat` on RHEL {pull}312[#312]
279
+ - Change TraceContext to differentiate between `id` and `parent_id` {pull}326[#326]
280
+ - `capture_body` will now force encode text bodies to utf-8 when possible {pull}332[#332]
281
+
282
+ [[release-notes-2.3.1]]
283
+ ==== 2.3.1 (2019-01-31)
284
+
285
+ [float]
286
+ ===== Added
287
+
288
+ - Read container info from Docker or Kupernetes {pull}303[#303]
289
+
290
+ [float]
291
+ ===== Fixed
292
+
293
+ - Fix logging exceptions when booting via Railtie {pull}306[#306]
294
+
295
+ [[release-notes-2.3.0]]
296
+ ==== 2.3.0 (2019-01-29)
297
+
298
+ [float]
299
+ ===== Added
300
+
301
+ - Support for Metrics {pull}276[#276]
302
+
303
+ [[release-notes-2.2.0]]
304
+ ==== 2.2.0 (2019-01-22)
305
+
306
+ [float]
307
+ ===== Added
308
+
309
+ - Support for https://opentracing.io[OpenTracing] {pull}273[#273]
310
+ - Add capture\_\* options {pull}279[#279]
311
+ - Evaluate the config file as ERB {pull}288[#288]
312
+
313
+ [float]
314
+ ===== Changed
315
+
316
+ - Rename `Traceparent` object to `TraceContext` {pull}271[#271]
317
+
318
+ [float]
319
+ ===== Fixed
320
+
321
+ - An issue where Spans would not get Stacktraces attached {pull}282[#282]
322
+ - Skip `caller` unless needed {pull}287[#287]
323
+
324
+ [[release-notes-2.1.2]]
325
+ ==== 2.1.2 (2018-12-07)
326
+
327
+ [float]
328
+ ===== Fixed
329
+
330
+ - Fix truncation of `transaction.request.url` values {pull}267[#267]
331
+ - Fix Faraday calls with `url_prefix` {pull}263[#263]
332
+ - Force `span.context.http.status_code` to be an integer
333
+
334
+ [[release-notes-2.1.1]]
335
+ ==== 2.1.1 (2018-12-04)
336
+
337
+ [float]
338
+ ===== Fixed
339
+
340
+ - Set traceparent span.id to transaction id when span is missing {pull}261[#261]
341
+
342
+ [[release-notes-2.1.0]]
343
+ ==== 2.1.0 (2018-12-04)
344
+
345
+ [float]
346
+ ===== Added
347
+
348
+ - Support for Faraday {pull}249[#249]
349
+
350
+ [float]
351
+ ===== Fixed
352
+
353
+ - Truncate keyword fields to 1024 chars {pull}240[#240]
354
+ - Lazy boot worker threads on first event. Fixes apps using Puma's `preload_app!` {pull}239[#239]
355
+ - Fix missing `disable_send` implementation {pull}257[#257]
356
+ - Add warnings for invalid config options {pull}254[#254]
357
+
358
+ [[release-notes-2.0.1]]
359
+ ==== 2.0.1 (2018-11-15)
360
+
361
+ [float]
362
+ ===== Fixed
363
+
364
+ - Stop sending `span.start` {pull}234[#234]
365
+
366
+ [[release-notes-2.0.0]]
367
+ ==== 2.0.0 (2018-11-14)
368
+
369
+ Version adds support for APM Server 6.5 and needs at least that.
370
+
371
+ [float]
372
+ ===== Added
373
+
374
+ - Support for APM Server 6.5 (Intake v2)
375
+ - Support for Distributed Tracing (beta)
376
+ - Support for RUM Agent correlation (Distributed Tracing)
377
+ - Support for https://github.com/httprb/http[HTTP.rb] (Instrumentation + Distributed Tracing)
378
+
379
+ [float]
380
+ ===== Changed
381
+
382
+ - Custom instrumentation APIs {pull}209[#209]
383
+ - Tag keys will convert disallowed chars to `_`
384
+ - Default log level changed to `info`
385
+ - Laxed version requirement of concurrent-ruby
386
+ - Change `log_level` to only concern agent log
387
+
388
+ [float]
389
+ ===== Deprecated
390
+
391
+ *APIs:*
392
+
393
+ - `ElasticAPM.transaction`
394
+ - `ElasticAPM.span`
395
+
396
+ *Options:*
397
+
398
+ - `compression_level`
399
+ - `compression_minimum_size`
400
+ - `debug_http`
401
+ - `debug_transactions`
402
+ - `flush_interval`
403
+ - `http_open_timeout`
404
+ - `http_read_timeout`
405
+ - `enabled_environments`
406
+ - `disable_environment_warning`
407
+
408
+ Some options that used to take a certain unit for granted now expects explicit units – but will fall back to old default.
409
+
410
+ [float]
411
+ ===== Removed
412
+
413
+ - Support for APM Server versions prior to 6.5.
414
+ - Support for Ruby 2.2 (eol)
415
+
416
+ [[release-notes-1.x]]
417
+ === Ruby Agent version 1.x
418
+
419
+ [[release-notes-1.1.0]]
420
+ ==== 1.1.0 (2018-09-07)
421
+
422
+ [float]
423
+ ===== Added
424
+
425
+ - Rake task instrumentation {pull}192[#192]
426
+ - `default_tags` option {pull}183[#183]
427
+
428
+ [float]
429
+ ===== Fixed
430
+
431
+ - Fallback from missing JRUBY_VERSION {pull}180[#180]
432
+
433
+ [[release-notes-1.0.2]]
434
+ ==== 1.0.2 (2018-09-07)
435
+
436
+ Should've been a minor release -- see 1.1.0
437
+
438
+ [[release-notes-1.0.1]]
439
+ ==== 1.0.1 (2018-07-30)
440
+
441
+ [float]
442
+ ===== Fixed
443
+
444
+ - Fixed internal LRU cache to be threadsafe {pull}178[#178]
445
+
446
+ [[release-notes-1.0.0]]
447
+ ==== 1.0.0 (2018-06-29)
448
+
449
+ [float]
450
+ ===== Added
451
+
452
+ - Added config.disable_send {pull}156[#156]
453
+
454
+ [float]
455
+ ===== Changed
456
+
457
+ - Set the default `span_frame_min_duration` to 5ms
458
+
459
+ [float]
460
+ ===== Fixed
461
+
462
+ - Fixed some Elasticsearch spans not validating JSON Schema {pull}157[#157]
463
+
464
+ [[release-notes-0.x]]
465
+ === Ruby Agent version 0.x
466
+
467
+ [[release-notes-0.8.0]]
468
+ ==== 0.8.0 (2018-06-13)
469
+
470
+ [float]
471
+ ===== Added
472
+
473
+ - Added an option to disable metrics collection {pull}145[#145]
474
+ - Filters can cancel the entire payload by returning `nil` {pull}148[#148]
475
+ - Added `ENV` version of the logging options {pull}146[#146]
476
+ - Added `config.ignore_url_patterns` {pull}151[#151]
477
+
478
+ [float]
479
+ ===== Changed
480
+
481
+ - Use concurrent-ruby's TimerTask instead of `Thread#sleep`. Adds dependency on `concurrent-ruby`. {pull}141[#141]
482
+
483
+ [float]
484
+ ===== Fixed
485
+
486
+ - Remove newline on `hostname`
487
+ - Fixed ActionMailer spans renaming their transaction
488
+
489
+ [[release-notes-0.7.4]]
490
+ ==== 0.7.4 - 2018-06-07
491
+
492
+ Beginning of this document
493
+
494
+ [float]
495
+ ===== Fixed
496
+
497
+ - Fix overwriting custom logger with Rails'