ddtrace 0.12.0 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +456 -0
  3. data/.circleci/images/primary/Dockerfile-1.9.3 +69 -0
  4. data/.circleci/images/primary/Dockerfile-2.0.0 +69 -0
  5. data/.circleci/images/primary/Dockerfile-2.1.10 +69 -0
  6. data/.circleci/images/primary/Dockerfile-2.2.10 +69 -0
  7. data/.circleci/images/primary/Dockerfile-2.3.7 +73 -0
  8. data/.circleci/images/primary/Dockerfile-2.4.4 +73 -0
  9. data/.env +21 -11
  10. data/.rubocop.yml +4 -1
  11. data/Appraisals +439 -66
  12. data/CHANGELOG.md +25 -2
  13. data/Rakefile +256 -75
  14. data/ddtrace.gemspec +6 -6
  15. data/docker-compose.yml +222 -37
  16. data/docs/GettingStarted.md +13 -1
  17. data/gemfiles/contrib_old.gemfile +1 -0
  18. data/gemfiles/rails30_postgres.gemfile +1 -0
  19. data/gemfiles/rails30_postgres_sidekiq.gemfile +1 -0
  20. data/gemfiles/rails32_mysql2.gemfile +1 -0
  21. data/gemfiles/rails32_postgres.gemfile +1 -0
  22. data/gemfiles/rails32_postgres_redis.gemfile +1 -0
  23. data/gemfiles/rails32_postgres_sidekiq.gemfile +1 -0
  24. data/gemfiles/rails5_mysql2.gemfile +1 -1
  25. data/gemfiles/rails5_postgres.gemfile +1 -1
  26. data/gemfiles/rails5_postgres_redis.gemfile +1 -1
  27. data/gemfiles/rails5_postgres_sidekiq.gemfile +1 -1
  28. data/lib/ddtrace/configuration.rb +2 -2
  29. data/lib/ddtrace/contrib/active_record/patcher.rb +10 -10
  30. data/lib/ddtrace/contrib/aws/instrumentation.rb +2 -2
  31. data/lib/ddtrace/contrib/elasticsearch/patcher.rb +2 -2
  32. data/lib/ddtrace/contrib/http/patcher.rb +18 -16
  33. data/lib/ddtrace/contrib/rails/action_controller_patch.rb +77 -0
  34. data/lib/ddtrace/contrib/rails/action_view.rb +0 -65
  35. data/lib/ddtrace/contrib/rails/active_support.rb +9 -8
  36. data/lib/ddtrace/contrib/rails/core_extensions.rb +74 -115
  37. data/lib/ddtrace/tracer.rb +4 -1
  38. data/lib/ddtrace/utils.rb +10 -2
  39. data/lib/ddtrace/version.rb +1 -1
  40. metadata +11 -4
  41. data/circle.yml +0 -69
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed9e1360ddbe75df4f11570139cc00f400c18071
4
- data.tar.gz: 913743d057209630997ba59f724e1daab5a596dd
3
+ metadata.gz: 65ddfa40ee7d950ac00dbf5baed36f1584a81bc3
4
+ data.tar.gz: db4297fc13cd2a727d3e1a6251e2280bed81a3a6
5
5
  SHA512:
6
- metadata.gz: 19746053111cb07270b7a8e09f59064f85f50d47be4d083a2e31dad8c7ce0b973e1706b74ae4fb71795f0d21edfe8a740f5cab5fbff097967d94be92844ed9bd
7
- data.tar.gz: 2588e88b3bdf175079518fc14cdc58501b54f9d49a313ab5c19291ec02d86a84e3c10fa7870cc1050c640c89f89afa14c7c8692ae8debb4d57f03f3f83a7da19
6
+ metadata.gz: bdf70abd82575bcd7a1373b301cc101db4f872161911c9e238d9143115bc7920aa64cbfa7d31e4a0119e9d08f2d4b76b800b92b6a70ad3f24ccf2001cc6c49c5
7
+ data.tar.gz: cb2fcc8d5c88bf17936b71e0ed74dde66b093ab75c71c373e0ab19074467c390485adfeaa59d80867ca3194f77671f475736d78a7ac59d14b211afbf7e3c50a5
@@ -0,0 +1,456 @@
1
+ # Common variables, containers, jobs and steps.
2
+ job_defaults: &job_defaults
3
+ working_directory: /app
4
+ shell: /bin/bash --login
5
+
6
+ ruby_containers: &ruby_containers
7
+ - &container-1_9
8
+ image: datadog/docker-library:ddtrace_rb_1_9_3
9
+ - &container-2_0
10
+ image: datadog/docker-library:ddtrace_rb_2_0_0
11
+ - &container-2_1
12
+ image: datadog/docker-library:ddtrace_rb_2_1_10
13
+ - &container-2_2
14
+ image: datadog/docker-library:ddtrace_rb_2_2_10
15
+ - &container-2_3
16
+ image: datadog/docker-library:ddtrace_rb_2_3_7
17
+ - &container-2_4
18
+ image: datadog/docker-library:ddtrace_rb_2_4_4
19
+
20
+ test_containers: &test_containers
21
+ - &container_postgres
22
+ image: postgres:9.6
23
+ environment:
24
+ - POSTGRES_PASSWORD=postgres
25
+ - POSTGRES_USER=postgres
26
+ - POSTGRES_DB=postgres
27
+ - &container_mysql
28
+ image: mysql:5.6
29
+ environment:
30
+ - MYSQL_ROOT_PASSWORD=root
31
+ - MYSQL_PASSWORD=mysql
32
+ - MYSQL_USER=mysql
33
+ - &container_elasticsearch
34
+ image: elasticsearch:2.4
35
+ - &container_redis
36
+ image: redis:3.0
37
+ - &container_mongo
38
+ image: mongo:3.5
39
+ - &container_memcached
40
+ image: memcached:1.5-alpine
41
+ - &container_agent
42
+ image: datadog/docker-dd-agent
43
+ environment:
44
+ - DD_APM_ENABLED=true
45
+ - DD_BIND_HOST=0.0.0.0
46
+ - DD_API_KEY=invalid_key_but_this_is_fine
47
+
48
+ step_init_bundle_checksum: &step_init_bundle_checksum
49
+ run:
50
+ name: Initialize bundle cache key
51
+ command: |
52
+ touch .circleci/bundle_checksum
53
+ step_bundle_install: &step_bundle_install
54
+ run:
55
+ name: Install gem dependencies
56
+ command: bundle install
57
+ step_rubocop: &step_rubocop
58
+ run:
59
+ name: Delint with Rubocop
60
+ command: bundle exec rake rubocop
61
+ step_appraisal_install: &step_appraisal_install
62
+ run:
63
+ name: Install Appraisal gems
64
+ command: bundle exec appraisal install
65
+ step_compute_bundle_checksum: &step_compute_bundle_checksum
66
+ run:
67
+ name: Compute bundle checksum
68
+ command: |
69
+ cat Gemfile.lock gemfiles/*.gemfile.lock > .circleci/bundle_checksum
70
+ step_run_all_tests: &step_run_all_tests
71
+ run:
72
+ name: Run tests
73
+ command: bundle exec rake ci
74
+
75
+ version: 2.0
76
+ jobs:
77
+ checkout-1.9:
78
+ <<: *job_defaults
79
+ docker:
80
+ - *container-1_9
81
+ steps:
82
+ - checkout
83
+ - save_cache:
84
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-1.9-{{ .Environment.CIRCLE_SHA1 }}'
85
+ paths:
86
+ - /app
87
+ build-1.9:
88
+ <<: *job_defaults
89
+ docker:
90
+ - *container-1_9
91
+ steps:
92
+ - restore_cache:
93
+ keys:
94
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-1.9-{{ .Environment.CIRCLE_SHA1 }}'
95
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-1.9-{{ .Environment.CIRCLE_SHA1 }}'
96
+ - *step_init_bundle_checksum
97
+ - restore_cache:
98
+ keys:
99
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-1.9-{{ checksum ".circleci/bundle_checksum" }}'
100
+ - *step_bundle_install
101
+ - *step_appraisal_install
102
+ - *step_compute_bundle_checksum
103
+ - save_cache:
104
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-1.9-{{ .Environment.CIRCLE_SHA1 }}'
105
+ paths:
106
+ - /app
107
+ - save_cache:
108
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-1.9-{{ checksum ".circleci/bundle_checksum" }}'
109
+ paths:
110
+ - /usr/local/bundle
111
+ test-1.9:
112
+ <<: *job_defaults
113
+ docker:
114
+ - <<: *container-1_9
115
+ environment:
116
+ - TEST_DATADOG_INTEGRATION: 1
117
+ - *container_postgres
118
+ - *container_mysql
119
+ - *container_elasticsearch
120
+ - *container_redis
121
+ - *container_mongo
122
+ - *container_memcached
123
+ - *container_agent
124
+ steps:
125
+ - restore_cache:
126
+ keys:
127
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-1.9-{{ .Environment.CIRCLE_SHA1 }}'
128
+ - restore_cache:
129
+ keys:
130
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-1.9-{{ checksum ".circleci/bundle_checksum" }}'
131
+ - *step_run_all_tests
132
+ checkout-2.0:
133
+ <<: *job_defaults
134
+ docker:
135
+ - *container-2_0
136
+ steps:
137
+ - checkout
138
+ - save_cache:
139
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-2.0-{{ .Environment.CIRCLE_SHA1 }}'
140
+ paths:
141
+ - /app
142
+ build-2.0:
143
+ <<: *job_defaults
144
+ docker:
145
+ - *container-2_0
146
+ steps:
147
+ - restore_cache:
148
+ keys:
149
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.0-{{ .Environment.CIRCLE_SHA1 }}'
150
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-2.0-{{ .Environment.CIRCLE_SHA1 }}'
151
+ - *step_init_bundle_checksum
152
+ - restore_cache:
153
+ keys:
154
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.0-{{ checksum ".circleci/bundle_checksum" }}'
155
+ - *step_bundle_install
156
+ - *step_appraisal_install
157
+ - *step_compute_bundle_checksum
158
+ - save_cache:
159
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.0-{{ .Environment.CIRCLE_SHA1 }}'
160
+ paths:
161
+ - /app
162
+ - save_cache:
163
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.0-{{ checksum ".circleci/bundle_checksum" }}'
164
+ paths:
165
+ - /usr/local/bundle
166
+ test-2.0:
167
+ <<: *job_defaults
168
+ docker:
169
+ - <<: *container-2_0
170
+ environment:
171
+ - TEST_DATADOG_INTEGRATION: 1
172
+ - *container_postgres
173
+ - *container_mysql
174
+ - *container_elasticsearch
175
+ - *container_redis
176
+ - *container_mongo
177
+ - *container_memcached
178
+ - *container_agent
179
+ steps:
180
+ - restore_cache:
181
+ keys:
182
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.0-{{ .Environment.CIRCLE_SHA1 }}'
183
+ - restore_cache:
184
+ keys:
185
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.0-{{ checksum ".circleci/bundle_checksum" }}'
186
+ - *step_run_all_tests
187
+ checkout-2.1:
188
+ <<: *job_defaults
189
+ docker:
190
+ - *container-2_1
191
+ steps:
192
+ - checkout
193
+ - save_cache:
194
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-2.1-{{ .Environment.CIRCLE_SHA1 }}'
195
+ paths:
196
+ - /app
197
+ build-2.1:
198
+ <<: *job_defaults
199
+ docker:
200
+ - *container-2_1
201
+ steps:
202
+ - restore_cache:
203
+ keys:
204
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.1-{{ .Environment.CIRCLE_SHA1 }}'
205
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-2.1-{{ .Environment.CIRCLE_SHA1 }}'
206
+ - *step_init_bundle_checksum
207
+ - restore_cache:
208
+ keys:
209
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.1-{{ checksum ".circleci/bundle_checksum" }}'
210
+ - *step_bundle_install
211
+ - *step_rubocop
212
+ - *step_appraisal_install
213
+ - *step_compute_bundle_checksum
214
+ - save_cache:
215
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.1-{{ .Environment.CIRCLE_SHA1 }}'
216
+ paths:
217
+ - /app
218
+ - save_cache:
219
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.1-{{ checksum ".circleci/bundle_checksum" }}'
220
+ paths:
221
+ - /usr/local/bundle
222
+ test-2.1:
223
+ <<: *job_defaults
224
+ docker:
225
+ - <<: *container-2_1
226
+ environment:
227
+ - TEST_DATADOG_INTEGRATION: 1
228
+ - *container_postgres
229
+ - *container_mysql
230
+ - *container_elasticsearch
231
+ - *container_redis
232
+ - *container_mongo
233
+ - *container_memcached
234
+ - *container_agent
235
+ steps:
236
+ - restore_cache:
237
+ keys:
238
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.1-{{ .Environment.CIRCLE_SHA1 }}'
239
+ - restore_cache:
240
+ keys:
241
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.1-{{ checksum ".circleci/bundle_checksum" }}'
242
+ - *step_run_all_tests
243
+ checkout-2.2:
244
+ <<: *job_defaults
245
+ docker:
246
+ - *container-2_2
247
+ steps:
248
+ - checkout
249
+ - save_cache:
250
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-2.2-{{ .Environment.CIRCLE_SHA1 }}'
251
+ paths:
252
+ - /app
253
+ build-2.2:
254
+ <<: *job_defaults
255
+ docker:
256
+ - *container-2_2
257
+ steps:
258
+ - restore_cache:
259
+ keys:
260
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.2-{{ .Environment.CIRCLE_SHA1 }}'
261
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-2.2-{{ .Environment.CIRCLE_SHA1 }}'
262
+ - *step_init_bundle_checksum
263
+ - restore_cache:
264
+ keys:
265
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.2-{{ checksum ".circleci/bundle_checksum" }}'
266
+ - *step_bundle_install
267
+ - *step_rubocop
268
+ - *step_appraisal_install
269
+ - *step_compute_bundle_checksum
270
+ - save_cache:
271
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.2-{{ .Environment.CIRCLE_SHA1 }}'
272
+ paths:
273
+ - /app
274
+ - save_cache:
275
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.2-{{ checksum ".circleci/bundle_checksum" }}'
276
+ paths:
277
+ - /usr/local/bundle
278
+ test-2.2:
279
+ <<: *job_defaults
280
+ docker:
281
+ - <<: *container-2_2
282
+ environment:
283
+ - TEST_DATADOG_INTEGRATION: 1
284
+ - *container_postgres
285
+ - *container_mysql
286
+ - *container_elasticsearch
287
+ - *container_redis
288
+ - *container_mongo
289
+ - *container_memcached
290
+ - *container_agent
291
+ steps:
292
+ - restore_cache:
293
+ keys:
294
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.2-{{ .Environment.CIRCLE_SHA1 }}'
295
+ - restore_cache:
296
+ keys:
297
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.2-{{ checksum ".circleci/bundle_checksum" }}'
298
+ - *step_run_all_tests
299
+ checkout-2.3:
300
+ <<: *job_defaults
301
+ docker:
302
+ - *container-2_3
303
+ steps:
304
+ - checkout
305
+ - save_cache:
306
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-2.3-{{ .Environment.CIRCLE_SHA1 }}'
307
+ paths:
308
+ - /app
309
+ build-2.3:
310
+ <<: *job_defaults
311
+ docker:
312
+ - *container-2_3
313
+ steps:
314
+ - restore_cache:
315
+ keys:
316
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.3-{{ .Environment.CIRCLE_SHA1 }}'
317
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-2.3-{{ .Environment.CIRCLE_SHA1 }}'
318
+ - *step_init_bundle_checksum
319
+ - restore_cache:
320
+ keys:
321
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.3-{{ checksum ".circleci/bundle_checksum" }}'
322
+ - *step_bundle_install
323
+ - *step_rubocop
324
+ - *step_appraisal_install
325
+ - *step_compute_bundle_checksum
326
+ - save_cache:
327
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.3-{{ .Environment.CIRCLE_SHA1 }}'
328
+ paths:
329
+ - /app
330
+ - save_cache:
331
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.3-{{ checksum ".circleci/bundle_checksum" }}'
332
+ paths:
333
+ - /usr/local/bundle
334
+ test-2.3:
335
+ <<: *job_defaults
336
+ docker:
337
+ - <<: *container-2_3
338
+ environment:
339
+ - TEST_DATADOG_INTEGRATION: 1
340
+ - *container_postgres
341
+ - *container_mysql
342
+ - *container_elasticsearch
343
+ - *container_redis
344
+ - *container_mongo
345
+ - *container_memcached
346
+ - *container_agent
347
+ steps:
348
+ - restore_cache:
349
+ keys:
350
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.3-{{ .Environment.CIRCLE_SHA1 }}'
351
+ - restore_cache:
352
+ keys:
353
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.3-{{ checksum ".circleci/bundle_checksum" }}'
354
+ - *step_run_all_tests
355
+ checkout-2.4:
356
+ <<: *job_defaults
357
+ docker:
358
+ - *container-2_4
359
+ steps:
360
+ - checkout
361
+ - save_cache:
362
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-2.4-{{ .Environment.CIRCLE_SHA1 }}'
363
+ paths:
364
+ - /app
365
+ build-2.4:
366
+ <<: *job_defaults
367
+ docker:
368
+ - *container-2_4
369
+ steps:
370
+ - restore_cache:
371
+ keys:
372
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.4-{{ .Environment.CIRCLE_SHA1 }}'
373
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-2.4-{{ .Environment.CIRCLE_SHA1 }}'
374
+ - *step_init_bundle_checksum
375
+ - restore_cache:
376
+ keys:
377
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.4-{{ checksum ".circleci/bundle_checksum" }}'
378
+ - *step_bundle_install
379
+ - *step_rubocop
380
+ - *step_appraisal_install
381
+ - *step_compute_bundle_checksum
382
+ - save_cache:
383
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.4-{{ .Environment.CIRCLE_SHA1 }}'
384
+ paths:
385
+ - /app
386
+ - save_cache:
387
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.4-{{ checksum ".circleci/bundle_checksum" }}'
388
+ paths:
389
+ - /usr/local/bundle
390
+ test-2.4:
391
+ <<: *job_defaults
392
+ docker:
393
+ - <<: *container-2_4
394
+ environment:
395
+ - TEST_DATADOG_INTEGRATION: 1
396
+ - *container_postgres
397
+ - *container_mysql
398
+ - *container_elasticsearch
399
+ - *container_redis
400
+ - *container_mongo
401
+ - *container_memcached
402
+ - *container_agent
403
+ steps:
404
+ - restore_cache:
405
+ keys:
406
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.4-{{ .Environment.CIRCLE_SHA1 }}'
407
+ - restore_cache:
408
+ keys:
409
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.4-{{ checksum ".circleci/bundle_checksum" }}'
410
+ - *step_run_all_tests
411
+ workflows:
412
+ version: 2
413
+ build-and-test:
414
+ jobs:
415
+ - checkout-1.9
416
+ - build-1.9:
417
+ requires:
418
+ - checkout-1.9
419
+ - test-1.9:
420
+ requires:
421
+ - build-1.9
422
+ - checkout-2.0
423
+ - build-2.0:
424
+ requires:
425
+ - checkout-2.0
426
+ - test-2.0:
427
+ requires:
428
+ - build-2.0
429
+ - checkout-2.1
430
+ - build-2.1:
431
+ requires:
432
+ - checkout-2.1
433
+ - test-2.1:
434
+ requires:
435
+ - build-2.1
436
+ - checkout-2.2
437
+ - build-2.2:
438
+ requires:
439
+ - checkout-2.2
440
+ - test-2.2:
441
+ requires:
442
+ - build-2.2
443
+ - checkout-2.3
444
+ - build-2.3:
445
+ requires:
446
+ - checkout-2.3
447
+ - test-2.3:
448
+ requires:
449
+ - build-2.3
450
+ - checkout-2.4
451
+ - build-2.4:
452
+ requires:
453
+ - checkout-2.4
454
+ - test-2.4:
455
+ requires:
456
+ - build-2.4