ddtrace 0.45.0 → 0.50.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (820) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +360 -56
  3. data/.circleci/images/primary/Dockerfile-2.1.10 +11 -1
  4. data/.circleci/images/primary/Dockerfile-2.2.10 +11 -1
  5. data/.circleci/images/primary/Dockerfile-2.3.8 +10 -0
  6. data/.circleci/images/primary/Dockerfile-2.4.6 +10 -0
  7. data/.circleci/images/primary/Dockerfile-2.5.6 +10 -0
  8. data/.circleci/images/primary/Dockerfile-2.6.4 +10 -0
  9. data/.circleci/images/primary/Dockerfile-2.7.0 +10 -0
  10. data/.circleci/images/primary/Dockerfile-jruby-9.2-latest +88 -0
  11. data/.circleci/images/primary/{Dockerfile-jruby-9.2 → Dockerfile-jruby-9.2.0.0} +1 -5
  12. data/.circleci/images/primary/{Dockerfile-2.0.0 → Dockerfile-truffleruby-21.1.0} +8 -8
  13. data/.dockerignore +0 -1
  14. data/.github/workflows/create-next-milestone.yml +2 -2
  15. data/.gitignore +0 -1
  16. data/.gitlab-ci.yml +18 -18
  17. data/.rubocop.yml +273 -7
  18. data/.rubocop_todo.yml +438 -0
  19. data/.simplecov +6 -0
  20. data/Appraisals +74 -101
  21. data/CHANGELOG.md +275 -1
  22. data/Gemfile +63 -3
  23. data/LICENSE-3rdparty.csv +2 -0
  24. data/Rakefile +299 -353
  25. data/benchmarks/data/profiler-submission-marshal.gz +0 -0
  26. data/benchmarks/profiler_sample_loop.rb +69 -0
  27. data/benchmarks/profiler_submission.rb +93 -0
  28. data/bin/ddtracerb +15 -0
  29. data/ddtrace.gemspec +10 -38
  30. data/docker-compose.yml +68 -54
  31. data/docs/DevelopmentGuide.md +28 -0
  32. data/docs/GettingStarted.md +123 -73
  33. data/docs/ProfilingDevelopment.md +88 -0
  34. data/gemfiles/jruby_9.2.0.0_contrib.gemfile +79 -0
  35. data/gemfiles/jruby_9.2.0.0_contrib.gemfile.lock +1518 -0
  36. data/gemfiles/jruby_9.2.0.0_contrib_old.gemfile +35 -0
  37. data/gemfiles/jruby_9.2.0.0_contrib_old.gemfile.lock +157 -0
  38. data/gemfiles/jruby_9.2.0.0_core_old.gemfile +34 -0
  39. data/gemfiles/jruby_9.2.0.0_core_old.gemfile.lock +153 -0
  40. data/gemfiles/jruby_9.2.0.0_cucumber3.gemfile +35 -0
  41. data/gemfiles/jruby_9.2.0.0_cucumber3.gemfile.lock +174 -0
  42. data/gemfiles/jruby_9.2.0.0_cucumber4.gemfile +35 -0
  43. data/gemfiles/jruby_9.2.0.0_cucumber4.gemfile.lock +206 -0
  44. data/gemfiles/jruby_9.2.0.0_cucumber5.gemfile +35 -0
  45. data/gemfiles/jruby_9.2.0.0_cucumber5.gemfile.lock +206 -0
  46. data/gemfiles/jruby_9.2.0.0_rails5_mysql2.gemfile +40 -0
  47. data/gemfiles/jruby_9.2.0.0_rails5_mysql2.gemfile.lock +271 -0
  48. data/gemfiles/jruby_9.2.0.0_rails5_postgres.gemfile +40 -0
  49. data/gemfiles/jruby_9.2.0.0_rails5_postgres.gemfile.lock +271 -0
  50. data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis.gemfile +41 -0
  51. data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis.gemfile.lock +273 -0
  52. data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis_activesupport.gemfile +41 -0
  53. data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis_activesupport.gemfile.lock +273 -0
  54. data/gemfiles/jruby_9.2.0.0_rails5_postgres_sidekiq.gemfile +42 -0
  55. data/gemfiles/jruby_9.2.0.0_rails5_postgres_sidekiq.gemfile.lock +279 -0
  56. data/gemfiles/jruby_9.2.0.0_rails61_mysql2.gemfile +40 -0
  57. data/gemfiles/jruby_9.2.0.0_rails61_mysql2.gemfile.lock +290 -0
  58. data/gemfiles/jruby_9.2.0.0_rails61_postgres.gemfile +40 -0
  59. data/gemfiles/jruby_9.2.0.0_rails61_postgres.gemfile.lock +290 -0
  60. data/gemfiles/jruby_9.2.0.0_rails61_postgres_redis.gemfile +41 -0
  61. data/gemfiles/jruby_9.2.0.0_rails61_postgres_redis.gemfile.lock +292 -0
  62. data/gemfiles/jruby_9.2.0.0_rails61_postgres_sidekiq.gemfile +41 -0
  63. data/gemfiles/jruby_9.2.0.0_rails61_postgres_sidekiq.gemfile.lock +297 -0
  64. data/gemfiles/jruby_9.2.0.0_rails6_mysql2.gemfile +40 -0
  65. data/gemfiles/jruby_9.2.0.0_rails6_mysql2.gemfile.lock +287 -0
  66. data/gemfiles/jruby_9.2.0.0_rails6_postgres.gemfile +40 -0
  67. data/gemfiles/jruby_9.2.0.0_rails6_postgres.gemfile.lock +287 -0
  68. data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis.gemfile +41 -0
  69. data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis.gemfile.lock +289 -0
  70. data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis_activesupport.gemfile +41 -0
  71. data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis_activesupport.gemfile.lock +289 -0
  72. data/gemfiles/jruby_9.2.0.0_rails6_postgres_sidekiq.gemfile +42 -0
  73. data/gemfiles/jruby_9.2.0.0_rails6_postgres_sidekiq.gemfile.lock +295 -0
  74. data/gemfiles/jruby_9.2.0.0_resque2_redis3.gemfile +36 -0
  75. data/gemfiles/jruby_9.2.0.0_resque2_redis3.gemfile.lock +180 -0
  76. data/gemfiles/jruby_9.2.0.0_resque2_redis4.gemfile +36 -0
  77. data/gemfiles/jruby_9.2.0.0_resque2_redis4.gemfile.lock +180 -0
  78. data/gemfiles/jruby_9.2.11.1_contrib.gemfile +79 -0
  79. data/gemfiles/jruby_9.2.11.1_contrib.gemfile.lock +1518 -0
  80. data/gemfiles/jruby_9.2.11.1_contrib_old.gemfile +35 -0
  81. data/gemfiles/jruby_9.2.11.1_contrib_old.gemfile.lock +157 -0
  82. data/gemfiles/jruby_9.2.11.1_core_old.gemfile +34 -0
  83. data/gemfiles/jruby_9.2.11.1_core_old.gemfile.lock +153 -0
  84. data/gemfiles/jruby_9.2.11.1_cucumber3.gemfile +35 -0
  85. data/gemfiles/jruby_9.2.11.1_cucumber3.gemfile.lock +174 -0
  86. data/gemfiles/jruby_9.2.11.1_cucumber4.gemfile +35 -0
  87. data/gemfiles/jruby_9.2.11.1_cucumber4.gemfile.lock +206 -0
  88. data/gemfiles/jruby_9.2.11.1_cucumber5.gemfile +35 -0
  89. data/gemfiles/jruby_9.2.11.1_cucumber5.gemfile.lock +206 -0
  90. data/gemfiles/jruby_9.2.11.1_rails5_mysql2.gemfile +40 -0
  91. data/gemfiles/jruby_9.2.11.1_rails5_mysql2.gemfile.lock +271 -0
  92. data/gemfiles/jruby_9.2.11.1_rails5_postgres.gemfile +40 -0
  93. data/gemfiles/jruby_9.2.11.1_rails5_postgres.gemfile.lock +271 -0
  94. data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis.gemfile +41 -0
  95. data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis.gemfile.lock +273 -0
  96. data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis_activesupport.gemfile +41 -0
  97. data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis_activesupport.gemfile.lock +273 -0
  98. data/gemfiles/jruby_9.2.11.1_rails5_postgres_sidekiq.gemfile +42 -0
  99. data/gemfiles/jruby_9.2.11.1_rails5_postgres_sidekiq.gemfile.lock +279 -0
  100. data/gemfiles/jruby_9.2.11.1_rails61_mysql2.gemfile +40 -0
  101. data/gemfiles/jruby_9.2.11.1_rails61_mysql2.gemfile.lock +290 -0
  102. data/gemfiles/jruby_9.2.11.1_rails61_postgres.gemfile +40 -0
  103. data/gemfiles/jruby_9.2.11.1_rails61_postgres.gemfile.lock +290 -0
  104. data/gemfiles/jruby_9.2.11.1_rails61_postgres_redis.gemfile +41 -0
  105. data/gemfiles/jruby_9.2.11.1_rails61_postgres_redis.gemfile.lock +292 -0
  106. data/gemfiles/jruby_9.2.11.1_rails61_postgres_sidekiq.gemfile +41 -0
  107. data/gemfiles/jruby_9.2.11.1_rails61_postgres_sidekiq.gemfile.lock +297 -0
  108. data/gemfiles/jruby_9.2.11.1_rails6_mysql2.gemfile +40 -0
  109. data/gemfiles/jruby_9.2.11.1_rails6_mysql2.gemfile.lock +287 -0
  110. data/gemfiles/jruby_9.2.11.1_rails6_postgres.gemfile +40 -0
  111. data/gemfiles/jruby_9.2.11.1_rails6_postgres.gemfile.lock +287 -0
  112. data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis.gemfile +41 -0
  113. data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis.gemfile.lock +289 -0
  114. data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis_activesupport.gemfile +41 -0
  115. data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis_activesupport.gemfile.lock +289 -0
  116. data/gemfiles/jruby_9.2.11.1_rails6_postgres_sidekiq.gemfile +42 -0
  117. data/gemfiles/jruby_9.2.11.1_rails6_postgres_sidekiq.gemfile.lock +295 -0
  118. data/gemfiles/jruby_9.2.11.1_resque2_redis3.gemfile +36 -0
  119. data/gemfiles/jruby_9.2.11.1_resque2_redis3.gemfile.lock +180 -0
  120. data/gemfiles/jruby_9.2.11.1_resque2_redis4.gemfile +36 -0
  121. data/gemfiles/jruby_9.2.11.1_resque2_redis4.gemfile.lock +180 -0
  122. data/gemfiles/ruby_2.1.10_contrib_old.gemfile +66 -0
  123. data/gemfiles/ruby_2.1.10_contrib_old.gemfile.lock +305 -0
  124. data/gemfiles/ruby_2.1.10_core_old.gemfile +33 -0
  125. data/gemfiles/ruby_2.1.10_core_old.gemfile.lock +118 -0
  126. data/gemfiles/ruby_2.1.10_rails30_postgres.gemfile +39 -0
  127. data/gemfiles/ruby_2.1.10_rails30_postgres.gemfile.lock +196 -0
  128. data/gemfiles/ruby_2.1.10_rails30_postgres_sidekiq.gemfile +40 -0
  129. data/gemfiles/ruby_2.1.10_rails30_postgres_sidekiq.gemfile.lock +205 -0
  130. data/gemfiles/ruby_2.1.10_rails32_mysql2.gemfile +42 -0
  131. data/gemfiles/ruby_2.1.10_rails32_mysql2.gemfile.lock +215 -0
  132. data/gemfiles/ruby_2.1.10_rails32_postgres.gemfile +39 -0
  133. data/gemfiles/ruby_2.1.10_rails32_postgres.gemfile.lock +204 -0
  134. data/gemfiles/ruby_2.1.10_rails32_postgres_redis.gemfile +41 -0
  135. data/gemfiles/ruby_2.1.10_rails32_postgres_redis.gemfile.lock +223 -0
  136. data/gemfiles/ruby_2.1.10_rails32_postgres_sidekiq.gemfile +40 -0
  137. data/gemfiles/ruby_2.1.10_rails32_postgres_sidekiq.gemfile.lock +213 -0
  138. data/gemfiles/ruby_2.1.10_rails4_mysql2.gemfile +38 -0
  139. data/gemfiles/ruby_2.1.10_rails4_mysql2.gemfile.lock +218 -0
  140. data/gemfiles/ruby_2.1.10_rails4_postgres.gemfile +38 -0
  141. data/gemfiles/ruby_2.1.10_rails4_postgres.gemfile.lock +218 -0
  142. data/gemfiles/ruby_2.1.10_rails4_postgres_redis.gemfile +40 -0
  143. data/gemfiles/ruby_2.1.10_rails4_postgres_redis.gemfile.lock +237 -0
  144. data/gemfiles/ruby_2.2.10_contrib.gemfile +73 -0
  145. data/gemfiles/ruby_2.2.10_contrib.gemfile.lock +1450 -0
  146. data/gemfiles/ruby_2.2.10_core_old.gemfile +33 -0
  147. data/gemfiles/ruby_2.2.10_core_old.gemfile.lock +118 -0
  148. data/gemfiles/ruby_2.2.10_rails30_postgres.gemfile +39 -0
  149. data/gemfiles/ruby_2.2.10_rails30_postgres.gemfile.lock +196 -0
  150. data/gemfiles/ruby_2.2.10_rails30_postgres_sidekiq.gemfile +40 -0
  151. data/gemfiles/ruby_2.2.10_rails30_postgres_sidekiq.gemfile.lock +205 -0
  152. data/gemfiles/ruby_2.2.10_rails32_mysql2.gemfile +41 -0
  153. data/gemfiles/ruby_2.2.10_rails32_mysql2.gemfile.lock +212 -0
  154. data/gemfiles/ruby_2.2.10_rails32_postgres.gemfile +39 -0
  155. data/gemfiles/ruby_2.2.10_rails32_postgres.gemfile.lock +204 -0
  156. data/gemfiles/ruby_2.2.10_rails32_postgres_redis.gemfile +41 -0
  157. data/gemfiles/ruby_2.2.10_rails32_postgres_redis.gemfile.lock +223 -0
  158. data/gemfiles/ruby_2.2.10_rails32_postgres_sidekiq.gemfile +40 -0
  159. data/gemfiles/ruby_2.2.10_rails32_postgres_sidekiq.gemfile.lock +213 -0
  160. data/gemfiles/ruby_2.2.10_rails4_mysql2.gemfile +38 -0
  161. data/gemfiles/ruby_2.2.10_rails4_mysql2.gemfile.lock +218 -0
  162. data/gemfiles/ruby_2.2.10_rails4_postgres.gemfile +38 -0
  163. data/gemfiles/ruby_2.2.10_rails4_postgres.gemfile.lock +218 -0
  164. data/gemfiles/ruby_2.2.10_rails4_postgres_redis.gemfile +40 -0
  165. data/gemfiles/ruby_2.2.10_rails4_postgres_redis.gemfile.lock +237 -0
  166. data/gemfiles/ruby_2.2.10_rails4_postgres_sidekiq.gemfile +40 -0
  167. data/gemfiles/ruby_2.2.10_rails4_postgres_sidekiq.gemfile.lock +229 -0
  168. data/gemfiles/ruby_2.2.10_rails5_mysql2.gemfile +38 -0
  169. data/gemfiles/ruby_2.2.10_rails5_mysql2.gemfile.lock +234 -0
  170. data/gemfiles/ruby_2.2.10_rails5_postgres.gemfile +38 -0
  171. data/gemfiles/ruby_2.2.10_rails5_postgres.gemfile.lock +234 -0
  172. data/gemfiles/ruby_2.2.10_rails5_postgres_redis.gemfile +39 -0
  173. data/gemfiles/ruby_2.2.10_rails5_postgres_redis.gemfile.lock +236 -0
  174. data/gemfiles/ruby_2.2.10_rails5_postgres_redis_activesupport.gemfile +39 -0
  175. data/gemfiles/ruby_2.2.10_rails5_postgres_redis_activesupport.gemfile.lock +236 -0
  176. data/gemfiles/ruby_2.2.10_rails5_postgres_sidekiq.gemfile +40 -0
  177. data/gemfiles/ruby_2.2.10_rails5_postgres_sidekiq.gemfile.lock +245 -0
  178. data/gemfiles/ruby_2.3.8_contrib.gemfile +73 -0
  179. data/gemfiles/ruby_2.3.8_contrib.gemfile.lock +1459 -0
  180. data/gemfiles/ruby_2.3.8_contrib_old.gemfile +34 -0
  181. data/gemfiles/ruby_2.3.8_contrib_old.gemfile.lock +127 -0
  182. data/gemfiles/ruby_2.3.8_core_old.gemfile +33 -0
  183. data/gemfiles/ruby_2.3.8_core_old.gemfile.lock +123 -0
  184. data/gemfiles/ruby_2.3.8_cucumber3.gemfile +34 -0
  185. data/gemfiles/ruby_2.3.8_cucumber3.gemfile.lock +144 -0
  186. data/gemfiles/ruby_2.3.8_cucumber4.gemfile +34 -0
  187. data/gemfiles/ruby_2.3.8_cucumber4.gemfile.lock +174 -0
  188. data/gemfiles/ruby_2.3.8_rails30_postgres.gemfile +39 -0
  189. data/gemfiles/ruby_2.3.8_rails30_postgres.gemfile.lock +201 -0
  190. data/gemfiles/ruby_2.3.8_rails30_postgres_sidekiq.gemfile +40 -0
  191. data/gemfiles/ruby_2.3.8_rails30_postgres_sidekiq.gemfile.lock +210 -0
  192. data/gemfiles/ruby_2.3.8_rails32_mysql2.gemfile +41 -0
  193. data/gemfiles/ruby_2.3.8_rails32_mysql2.gemfile.lock +217 -0
  194. data/gemfiles/ruby_2.3.8_rails32_postgres.gemfile +39 -0
  195. data/gemfiles/ruby_2.3.8_rails32_postgres.gemfile.lock +209 -0
  196. data/gemfiles/ruby_2.3.8_rails32_postgres_redis.gemfile +41 -0
  197. data/gemfiles/ruby_2.3.8_rails32_postgres_redis.gemfile.lock +228 -0
  198. data/gemfiles/ruby_2.3.8_rails32_postgres_sidekiq.gemfile +40 -0
  199. data/gemfiles/ruby_2.3.8_rails32_postgres_sidekiq.gemfile.lock +218 -0
  200. data/gemfiles/ruby_2.3.8_rails4_mysql2.gemfile +38 -0
  201. data/gemfiles/ruby_2.3.8_rails4_mysql2.gemfile.lock +223 -0
  202. data/gemfiles/ruby_2.3.8_rails4_postgres.gemfile +38 -0
  203. data/gemfiles/ruby_2.3.8_rails4_postgres.gemfile.lock +223 -0
  204. data/gemfiles/ruby_2.3.8_rails4_postgres_redis.gemfile +40 -0
  205. data/gemfiles/ruby_2.3.8_rails4_postgres_redis.gemfile.lock +242 -0
  206. data/gemfiles/ruby_2.3.8_rails4_postgres_sidekiq.gemfile +40 -0
  207. data/gemfiles/ruby_2.3.8_rails4_postgres_sidekiq.gemfile.lock +234 -0
  208. data/gemfiles/ruby_2.3.8_rails5_mysql2.gemfile +37 -0
  209. data/gemfiles/ruby_2.3.8_rails5_mysql2.gemfile.lock +234 -0
  210. data/gemfiles/ruby_2.3.8_rails5_postgres.gemfile +37 -0
  211. data/gemfiles/ruby_2.3.8_rails5_postgres.gemfile.lock +234 -0
  212. data/gemfiles/ruby_2.3.8_rails5_postgres_redis.gemfile +38 -0
  213. data/gemfiles/ruby_2.3.8_rails5_postgres_redis.gemfile.lock +236 -0
  214. data/gemfiles/ruby_2.3.8_rails5_postgres_redis_activesupport.gemfile +38 -0
  215. data/gemfiles/ruby_2.3.8_rails5_postgres_redis_activesupport.gemfile.lock +236 -0
  216. data/gemfiles/ruby_2.3.8_rails5_postgres_sidekiq.gemfile +39 -0
  217. data/gemfiles/ruby_2.3.8_rails5_postgres_sidekiq.gemfile.lock +245 -0
  218. data/gemfiles/ruby_2.3.8_resque2_redis3.gemfile +35 -0
  219. data/gemfiles/ruby_2.3.8_resque2_redis3.gemfile.lock +150 -0
  220. data/gemfiles/ruby_2.3.8_resque2_redis4.gemfile +35 -0
  221. data/gemfiles/ruby_2.3.8_resque2_redis4.gemfile.lock +150 -0
  222. data/gemfiles/ruby_2.4.6_contrib.gemfile +78 -0
  223. data/gemfiles/ruby_2.4.6_contrib.gemfile.lock +1513 -0
  224. data/gemfiles/ruby_2.4.6_contrib_old.gemfile +38 -0
  225. data/gemfiles/ruby_2.4.6_contrib_old.gemfile.lock +155 -0
  226. data/gemfiles/ruby_2.4.6_core_old.gemfile +37 -0
  227. data/gemfiles/ruby_2.4.6_core_old.gemfile.lock +151 -0
  228. data/gemfiles/ruby_2.4.6_cucumber3.gemfile +38 -0
  229. data/gemfiles/ruby_2.4.6_cucumber3.gemfile.lock +172 -0
  230. data/gemfiles/ruby_2.4.6_cucumber4.gemfile +38 -0
  231. data/gemfiles/ruby_2.4.6_cucumber4.gemfile.lock +202 -0
  232. data/gemfiles/ruby_2.4.6_rails5_mysql2.gemfile +41 -0
  233. data/gemfiles/ruby_2.4.6_rails5_mysql2.gemfile.lock +262 -0
  234. data/gemfiles/ruby_2.4.6_rails5_postgres.gemfile +41 -0
  235. data/gemfiles/ruby_2.4.6_rails5_postgres.gemfile.lock +262 -0
  236. data/gemfiles/ruby_2.4.6_rails5_postgres_redis.gemfile +42 -0
  237. data/gemfiles/ruby_2.4.6_rails5_postgres_redis.gemfile.lock +264 -0
  238. data/gemfiles/ruby_2.4.6_rails5_postgres_redis_activesupport.gemfile +42 -0
  239. data/gemfiles/ruby_2.4.6_rails5_postgres_redis_activesupport.gemfile.lock +264 -0
  240. data/gemfiles/ruby_2.4.6_rails5_postgres_sidekiq.gemfile +43 -0
  241. data/gemfiles/ruby_2.4.6_rails5_postgres_sidekiq.gemfile.lock +273 -0
  242. data/gemfiles/ruby_2.4.6_resque2_redis3.gemfile +39 -0
  243. data/gemfiles/ruby_2.4.6_resque2_redis3.gemfile.lock +178 -0
  244. data/gemfiles/ruby_2.4.6_resque2_redis4.gemfile +39 -0
  245. data/gemfiles/ruby_2.4.6_resque2_redis4.gemfile.lock +178 -0
  246. data/gemfiles/ruby_2.5.6_contrib.gemfile +83 -0
  247. data/gemfiles/ruby_2.5.6_contrib.gemfile.lock +1526 -0
  248. data/gemfiles/ruby_2.5.6_contrib_old.gemfile +39 -0
  249. data/gemfiles/ruby_2.5.6_contrib_old.gemfile.lock +165 -0
  250. data/gemfiles/ruby_2.5.6_core_old.gemfile +38 -0
  251. data/gemfiles/ruby_2.5.6_core_old.gemfile.lock +161 -0
  252. data/gemfiles/ruby_2.5.6_cucumber3.gemfile +39 -0
  253. data/gemfiles/ruby_2.5.6_cucumber3.gemfile.lock +182 -0
  254. data/gemfiles/ruby_2.5.6_cucumber4.gemfile +39 -0
  255. data/gemfiles/ruby_2.5.6_cucumber4.gemfile.lock +214 -0
  256. data/gemfiles/ruby_2.5.6_cucumber5.gemfile +39 -0
  257. data/gemfiles/ruby_2.5.6_cucumber5.gemfile.lock +214 -0
  258. data/gemfiles/ruby_2.5.6_rails5_mysql2.gemfile +44 -0
  259. data/gemfiles/ruby_2.5.6_rails5_mysql2.gemfile.lock +276 -0
  260. data/gemfiles/ruby_2.5.6_rails5_postgres.gemfile +44 -0
  261. data/gemfiles/ruby_2.5.6_rails5_postgres.gemfile.lock +276 -0
  262. data/gemfiles/ruby_2.5.6_rails5_postgres_redis.gemfile +45 -0
  263. data/gemfiles/ruby_2.5.6_rails5_postgres_redis.gemfile.lock +278 -0
  264. data/gemfiles/ruby_2.5.6_rails5_postgres_redis_activesupport.gemfile +45 -0
  265. data/gemfiles/ruby_2.5.6_rails5_postgres_redis_activesupport.gemfile.lock +278 -0
  266. data/gemfiles/ruby_2.5.6_rails5_postgres_sidekiq.gemfile +46 -0
  267. data/gemfiles/ruby_2.5.6_rails5_postgres_sidekiq.gemfile.lock +284 -0
  268. data/gemfiles/ruby_2.5.6_rails61_mysql2.gemfile +44 -0
  269. data/gemfiles/ruby_2.5.6_rails61_mysql2.gemfile.lock +295 -0
  270. data/gemfiles/ruby_2.5.6_rails61_postgres.gemfile +44 -0
  271. data/gemfiles/ruby_2.5.6_rails61_postgres.gemfile.lock +295 -0
  272. data/gemfiles/ruby_2.5.6_rails61_postgres_redis.gemfile +45 -0
  273. data/gemfiles/ruby_2.5.6_rails61_postgres_redis.gemfile.lock +297 -0
  274. data/gemfiles/ruby_2.5.6_rails61_postgres_sidekiq.gemfile +45 -0
  275. data/gemfiles/ruby_2.5.6_rails61_postgres_sidekiq.gemfile.lock +302 -0
  276. data/gemfiles/ruby_2.5.6_rails6_mysql2.gemfile +44 -0
  277. data/gemfiles/ruby_2.5.6_rails6_mysql2.gemfile.lock +292 -0
  278. data/gemfiles/ruby_2.5.6_rails6_postgres.gemfile +44 -0
  279. data/gemfiles/ruby_2.5.6_rails6_postgres.gemfile.lock +292 -0
  280. data/gemfiles/ruby_2.5.6_rails6_postgres_redis.gemfile +45 -0
  281. data/gemfiles/ruby_2.5.6_rails6_postgres_redis.gemfile.lock +294 -0
  282. data/gemfiles/ruby_2.5.6_rails6_postgres_redis_activesupport.gemfile +45 -0
  283. data/gemfiles/ruby_2.5.6_rails6_postgres_redis_activesupport.gemfile.lock +294 -0
  284. data/gemfiles/ruby_2.5.6_rails6_postgres_sidekiq.gemfile +46 -0
  285. data/gemfiles/ruby_2.5.6_rails6_postgres_sidekiq.gemfile.lock +300 -0
  286. data/gemfiles/ruby_2.5.6_resque2_redis3.gemfile +40 -0
  287. data/gemfiles/ruby_2.5.6_resque2_redis3.gemfile.lock +188 -0
  288. data/gemfiles/ruby_2.5.6_resque2_redis4.gemfile +40 -0
  289. data/gemfiles/ruby_2.5.6_resque2_redis4.gemfile.lock +188 -0
  290. data/gemfiles/ruby_2.6.4_contrib.gemfile +79 -0
  291. data/gemfiles/ruby_2.6.4_contrib.gemfile.lock +1524 -0
  292. data/gemfiles/ruby_2.6.4_contrib_old.gemfile +39 -0
  293. data/gemfiles/ruby_2.6.4_contrib_old.gemfile.lock +167 -0
  294. data/gemfiles/ruby_2.6.4_core_old.gemfile +38 -0
  295. data/gemfiles/ruby_2.6.4_core_old.gemfile.lock +163 -0
  296. data/gemfiles/ruby_2.6.4_cucumber3.gemfile +39 -0
  297. data/gemfiles/ruby_2.6.4_cucumber3.gemfile.lock +184 -0
  298. data/gemfiles/ruby_2.6.4_cucumber4.gemfile +39 -0
  299. data/gemfiles/ruby_2.6.4_cucumber4.gemfile.lock +216 -0
  300. data/gemfiles/ruby_2.6.4_cucumber5.gemfile +39 -0
  301. data/gemfiles/ruby_2.6.4_cucumber5.gemfile.lock +216 -0
  302. data/gemfiles/ruby_2.6.4_rails5_mysql2.gemfile +42 -0
  303. data/gemfiles/ruby_2.6.4_rails5_mysql2.gemfile.lock +276 -0
  304. data/gemfiles/ruby_2.6.4_rails5_postgres.gemfile +42 -0
  305. data/gemfiles/ruby_2.6.4_rails5_postgres.gemfile.lock +276 -0
  306. data/gemfiles/ruby_2.6.4_rails5_postgres_redis.gemfile +43 -0
  307. data/gemfiles/ruby_2.6.4_rails5_postgres_redis.gemfile.lock +278 -0
  308. data/gemfiles/ruby_2.6.4_rails5_postgres_redis_activesupport.gemfile +43 -0
  309. data/gemfiles/ruby_2.6.4_rails5_postgres_redis_activesupport.gemfile.lock +278 -0
  310. data/gemfiles/ruby_2.6.4_rails5_postgres_sidekiq.gemfile +44 -0
  311. data/gemfiles/ruby_2.6.4_rails5_postgres_sidekiq.gemfile.lock +284 -0
  312. data/gemfiles/ruby_2.6.4_rails61_mysql2.gemfile +42 -0
  313. data/gemfiles/ruby_2.6.4_rails61_mysql2.gemfile.lock +295 -0
  314. data/gemfiles/ruby_2.6.4_rails61_postgres.gemfile +42 -0
  315. data/gemfiles/ruby_2.6.4_rails61_postgres.gemfile.lock +295 -0
  316. data/gemfiles/ruby_2.6.4_rails61_postgres_redis.gemfile +43 -0
  317. data/gemfiles/ruby_2.6.4_rails61_postgres_redis.gemfile.lock +297 -0
  318. data/gemfiles/ruby_2.6.4_rails61_postgres_sidekiq.gemfile +43 -0
  319. data/gemfiles/ruby_2.6.4_rails61_postgres_sidekiq.gemfile.lock +302 -0
  320. data/gemfiles/ruby_2.6.4_rails6_mysql2.gemfile +42 -0
  321. data/gemfiles/ruby_2.6.4_rails6_mysql2.gemfile.lock +292 -0
  322. data/gemfiles/ruby_2.6.4_rails6_postgres.gemfile +42 -0
  323. data/gemfiles/ruby_2.6.4_rails6_postgres.gemfile.lock +292 -0
  324. data/gemfiles/ruby_2.6.4_rails6_postgres_redis.gemfile +43 -0
  325. data/gemfiles/ruby_2.6.4_rails6_postgres_redis.gemfile.lock +294 -0
  326. data/gemfiles/ruby_2.6.4_rails6_postgres_redis_activesupport.gemfile +43 -0
  327. data/gemfiles/ruby_2.6.4_rails6_postgres_redis_activesupport.gemfile.lock +294 -0
  328. data/gemfiles/ruby_2.6.4_rails6_postgres_sidekiq.gemfile +44 -0
  329. data/gemfiles/ruby_2.6.4_rails6_postgres_sidekiq.gemfile.lock +300 -0
  330. data/gemfiles/ruby_2.6.4_resque2_redis3.gemfile +40 -0
  331. data/gemfiles/ruby_2.6.4_resque2_redis3.gemfile.lock +190 -0
  332. data/gemfiles/ruby_2.6.4_resque2_redis4.gemfile +40 -0
  333. data/gemfiles/ruby_2.6.4_resque2_redis4.gemfile.lock +190 -0
  334. data/gemfiles/ruby_2.7.0_contrib.gemfile +78 -0
  335. data/gemfiles/ruby_2.7.0_contrib.gemfile.lock +1523 -0
  336. data/gemfiles/ruby_2.7.0_contrib_old.gemfile +39 -0
  337. data/gemfiles/ruby_2.7.0_contrib_old.gemfile.lock +167 -0
  338. data/gemfiles/ruby_2.7.0_core_old.gemfile +38 -0
  339. data/gemfiles/ruby_2.7.0_core_old.gemfile.lock +163 -0
  340. data/gemfiles/ruby_2.7.0_cucumber3.gemfile +39 -0
  341. data/gemfiles/ruby_2.7.0_cucumber3.gemfile.lock +184 -0
  342. data/gemfiles/ruby_2.7.0_cucumber4.gemfile +39 -0
  343. data/gemfiles/ruby_2.7.0_cucumber4.gemfile.lock +216 -0
  344. data/gemfiles/ruby_2.7.0_cucumber5.gemfile +39 -0
  345. data/gemfiles/ruby_2.7.0_cucumber5.gemfile.lock +216 -0
  346. data/gemfiles/ruby_2.7.0_rails5_mysql2.gemfile +42 -0
  347. data/gemfiles/ruby_2.7.0_rails5_mysql2.gemfile.lock +276 -0
  348. data/gemfiles/ruby_2.7.0_rails5_postgres.gemfile +42 -0
  349. data/gemfiles/ruby_2.7.0_rails5_postgres.gemfile.lock +276 -0
  350. data/gemfiles/ruby_2.7.0_rails5_postgres_redis.gemfile +44 -0
  351. data/gemfiles/ruby_2.7.0_rails5_postgres_redis.gemfile.lock +295 -0
  352. data/gemfiles/ruby_2.7.0_rails5_postgres_redis_activesupport.gemfile +44 -0
  353. data/gemfiles/ruby_2.7.0_rails5_postgres_redis_activesupport.gemfile.lock +295 -0
  354. data/gemfiles/ruby_2.7.0_rails5_postgres_sidekiq.gemfile +44 -0
  355. data/gemfiles/ruby_2.7.0_rails5_postgres_sidekiq.gemfile.lock +284 -0
  356. data/gemfiles/ruby_2.7.0_rails61_mysql2.gemfile +42 -0
  357. data/gemfiles/ruby_2.7.0_rails61_mysql2.gemfile.lock +295 -0
  358. data/gemfiles/ruby_2.7.0_rails61_postgres.gemfile +42 -0
  359. data/gemfiles/ruby_2.7.0_rails61_postgres.gemfile.lock +295 -0
  360. data/gemfiles/ruby_2.7.0_rails61_postgres_redis.gemfile +43 -0
  361. data/gemfiles/ruby_2.7.0_rails61_postgres_redis.gemfile.lock +297 -0
  362. data/gemfiles/ruby_2.7.0_rails61_postgres_sidekiq.gemfile +43 -0
  363. data/gemfiles/ruby_2.7.0_rails61_postgres_sidekiq.gemfile.lock +302 -0
  364. data/gemfiles/ruby_2.7.0_rails6_mysql2.gemfile +42 -0
  365. data/gemfiles/ruby_2.7.0_rails6_mysql2.gemfile.lock +292 -0
  366. data/gemfiles/ruby_2.7.0_rails6_postgres.gemfile +42 -0
  367. data/gemfiles/ruby_2.7.0_rails6_postgres.gemfile.lock +292 -0
  368. data/gemfiles/ruby_2.7.0_rails6_postgres_redis.gemfile +44 -0
  369. data/gemfiles/ruby_2.7.0_rails6_postgres_redis.gemfile.lock +311 -0
  370. data/gemfiles/ruby_2.7.0_rails6_postgres_redis_activesupport.gemfile +44 -0
  371. data/gemfiles/ruby_2.7.0_rails6_postgres_redis_activesupport.gemfile.lock +311 -0
  372. data/gemfiles/ruby_2.7.0_rails6_postgres_sidekiq.gemfile +44 -0
  373. data/gemfiles/ruby_2.7.0_rails6_postgres_sidekiq.gemfile.lock +300 -0
  374. data/gemfiles/ruby_2.7.0_resque2_redis3.gemfile +40 -0
  375. data/gemfiles/ruby_2.7.0_resque2_redis3.gemfile.lock +190 -0
  376. data/gemfiles/ruby_2.7.0_resque2_redis4.gemfile +40 -0
  377. data/gemfiles/ruby_2.7.0_resque2_redis4.gemfile.lock +190 -0
  378. data/gemfiles/ruby_3.0.0_contrib.gemfile +78 -0
  379. data/gemfiles/ruby_3.0.0_contrib.gemfile.lock +1540 -0
  380. data/gemfiles/ruby_3.0.0_core_old.gemfile +39 -0
  381. data/gemfiles/ruby_3.0.0_core_old.gemfile.lock +165 -0
  382. data/gemfiles/ruby_3.0.0_cucumber3.gemfile +40 -0
  383. data/gemfiles/ruby_3.0.0_cucumber3.gemfile.lock +186 -0
  384. data/gemfiles/ruby_3.0.0_cucumber4.gemfile +40 -0
  385. data/gemfiles/ruby_3.0.0_cucumber4.gemfile.lock +218 -0
  386. data/gemfiles/ruby_3.0.0_cucumber5.gemfile +40 -0
  387. data/gemfiles/ruby_3.0.0_cucumber5.gemfile.lock +218 -0
  388. data/gemfiles/ruby_3.0.0_rails61_mysql2.gemfile +43 -0
  389. data/gemfiles/ruby_3.0.0_rails61_mysql2.gemfile.lock +295 -0
  390. data/gemfiles/ruby_3.0.0_rails61_postgres.gemfile +43 -0
  391. data/gemfiles/ruby_3.0.0_rails61_postgres.gemfile.lock +295 -0
  392. data/gemfiles/ruby_3.0.0_rails61_postgres_redis.gemfile +44 -0
  393. data/gemfiles/ruby_3.0.0_rails61_postgres_redis.gemfile.lock +297 -0
  394. data/gemfiles/ruby_3.0.0_rails61_postgres_sidekiq.gemfile +44 -0
  395. data/gemfiles/ruby_3.0.0_rails61_postgres_sidekiq.gemfile.lock +302 -0
  396. data/gemfiles/ruby_3.0.0_resque2_redis3.gemfile +41 -0
  397. data/gemfiles/ruby_3.0.0_resque2_redis3.gemfile.lock +192 -0
  398. data/gemfiles/ruby_3.0.0_resque2_redis4.gemfile +41 -0
  399. data/gemfiles/ruby_3.0.0_resque2_redis4.gemfile.lock +192 -0
  400. data/integration/README.md +67 -0
  401. data/integration/apps/rack/.dockerignore +1 -0
  402. data/integration/apps/rack/.envrc.sample +1 -0
  403. data/integration/apps/rack/.gitignore +4 -0
  404. data/integration/apps/rack/.rspec +1 -0
  405. data/integration/apps/rack/Dockerfile +28 -0
  406. data/integration/apps/rack/Dockerfile-ci +11 -0
  407. data/integration/apps/rack/Gemfile +24 -0
  408. data/integration/apps/rack/README.md +93 -0
  409. data/integration/apps/rack/app/acme.rb +80 -0
  410. data/integration/apps/rack/app/datadog.rb +17 -0
  411. data/integration/apps/rack/bin/run +22 -0
  412. data/integration/apps/rack/bin/setup +17 -0
  413. data/integration/apps/rack/bin/test +24 -0
  414. data/integration/apps/rack/config.ru +6 -0
  415. data/integration/apps/rack/config/puma.rb +14 -0
  416. data/integration/apps/rack/config/unicorn.rb +23 -0
  417. data/integration/apps/rack/docker-compose.ci.yml +62 -0
  418. data/integration/apps/rack/docker-compose.yml +78 -0
  419. data/integration/apps/rack/script/build-images +38 -0
  420. data/integration/apps/rack/script/ci +51 -0
  421. data/integration/apps/rack/spec/integration/basic_spec.rb +10 -0
  422. data/integration/apps/rack/spec/spec_helper.rb +16 -0
  423. data/integration/apps/rack/spec/support/integration_helper.rb +22 -0
  424. data/integration/apps/rails-five/.dockerignore +1 -0
  425. data/integration/apps/rails-five/.env +3 -0
  426. data/integration/apps/rails-five/.envrc.sample +1 -0
  427. data/integration/apps/rails-five/.gitignore +30 -0
  428. data/integration/apps/rails-five/Dockerfile +25 -0
  429. data/integration/apps/rails-five/Dockerfile-ci +11 -0
  430. data/integration/apps/rails-five/Gemfile +104 -0
  431. data/integration/apps/rails-five/README.md +94 -0
  432. data/integration/apps/rails-five/Rakefile +6 -0
  433. data/integration/apps/rails-five/app/channels/application_cable/channel.rb +4 -0
  434. data/integration/apps/rails-five/app/channels/application_cable/connection.rb +4 -0
  435. data/integration/apps/rails-five/app/controllers/application_controller.rb +2 -0
  436. data/integration/apps/rails-five/app/controllers/basic_controller.rb +36 -0
  437. data/integration/apps/rails-five/app/controllers/concerns/.keep +0 -0
  438. data/integration/apps/rails-five/app/controllers/health_controller.rb +9 -0
  439. data/integration/apps/rails-five/app/controllers/jobs_controller.rb +12 -0
  440. data/integration/apps/rails-five/app/jobs/application_job.rb +2 -0
  441. data/integration/apps/rails-five/app/jobs/test_job.rb +12 -0
  442. data/integration/apps/rails-five/app/mailers/application_mailer.rb +4 -0
  443. data/integration/apps/rails-five/app/models/application_record.rb +3 -0
  444. data/integration/apps/rails-five/app/models/concerns/.keep +0 -0
  445. data/integration/apps/rails-five/app/models/test.rb +2 -0
  446. data/integration/apps/rails-five/app/views/layouts/mailer.html.erb +13 -0
  447. data/integration/apps/rails-five/app/views/layouts/mailer.text.erb +1 -0
  448. data/integration/apps/rails-five/bin/bundle +3 -0
  449. data/integration/apps/rails-five/bin/rails +9 -0
  450. data/integration/apps/rails-five/bin/rake +9 -0
  451. data/integration/apps/rails-five/bin/run +24 -0
  452. data/integration/apps/rails-five/bin/setup +27 -0
  453. data/integration/apps/rails-five/bin/spring +17 -0
  454. data/integration/apps/rails-five/bin/test +21 -0
  455. data/integration/apps/rails-five/bin/update +28 -0
  456. data/integration/apps/rails-five/config.ru +5 -0
  457. data/integration/apps/rails-five/config/application.rb +97 -0
  458. data/integration/apps/rails-five/config/boot.rb +4 -0
  459. data/integration/apps/rails-five/config/cable.yml +10 -0
  460. data/integration/apps/rails-five/config/credentials.yml.enc +1 -0
  461. data/integration/apps/rails-five/config/database.yml +28 -0
  462. data/integration/apps/rails-five/config/environment.rb +5 -0
  463. data/integration/apps/rails-five/config/environments/development.rb +51 -0
  464. data/integration/apps/rails-five/config/environments/production.rb +82 -0
  465. data/integration/apps/rails-five/config/environments/test.rb +43 -0
  466. data/integration/apps/rails-five/config/initializers/datadog.rb +18 -0
  467. data/integration/apps/rails-five/config/initializers/filter_parameter_logging.rb +4 -0
  468. data/integration/apps/rails-five/config/initializers/resque.rb +4 -0
  469. data/integration/apps/rails-five/config/initializers/rollbar.rb +5 -0
  470. data/integration/apps/rails-five/config/initializers/wrap_parameters.rb +14 -0
  471. data/integration/apps/rails-five/config/locales/en.yml +33 -0
  472. data/integration/apps/rails-five/config/puma.rb +24 -0
  473. data/integration/apps/rails-five/config/routes.rb +11 -0
  474. data/integration/apps/rails-five/config/spring.rb +6 -0
  475. data/integration/apps/rails-five/config/unicorn.rb +29 -0
  476. data/integration/apps/rails-five/db/migrate/20190927215052_create_tests.rb +11 -0
  477. data/integration/apps/rails-five/db/schema.rb +23 -0
  478. data/integration/apps/rails-five/db/seeds.rb +7 -0
  479. data/integration/apps/rails-five/docker-compose.ci.yml +98 -0
  480. data/integration/apps/rails-five/docker-compose.yml +100 -0
  481. data/integration/apps/rails-five/lib/tasks/.keep +0 -0
  482. data/integration/apps/rails-five/log/.keep +0 -0
  483. data/integration/apps/rails-five/public/robots.txt +1 -0
  484. data/integration/apps/rails-five/script/build-images +35 -0
  485. data/integration/apps/rails-five/script/ci +51 -0
  486. data/integration/apps/rails-five/spec/integration/basic_spec.rb +10 -0
  487. data/integration/apps/rails-five/spec/spec_helper.rb +16 -0
  488. data/integration/apps/rails-five/spec/support/integration_helper.rb +22 -0
  489. data/integration/apps/rails-five/storage/.keep +0 -0
  490. data/integration/apps/rails-five/tmp/.keep +0 -0
  491. data/integration/apps/rails-five/vendor/.keep +0 -0
  492. data/integration/apps/rspec/.dockerignore +1 -0
  493. data/integration/apps/rspec/.envrc.sample +1 -0
  494. data/integration/apps/rspec/.gitignore +2 -0
  495. data/integration/apps/rspec/.rspec +1 -0
  496. data/integration/apps/rspec/Dockerfile +25 -0
  497. data/integration/apps/rspec/Dockerfile-ci +11 -0
  498. data/integration/apps/rspec/Gemfile +14 -0
  499. data/integration/apps/rspec/README.md +70 -0
  500. data/integration/apps/rspec/agent.yaml +3 -0
  501. data/integration/apps/rspec/app/datadog.rb +13 -0
  502. data/integration/apps/rspec/app/fibonacci.rb +30 -0
  503. data/integration/apps/rspec/bin/run +20 -0
  504. data/integration/apps/rspec/bin/setup +17 -0
  505. data/integration/apps/rspec/bin/test +21 -0
  506. data/integration/apps/rspec/docker-compose.ci.yml +51 -0
  507. data/integration/apps/rspec/docker-compose.yml +63 -0
  508. data/integration/apps/rspec/script/build-images +37 -0
  509. data/integration/apps/rspec/script/ci +53 -0
  510. data/integration/apps/rspec/spec/fibonacci_spec.rb +16 -0
  511. data/integration/apps/rspec/spec/rspec_spec.rb +58 -0
  512. data/integration/apps/rspec/spec/spec_helper.rb +24 -0
  513. data/integration/apps/ruby/.dockerignore +1 -0
  514. data/integration/apps/ruby/.envrc.sample +1 -0
  515. data/integration/apps/ruby/.gitignore +2 -0
  516. data/integration/apps/ruby/Dockerfile +25 -0
  517. data/integration/apps/ruby/Dockerfile-ci +11 -0
  518. data/integration/apps/ruby/Gemfile +11 -0
  519. data/integration/apps/ruby/README.md +70 -0
  520. data/integration/apps/ruby/agent.yaml +3 -0
  521. data/integration/apps/ruby/app/datadog.rb +13 -0
  522. data/integration/apps/ruby/app/fibonacci.rb +58 -0
  523. data/integration/apps/ruby/bin/run +20 -0
  524. data/integration/apps/ruby/bin/setup +17 -0
  525. data/integration/apps/ruby/bin/test +21 -0
  526. data/integration/apps/ruby/docker-compose.ci.yml +51 -0
  527. data/integration/apps/ruby/docker-compose.yml +63 -0
  528. data/integration/apps/ruby/script/build-images +38 -0
  529. data/integration/apps/ruby/script/ci +51 -0
  530. data/integration/images/agent/Dockerfile +2 -0
  531. data/integration/images/agent/agent.yaml +3 -0
  532. data/integration/images/include/datadog/analyzer.rb +71 -0
  533. data/integration/images/include/datadog/demo_env.rb +101 -0
  534. data/integration/images/include/http-health-check +33 -0
  535. data/integration/images/ruby/2.1/Dockerfile +54 -0
  536. data/integration/images/ruby/2.2/Dockerfile +54 -0
  537. data/integration/images/ruby/2.3/Dockerfile +70 -0
  538. data/integration/images/ruby/2.4/Dockerfile +54 -0
  539. data/integration/images/ruby/2.5/Dockerfile +54 -0
  540. data/integration/images/ruby/2.6/Dockerfile +54 -0
  541. data/integration/images/ruby/2.7/Dockerfile +54 -0
  542. data/integration/images/ruby/3.0/Dockerfile +54 -0
  543. data/integration/images/wrk/Dockerfile +33 -0
  544. data/integration/images/wrk/scripts/entrypoint.sh +17 -0
  545. data/integration/images/wrk/scripts/scenarios/basic/default.lua +1 -0
  546. data/integration/images/wrk/scripts/scenarios/basic/fibonacci.lua +1 -0
  547. data/integration/script/build-images +43 -0
  548. data/lib/datadog/ci.rb +16 -0
  549. data/lib/datadog/ci/configuration/components.rb +30 -0
  550. data/lib/datadog/ci/configuration/settings.rb +36 -0
  551. data/lib/datadog/ci/context_flush.rb +28 -0
  552. data/lib/datadog/ci/contrib/cucumber/configuration/settings.rb +30 -0
  553. data/lib/datadog/ci/contrib/cucumber/ext.rb +19 -0
  554. data/lib/datadog/ci/contrib/cucumber/formatter.rb +97 -0
  555. data/lib/datadog/ci/contrib/cucumber/instrumentation.rb +26 -0
  556. data/lib/datadog/ci/contrib/cucumber/integration.rb +47 -0
  557. data/lib/datadog/ci/contrib/cucumber/patcher.rb +25 -0
  558. data/lib/datadog/ci/contrib/rspec/configuration/settings.rb +30 -0
  559. data/lib/datadog/ci/contrib/rspec/example.rb +73 -0
  560. data/lib/datadog/ci/contrib/rspec/ext.rb +18 -0
  561. data/lib/datadog/ci/contrib/rspec/integration.rb +48 -0
  562. data/lib/datadog/ci/contrib/rspec/patcher.rb +25 -0
  563. data/lib/datadog/ci/ext/app_types.rb +9 -0
  564. data/lib/datadog/ci/ext/environment.rb +303 -0
  565. data/lib/datadog/ci/ext/settings.rb +10 -0
  566. data/lib/datadog/ci/ext/test.rb +28 -0
  567. data/lib/datadog/ci/extensions.rb +17 -0
  568. data/lib/datadog/ci/test.rb +63 -0
  569. data/lib/ddtrace.rb +1 -7
  570. data/lib/ddtrace/analytics.rb +2 -0
  571. data/lib/ddtrace/buffer.rb +4 -4
  572. data/lib/ddtrace/configuration.rb +98 -25
  573. data/lib/ddtrace/configuration/agent_settings_resolver.rb +230 -0
  574. data/lib/ddtrace/configuration/base.rb +7 -10
  575. data/lib/ddtrace/configuration/components.rb +119 -21
  576. data/lib/ddtrace/configuration/option_definition.rb +1 -3
  577. data/lib/ddtrace/configuration/options.rb +6 -9
  578. data/lib/ddtrace/configuration/settings.rb +110 -7
  579. data/lib/ddtrace/context.rb +22 -20
  580. data/lib/ddtrace/context_flush.rb +14 -2
  581. data/lib/ddtrace/context_provider.rb +0 -1
  582. data/lib/ddtrace/contrib/action_cable/event.rb +5 -4
  583. data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +2 -4
  584. data/lib/ddtrace/contrib/action_pack/action_controller/patcher.rb +1 -1
  585. data/lib/ddtrace/contrib/action_pack/utils.rb +1 -1
  586. data/lib/ddtrace/contrib/action_view/event.rb +3 -3
  587. data/lib/ddtrace/contrib/action_view/patcher.rb +4 -4
  588. data/lib/ddtrace/contrib/action_view/utils.rb +1 -1
  589. data/lib/ddtrace/contrib/active_model_serializers/event.rb +2 -2
  590. data/lib/ddtrace/contrib/active_record/configuration/makara_resolver.rb +30 -0
  591. data/lib/ddtrace/contrib/active_record/configuration/resolver.rb +107 -18
  592. data/lib/ddtrace/contrib/active_record/event.rb +2 -2
  593. data/lib/ddtrace/contrib/active_record/utils.rb +1 -0
  594. data/lib/ddtrace/contrib/active_support/cache/patcher.rb +7 -7
  595. data/lib/ddtrace/contrib/active_support/cache/redis.rb +1 -5
  596. data/lib/ddtrace/contrib/active_support/notifications/event.rb +4 -3
  597. data/lib/ddtrace/contrib/active_support/notifications/subscriber.rb +2 -1
  598. data/lib/ddtrace/contrib/active_support/notifications/subscription.rb +9 -5
  599. data/lib/ddtrace/contrib/auto_instrument.rb +2 -2
  600. data/lib/ddtrace/contrib/aws/instrumentation.rb +29 -0
  601. data/lib/ddtrace/contrib/aws/patcher.rb +5 -0
  602. data/lib/ddtrace/contrib/aws/services.rb +2 -0
  603. data/lib/ddtrace/contrib/concurrent_ruby/patcher.rb +1 -1
  604. data/lib/ddtrace/contrib/configurable.rb +64 -40
  605. data/lib/ddtrace/contrib/configuration/resolver.rb +70 -5
  606. data/lib/ddtrace/contrib/configuration/resolvers/pattern_resolver.rb +19 -20
  607. data/lib/ddtrace/contrib/configuration/settings.rb +7 -6
  608. data/lib/ddtrace/contrib/dalli/instrumentation.rb +1 -1
  609. data/lib/ddtrace/contrib/dalli/patcher.rb +1 -39
  610. data/lib/ddtrace/contrib/delayed_job/plugin.rb +0 -1
  611. data/lib/ddtrace/contrib/elasticsearch/patcher.rb +1 -0
  612. data/lib/ddtrace/contrib/elasticsearch/quantize.rb +3 -2
  613. data/lib/ddtrace/contrib/ethon/easy_patch.rb +6 -6
  614. data/lib/ddtrace/contrib/ethon/multi_patch.rb +1 -1
  615. data/lib/ddtrace/contrib/ethon/patcher.rb +2 -2
  616. data/lib/ddtrace/contrib/excon/middleware.rb +2 -6
  617. data/lib/ddtrace/contrib/extensions.rb +30 -6
  618. data/lib/ddtrace/contrib/faraday/middleware.rb +1 -3
  619. data/lib/ddtrace/contrib/faraday/patcher.rb +2 -38
  620. data/lib/ddtrace/contrib/grape/endpoint.rb +8 -15
  621. data/lib/ddtrace/contrib/grape/instrumentation.rb +2 -2
  622. data/lib/ddtrace/contrib/grape/patcher.rb +1 -43
  623. data/lib/ddtrace/contrib/grpc/datadog_interceptor.rb +8 -8
  624. data/lib/ddtrace/contrib/grpc/datadog_interceptor/server.rb +1 -0
  625. data/lib/ddtrace/contrib/grpc/patcher.rb +1 -37
  626. data/lib/ddtrace/contrib/http/circuit_breaker.rb +1 -3
  627. data/lib/ddtrace/contrib/http/instrumentation.rb +6 -6
  628. data/lib/ddtrace/contrib/http/patcher.rb +1 -1
  629. data/lib/ddtrace/contrib/httpclient/instrumentation.rb +15 -20
  630. data/lib/ddtrace/contrib/httpclient/patcher.rb +6 -3
  631. data/lib/ddtrace/contrib/httprb/instrumentation.rb +15 -21
  632. data/lib/ddtrace/contrib/httprb/patcher.rb +6 -3
  633. data/lib/ddtrace/contrib/integration.rb +3 -3
  634. data/lib/ddtrace/contrib/kafka/event.rb +2 -2
  635. data/lib/ddtrace/contrib/mongodb/instrumentation.rb +4 -2
  636. data/lib/ddtrace/contrib/mongodb/patcher.rb +2 -2
  637. data/lib/ddtrace/contrib/mongodb/subscribers.rb +2 -3
  638. data/lib/ddtrace/contrib/mysql2/instrumentation.rb +1 -1
  639. data/lib/ddtrace/contrib/mysql2/patcher.rb +1 -1
  640. data/lib/ddtrace/contrib/patchable.rb +2 -2
  641. data/lib/ddtrace/contrib/patcher.rb +10 -7
  642. data/lib/ddtrace/contrib/presto/instrumentation.rb +1 -1
  643. data/lib/ddtrace/contrib/presto/patcher.rb +6 -3
  644. data/lib/ddtrace/contrib/qless/patcher.rb +3 -5
  645. data/lib/ddtrace/contrib/qless/qless_job.rb +1 -0
  646. data/lib/ddtrace/contrib/qless/tracer_cleaner.rb +1 -0
  647. data/lib/ddtrace/contrib/que/ext.rb +19 -19
  648. data/lib/ddtrace/contrib/que/tracer.rb +1 -1
  649. data/lib/ddtrace/contrib/racecar/event.rb +3 -2
  650. data/lib/ddtrace/contrib/rack/configuration/settings.rb +3 -3
  651. data/lib/ddtrace/contrib/rack/middlewares.rb +5 -10
  652. data/lib/ddtrace/contrib/rack/patcher.rb +1 -3
  653. data/lib/ddtrace/contrib/rails/patcher.rb +6 -2
  654. data/lib/ddtrace/contrib/rake/instrumentation.rb +5 -3
  655. data/lib/ddtrace/contrib/rake/patcher.rb +1 -1
  656. data/lib/ddtrace/contrib/redis/configuration/resolver.rb +11 -4
  657. data/lib/ddtrace/contrib/redis/quantize.rb +1 -0
  658. data/lib/ddtrace/contrib/redis/vendor/LICENSE +20 -0
  659. data/lib/ddtrace/contrib/redis/vendor/resolver.rb +6 -7
  660. data/lib/ddtrace/contrib/registerable.rb +2 -2
  661. data/lib/ddtrace/contrib/registry.rb +2 -2
  662. data/lib/ddtrace/contrib/resque/configuration/settings.rb +17 -1
  663. data/lib/ddtrace/contrib/resque/integration.rb +1 -1
  664. data/lib/ddtrace/contrib/resque/patcher.rb +4 -4
  665. data/lib/ddtrace/contrib/resque/resque_job.rb +24 -1
  666. data/lib/ddtrace/contrib/rest_client/patcher.rb +1 -1
  667. data/lib/ddtrace/contrib/rest_client/request_patch.rb +2 -4
  668. data/lib/ddtrace/contrib/sequel/database.rb +1 -1
  669. data/lib/ddtrace/contrib/sequel/dataset.rb +1 -1
  670. data/lib/ddtrace/contrib/sequel/patcher.rb +2 -2
  671. data/lib/ddtrace/contrib/sequel/utils.rb +5 -6
  672. data/lib/ddtrace/contrib/shoryuken/configuration/settings.rb +1 -0
  673. data/lib/ddtrace/contrib/shoryuken/tracer.rb +7 -4
  674. data/lib/ddtrace/contrib/sidekiq/server_tracer.rb +2 -7
  675. data/lib/ddtrace/contrib/sidekiq/tracing.rb +0 -1
  676. data/lib/ddtrace/contrib/sinatra/env.rb +1 -3
  677. data/lib/ddtrace/contrib/sinatra/headers.rb +1 -3
  678. data/lib/ddtrace/contrib/sinatra/patcher.rb +1 -1
  679. data/lib/ddtrace/contrib/sinatra/tracer.rb +1 -3
  680. data/lib/ddtrace/contrib/sinatra/tracer_middleware.rb +3 -3
  681. data/lib/ddtrace/contrib/sneakers/ext.rb +11 -11
  682. data/lib/ddtrace/contrib/sneakers/tracer.rb +2 -4
  683. data/lib/ddtrace/contrib/status_code_matcher.rb +5 -3
  684. data/lib/ddtrace/contrib/sucker_punch/exception_handler.rb +4 -6
  685. data/lib/ddtrace/contrib/sucker_punch/instrumentation.rb +4 -0
  686. data/lib/ddtrace/correlation.rb +1 -0
  687. data/lib/ddtrace/diagnostics/environment_logger.rb +5 -4
  688. data/lib/ddtrace/distributed_tracing/headers/headers.rb +1 -0
  689. data/lib/ddtrace/distributed_tracing/headers/helpers.rb +1 -3
  690. data/lib/ddtrace/error.rb +77 -8
  691. data/lib/ddtrace/ext/app_types.rb +0 -1
  692. data/lib/ddtrace/ext/distributed.rb +1 -1
  693. data/lib/ddtrace/ext/http.rb +1 -1
  694. data/lib/ddtrace/ext/profiling.rb +53 -0
  695. data/lib/ddtrace/ext/runtime.rb +3 -1
  696. data/lib/ddtrace/ext/test.rb +2 -18
  697. data/lib/ddtrace/ext/transport.rb +2 -0
  698. data/lib/ddtrace/forced_tracing.rb +2 -0
  699. data/lib/ddtrace/logger.rb +1 -1
  700. data/lib/ddtrace/metrics.rb +42 -9
  701. data/lib/ddtrace/opentelemetry/extensions.rb +1 -1
  702. data/lib/ddtrace/opentracer.rb +20 -39
  703. data/lib/ddtrace/opentracer/distributed_headers.rb +3 -0
  704. data/lib/ddtrace/opentracer/span.rb +2 -6
  705. data/lib/ddtrace/opentracer/thread_local_scope.rb +1 -0
  706. data/lib/ddtrace/patcher.rb +27 -6
  707. data/lib/ddtrace/pin.rb +8 -61
  708. data/lib/ddtrace/pipeline/span_filter.rb +1 -1
  709. data/lib/ddtrace/profiling.rb +107 -0
  710. data/lib/ddtrace/profiling/backtrace_location.rb +32 -0
  711. data/lib/ddtrace/profiling/buffer.rb +41 -0
  712. data/lib/ddtrace/profiling/collectors/stack.rb +262 -0
  713. data/lib/ddtrace/profiling/encoding/profile.rb +37 -0
  714. data/lib/ddtrace/profiling/event.rb +13 -0
  715. data/lib/ddtrace/profiling/events/stack.rb +102 -0
  716. data/lib/ddtrace/profiling/exporter.rb +23 -0
  717. data/lib/ddtrace/profiling/ext/cpu.rb +52 -0
  718. data/lib/ddtrace/profiling/ext/cthread.rb +155 -0
  719. data/lib/ddtrace/profiling/ext/forking.rb +97 -0
  720. data/lib/ddtrace/profiling/flush.rb +43 -0
  721. data/lib/ddtrace/profiling/pprof/builder.rb +119 -0
  722. data/lib/ddtrace/profiling/pprof/converter.rb +89 -0
  723. data/lib/ddtrace/profiling/pprof/message_set.rb +12 -0
  724. data/lib/ddtrace/profiling/pprof/payload.rb +18 -0
  725. data/lib/ddtrace/profiling/pprof/pprof.proto +212 -0
  726. data/lib/ddtrace/profiling/pprof/pprof_pb.rb +81 -0
  727. data/lib/ddtrace/profiling/pprof/stack_sample.rb +106 -0
  728. data/lib/ddtrace/profiling/pprof/string_table.rb +10 -0
  729. data/lib/ddtrace/profiling/pprof/template.rb +118 -0
  730. data/lib/ddtrace/profiling/preload.rb +3 -0
  731. data/lib/ddtrace/profiling/profiler.rb +30 -0
  732. data/lib/ddtrace/profiling/recorder.rb +95 -0
  733. data/lib/ddtrace/profiling/scheduler.rb +116 -0
  734. data/lib/ddtrace/profiling/tasks/setup.rb +77 -0
  735. data/lib/ddtrace/profiling/transport/client.rb +12 -0
  736. data/lib/ddtrace/profiling/transport/http.rb +118 -0
  737. data/lib/ddtrace/profiling/transport/http/api.rb +43 -0
  738. data/lib/ddtrace/profiling/transport/http/api/endpoint.rb +100 -0
  739. data/lib/ddtrace/profiling/transport/http/api/instance.rb +36 -0
  740. data/lib/ddtrace/profiling/transport/http/api/spec.rb +40 -0
  741. data/lib/ddtrace/profiling/transport/http/builder.rb +28 -0
  742. data/lib/ddtrace/profiling/transport/http/client.rb +33 -0
  743. data/lib/ddtrace/profiling/transport/http/response.rb +21 -0
  744. data/lib/ddtrace/profiling/transport/io.rb +30 -0
  745. data/lib/ddtrace/profiling/transport/io/client.rb +27 -0
  746. data/lib/ddtrace/profiling/transport/io/response.rb +16 -0
  747. data/lib/ddtrace/profiling/transport/parcel.rb +17 -0
  748. data/lib/ddtrace/profiling/transport/request.rb +15 -0
  749. data/lib/ddtrace/profiling/transport/response.rb +8 -0
  750. data/lib/ddtrace/propagation/grpc_propagator.rb +1 -0
  751. data/lib/ddtrace/quantization/http.rb +1 -0
  752. data/lib/ddtrace/runtime/cgroup.rb +2 -2
  753. data/lib/ddtrace/runtime/container.rb +43 -29
  754. data/lib/ddtrace/runtime/identity.rb +8 -0
  755. data/lib/ddtrace/runtime/metrics.rb +3 -5
  756. data/lib/ddtrace/sampler.rb +1 -1
  757. data/lib/ddtrace/sampling/rule_sampler.rb +4 -9
  758. data/lib/ddtrace/span.rb +7 -7
  759. data/lib/ddtrace/sync_writer.rb +14 -13
  760. data/lib/ddtrace/tasks/exec.rb +48 -0
  761. data/lib/ddtrace/tasks/help.rb +14 -0
  762. data/lib/ddtrace/tracer.rb +43 -37
  763. data/lib/ddtrace/transport/http.rb +41 -31
  764. data/lib/ddtrace/transport/http/adapters/net.rb +27 -8
  765. data/lib/ddtrace/transport/http/adapters/registry.rb +1 -0
  766. data/lib/ddtrace/transport/http/adapters/unix_socket.rb +2 -4
  767. data/lib/ddtrace/transport/http/builder.rb +7 -1
  768. data/lib/ddtrace/transport/http/env.rb +8 -0
  769. data/lib/ddtrace/transport/http/statistics.rb +2 -2
  770. data/lib/ddtrace/transport/http/traces.rb +5 -6
  771. data/lib/ddtrace/transport/io.rb +1 -1
  772. data/lib/ddtrace/transport/io/client.rb +15 -8
  773. data/lib/ddtrace/transport/io/response.rb +1 -3
  774. data/lib/ddtrace/transport/io/traces.rb +7 -1
  775. data/lib/ddtrace/transport/parcel.rb +4 -0
  776. data/lib/ddtrace/transport/traces.rb +18 -1
  777. data/lib/ddtrace/utils/compression.rb +27 -0
  778. data/lib/ddtrace/utils/forking.rb +1 -1
  779. data/lib/ddtrace/utils/object_set.rb +39 -0
  780. data/lib/ddtrace/utils/only_once.rb +40 -0
  781. data/lib/ddtrace/utils/sequence.rb +17 -0
  782. data/lib/ddtrace/utils/string_table.rb +45 -0
  783. data/lib/ddtrace/utils/time.rb +32 -3
  784. data/lib/ddtrace/vendor/active_record/MIT-LICENSE +20 -0
  785. data/lib/ddtrace/vendor/multipart-post/LICENSE +11 -0
  786. data/lib/ddtrace/vendor/multipart-post/multipart.rb +12 -0
  787. data/lib/ddtrace/vendor/multipart-post/multipart/post.rb +8 -0
  788. data/lib/ddtrace/vendor/multipart-post/multipart/post/composite_read_io.rb +116 -0
  789. data/lib/ddtrace/vendor/multipart-post/multipart/post/multipartable.rb +57 -0
  790. data/lib/ddtrace/vendor/multipart-post/multipart/post/parts.rb +135 -0
  791. data/lib/ddtrace/vendor/multipart-post/multipart/post/version.rb +9 -0
  792. data/lib/ddtrace/vendor/multipart-post/net/http/post/multipart.rb +32 -0
  793. data/lib/ddtrace/version.rb +14 -2
  794. data/lib/ddtrace/workers.rb +6 -1
  795. data/lib/ddtrace/workers/async.rb +13 -4
  796. data/lib/ddtrace/workers/loop.rb +31 -5
  797. data/lib/ddtrace/workers/polling.rb +12 -5
  798. data/lib/ddtrace/workers/queue.rb +2 -1
  799. data/lib/ddtrace/workers/runtime_metrics.rb +14 -1
  800. data/lib/ddtrace/workers/trace_writer.rb +11 -14
  801. data/lib/ddtrace/writer.rb +11 -5
  802. metadata +620 -408
  803. data/lib/ddtrace/augmentation.rb +0 -13
  804. data/lib/ddtrace/augmentation/method_wrapper.rb +0 -20
  805. data/lib/ddtrace/augmentation/method_wrapping.rb +0 -38
  806. data/lib/ddtrace/augmentation/shim.rb +0 -102
  807. data/lib/ddtrace/contrib/cucumber/configuration/settings.rb +0 -38
  808. data/lib/ddtrace/contrib/cucumber/ext.rb +0 -19
  809. data/lib/ddtrace/contrib/cucumber/formatter.rb +0 -104
  810. data/lib/ddtrace/contrib/cucumber/instrumentation.rb +0 -24
  811. data/lib/ddtrace/contrib/cucumber/integration.rb +0 -45
  812. data/lib/ddtrace/contrib/cucumber/patcher.rb +0 -23
  813. data/lib/ddtrace/contrib/rspec/configuration/settings.rb +0 -38
  814. data/lib/ddtrace/contrib/rspec/example.rb +0 -61
  815. data/lib/ddtrace/contrib/rspec/example_group.rb +0 -61
  816. data/lib/ddtrace/contrib/rspec/ext.rb +0 -19
  817. data/lib/ddtrace/contrib/rspec/integration.rb +0 -46
  818. data/lib/ddtrace/contrib/rspec/patcher.rb +0 -25
  819. data/lib/ddtrace/ext/ci.rb +0 -297
  820. data/lib/ddtrace/monkey.rb +0 -58
@@ -114,6 +114,34 @@ Because you are likely not running all tests locally, your report will contain p
114
114
  You *must* check the CI step `coverage` for the complete test coverage report, ensuring coverage is not
115
115
  decreased.
116
116
 
117
+ **Ensuring tests don't leak resources**
118
+
119
+ Tests execution can create resources that are hard to track: threads, sockets, files, etc. Because these resources can come
120
+ from the both the test setup as well as the code under test, making sure all resources are properly disposed is important
121
+ to prevent the application from inadvertently creating cumulative resources during its execution.
122
+
123
+ When running tests that utilize threads, you might see an error message similar to this one:
124
+
125
+ ```
126
+ Test leaked 1 thread: "Datadog::Workers::AsyncTransport integration tests"
127
+ Ensure all threads are terminated when test finishes:
128
+ 1: #<Thread:0x00007fcbc99863d0 /Users/marco.costa/work/dd-trace-rb/spec/spec_helper.rb:145 sleep> (Thread)
129
+ Thread Creation Site:
130
+ ./dd-trace-rb/spec/ddtrace/workers_integration_spec.rb:245:in 'new'
131
+ ./dd-trace-rb/spec/ddtrace/workers_integration_spec.rb:245:in 'block (4 levels) in <top (required)>'
132
+ Thread Backtrace:
133
+ ./dd-trace-rb/spec/ddtrace/workers_integration_spec.rb:262:in 'sleep'
134
+ .dd-trace-rb/spec/ddtrace/workers_integration_spec.rb:262:in 'block (5 levels) in <top (required)>'
135
+ ./dd-trace-rb/spec/spec_helper.rb:147:in 'block in initialize'
136
+ ```
137
+
138
+ This means that this test did not finish all threads by the time the test had finished. In this case, the thread
139
+ creation can be traced to `workers_integration_spec.rb:245:in 'new'`. The thread itself is sleeping at `workers_integration_spec.rb:262:in 'sleep'`.
140
+
141
+ The actionable in this case would be to ensure that the thread created in `workers_integration_spec.rb:245` is properly terminated by invoking `Thread#join` during the test tear down, which will wait for the thread to finish before returning.
142
+
143
+ Depending on the situation, the thread in question might need to be forced to terminate. It's recommended to have a mechanism in place to terminate it (a shared variable that changes value when the thread should exit), but as a last resort, `Thread#terminate` forces the thread to finish. Keep in mind that regardless of the termination method, `Thread#join` must be called to ensure that the thread has completely finished its shutdown process.
144
+
117
145
  ### Checking code quality
118
146
 
119
147
  **Linting**
@@ -46,6 +46,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
46
46
  - [gRPC](#grpc)
47
47
  - [http.rb](#http-rb)
48
48
  - [httpclient](#httpclient)
49
+ - [httpx](#httpx)
49
50
  - [MongoDB](#mongodb)
50
51
  - [MySQL2](#mysql2)
51
52
  - [Net/HTTP](#net-http)
@@ -70,7 +71,9 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
70
71
  - [Tracer settings](#tracer-settings)
71
72
  - [Custom logging](#custom-logging)
72
73
  - [Environment and tags](#environment-and-tags)
74
+ - [Environment variables](#environment-variables)
73
75
  - [Sampling](#sampling)
76
+ - [Application-side sampling](#application-side-sampling)
74
77
  - [Priority sampling](#priority-sampling)
75
78
  - [Distributed tracing](#distributed-tracing)
76
79
  - [HTTP request queuing](#http-request-queuing)
@@ -82,6 +85,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
82
85
  - [Metrics](#metrics)
83
86
  - [For application runtime](#for-application-runtime)
84
87
  - [OpenTracing](#opentracing)
88
+ - [Profiling](#profiling)
85
89
 
86
90
  ## Compatibility
87
91
 
@@ -97,7 +101,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
97
101
  | | | 2.3 | Full | Latest |
98
102
  | | | 2.2 | Full | Latest |
99
103
  | | | 2.1 | Full | Latest |
100
- | | | 2.0 | Full | Latest |
104
+ | | | 2.0 | EOL since June 7th, 2021 | < 0.50.0 |
101
105
  | | | 1.9.3 | EOL since August 6th, 2020 | < 0.27.0 |
102
106
  | | | 1.9.1 | EOL since August 6th, 2020 | < 0.27.0 |
103
107
  | JRuby | https://www.jruby.org | 9.2 | Full | Latest |
@@ -145,7 +149,7 @@ Install and configure the Datadog Agent to receive traces from your now instrume
145
149
 
146
150
  ### Quickstart for Rails applications
147
151
 
148
- #### Rails Auto Instrument all Integrations
152
+ #### Automatic instrumentation
149
153
 
150
154
  1. Add the `ddtrace` gem to your Gemfile:
151
155
 
@@ -158,7 +162,7 @@ Install and configure the Datadog Agent to receive traces from your now instrume
158
162
 
159
163
  3. You can configure, override, or disable any specific integration settings by also adding a [Rails Manual Configuration](#rails-manual-configuration) file.
160
164
 
161
- #### Rails Manual Configuration
165
+ #### Manual instrumentation
162
166
 
163
167
  1. Add the `ddtrace` gem to your Gemfile:
164
168
 
@@ -181,10 +185,10 @@ Install and configure the Datadog Agent to receive traces from your now instrume
181
185
 
182
186
  ### Quickstart for Ruby applications
183
187
 
184
- #### Ruby Auto Instrument all Integrations
188
+ #### Automatic instrumentation
185
189
 
186
190
  1. Install the gem with `gem install ddtrace`
187
- 2. Requiring any [supported libraries or frameworks](#integration-instrumentation) that should be instrumented.
191
+ 2. Requiring any [supported libraries or frameworks](#integration-instrumentation) that should be instrumented.
188
192
  3. Add `require 'ddtrace/auto_instrument'` to your application. _Note:_ This must be done _after_ requiring any supported libraries or frameworks.
189
193
 
190
194
  ```ruby
@@ -195,10 +199,10 @@ Install and configure the Datadog Agent to receive traces from your now instrume
195
199
 
196
200
  require 'ddtrace/auto_instrument'
197
201
  ```
198
-
202
+
199
203
  You can configure, override, or disable any specific integration settings by also adding a [Ruby Manual Configuration Block](#ruby-manual-configuration).
200
204
 
201
- #### Ruby Manual Configuration
205
+ #### Manual instrumentation
202
206
 
203
207
  1. Install the gem with `gem install ddtrace`
204
208
  2. Add a configuration block to your Ruby application:
@@ -398,7 +402,9 @@ For a list of available integrations, and their configuration options, please re
398
402
  | gRPC | `grpc` | `>= 1.7` | *gem not available* | *[Link](#grpc)* | *[Link](https://github.com/grpc/grpc/tree/master/src/rubyc)* |
399
403
  | http.rb | `httprb` | `>= 2.0` | `>= 2.0` | *[Link](#http-rb)* | *[Link](https://github.com/httprb/http)* |
400
404
  | httpclient | `httpclient` | `>= 2.2` | `>= 2.2` | *[Link](#httpclient)* | *[Link](https://github.com/nahi/httpclient)* |
405
+ | httpx | `httpx` | `>= 0.11` | `>= 0.11` | *[Link](#httpx)* | *[Link](https://gitlab.com/honeyryderchuck/httpx)* |
401
406
  | Kafka | `ruby-kafka` | `>= 0.7.10` | `>= 0.7.10` | *[Link](#kafka)* | *[Link](https://github.com/zendesk/ruby-kafka)* |
407
+ | Makara (through Active Record) | `makara` | `>= 0.3.5` | `>= 0.3.5` | *[Link](#active-record)* | *[Link](https://github.com/instacart/makara)* |
402
408
  | MongoDB | `mongo` | `>= 2.1` | `>= 2.1` | *[Link](#mongodb)* | *[Link](https://github.com/mongodb/mongo-ruby-driver)* |
403
409
  | MySQL2 | `mysql2` | `>= 0.3.21` | *gem not available* | *[Link](#mysql2)* | *[Link](https://github.com/brianmario/mysql2)* |
404
410
  | Net/HTTP | `http` | *(Any supported Ruby)* | *(Any supported Ruby)* | *[Link](#nethttp)* | *[Link](https://ruby-doc.org/stdlib-2.4.0/libdoc/net/http/rdoc/Net/HTTP.html)* |
@@ -438,7 +444,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
438
444
 
439
445
  | Key | Description | Default |
440
446
  | --- | ----------- | ------- |
441
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
442
447
  | `service_name` | Service name used for `action_cable` instrumentation | `'action_cable'` |
443
448
 
444
449
  ### Action View
@@ -458,7 +463,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
458
463
 
459
464
  | Key | Description | Default |
460
465
  | ---| --- | --- |
461
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
462
466
  | `service_name` | Service name used for rendering instrumentation. | `action_view` |
463
467
  | `template_base_path` | Used when the template name is parsed. If you don't store your templates in the `views/` folder, you may need to change this value | `'views/'` |
464
468
 
@@ -480,7 +484,6 @@ ActiveModelSerializers::SerializableResource.new(test_obj).serializable_hash
480
484
 
481
485
  | Key | Description | Default |
482
486
  | --- | ----------- | ------- |
483
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
484
487
  | `service_name` | Service name used for `active_model_serializers` instrumentation. | `'active_model_serializers'` |
485
488
 
486
489
  ### Action Pack
@@ -500,7 +503,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
500
503
 
501
504
  | Key | Description | Default |
502
505
  | ---| --- | --- |
503
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
504
506
  | `service_name` | Service name used for rendering instrumentation. | `action_pack` |
505
507
 
506
508
  ### Active Record
@@ -528,7 +530,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
528
530
 
529
531
  | Key | Description | Default |
530
532
  | ---| --- | --- |
531
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
532
533
  | `orm_service_name` | Service name used for the mapping portion of query results to ActiveRecord objects. Inherits service name from parent by default. | _parent.service_name_ (e.g. `'mysql2'`) |
533
534
  | `service_name` | Service name used for database portion of `active_record` instrumentation. | Name of database adapter (e.g. `'mysql2'`) |
534
535
 
@@ -547,16 +548,19 @@ Datadog.configure do |c|
547
548
  # Only available if you are using Rails with ActiveRecord.
548
549
  c.use :active_record, describes: :secondary_database, service_name: 'secondary-db'
549
550
 
551
+ # Block configuration pattern.
550
552
  c.use :active_record, describes: :secondary_database do |second_db|
551
553
  second_db.service_name = 'secondary-db'
552
554
  end
553
555
 
554
556
  # Connection string with the following connection settings:
555
- # Adapter, user, host, port, database
557
+ # adapter, username, host, port, database
558
+ # Other fields are ignored.
556
559
  c.use :active_record, describes: 'mysql2://root@127.0.0.1:3306/mysql', service_name: 'secondary-db'
557
560
 
558
- # Hash with following connection settings
559
- # Adapter, user, host, port, database
561
+ # Hash with following connection settings:
562
+ # adapter, username, host, port, database
563
+ # Other fields are ignored.
560
564
  c.use :active_record, describes: {
561
565
  adapter: 'mysql2',
562
566
  host: '127.0.0.1',
@@ -565,9 +569,34 @@ Datadog.configure do |c|
565
569
  username: 'root'
566
570
  },
567
571
  service_name: 'secondary-db'
572
+
573
+ # If using the `makara` gem, it's possible to match on connection `role`:
574
+ c.use :active_record, describes: { makara_role: 'primary' }, service_name: 'primary-db'
575
+ c.use :active_record, describes: { makara_role: 'replica' }, service_name: 'secondary-db'
576
+ end
577
+ ```
578
+
579
+ You can also create configurations based on partial matching of database connection fields:
580
+
581
+ ```ruby
582
+ Datadog.configure do |c|
583
+ # Matches any connection on host `127.0.0.1`.
584
+ c.use :active_record, describes: { host: '127.0.0.1' }, service_name: 'local-db'
585
+
586
+ # Matches any `mysql2` connection.
587
+ c.use :active_record, describes: { adapter: 'mysql2'}, service_name: 'mysql-db'
588
+
589
+ # Matches any `mysql2` connection to the `reports` database.
590
+ #
591
+ # In case of multiple matching `describe` configurations, the latest one applies.
592
+ # In this case a connection with both adapter `mysql` and database `reports`
593
+ # will be configured `service_name: 'reports-db'`, not `service_name: 'mysql-db'`.
594
+ c.use :active_record, describes: { adapter: 'mysql2', database: 'reports'}, service_name: 'reports-db'
568
595
  end
569
596
  ```
570
597
 
598
+ When multiple `describes` configurations match a connection, the latest configured rule that matches will be applied.
599
+
571
600
  If ActiveRecord traces an event that uses a connection that matches a key defined by `describes`, it will use the trace settings assigned to that connection. If the connection does not match any of the described connections, it will use default settings defined by `c.use :active_record` instead.
572
601
 
573
602
  ### Active Support
@@ -590,7 +619,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
590
619
 
591
620
  | Key | Description | Default |
592
621
  | ---| --- | --- |
593
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
594
622
  | `cache_service` | Service name used for caching with `active_support` instrumentation. | `active_support-cache` |
595
623
 
596
624
  ### AWS
@@ -613,7 +641,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
613
641
 
614
642
  | Key | Description | Default |
615
643
  | --- | ----------- | ------- |
616
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
617
644
  | `service_name` | Service name used for `aws` instrumentation | `'aws'` |
618
645
 
619
646
  ### Concurrent Ruby
@@ -673,7 +700,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
673
700
 
674
701
  | Key | Description | Default |
675
702
  | --- | ----------- | ------- |
676
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `true` |
677
703
  | `enabled` | Defines whether Cucumber tests should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
678
704
  | `service_name` | Service name used for `cucumber` instrumentation. | `'cucumber'` |
679
705
  | `operation_name` | Operation name used for `cucumber` instrumentation. Useful if you want rename automatic trace metrics e.g. `trace.#{operation_name}.errors`. | `'cucumber.test'` |
@@ -700,7 +726,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
700
726
 
701
727
  | Key | Description | Default |
702
728
  | --- | ----------- | ------- |
703
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
704
729
  | `service_name` | Service name used for `dalli` instrumentation | `'memcached'` |
705
730
 
706
731
  ### DelayedJob
@@ -721,7 +746,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
721
746
 
722
747
  | Key | Description | Default |
723
748
  | --- | ----------- | ------- |
724
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
725
749
  | `service_name` | Service name used for `DelayedJob` instrumentation | `'delayed_job'` |
726
750
  | `client_service_name` | Service name used for client-side `DelayedJob` instrumentation | `'delayed_job-client'` |
727
751
  | `error_handler` | Custom error handler invoked when a job raises an error. Provided `span` and `error` as arguments. Sets error on the span by default. Useful for ignoring transient errors. | `proc { |span, error| span.set_error(error) unless span.nil? }` |
@@ -747,7 +771,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
747
771
 
748
772
  | Key | Description | Default |
749
773
  | --- | ----------- | ------- |
750
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
751
774
  | `quantize` | Hash containing options for quantization. May include `:show` with an Array of keys to not quantize (or `:all` to skip quantization), or `:exclude` with Array of keys to exclude entirely. | `{}` |
752
775
  | `service_name` | Service name used for `elasticsearch` instrumentation | `'elasticsearch'` |
753
776
 
@@ -773,7 +796,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
773
796
 
774
797
  | Key | Description | Default |
775
798
  | --- | ----------- | ------- |
776
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
777
799
  | `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
778
800
  | `service_name` | Service name for `ethon` instrumentation. | `'ethon'` |
779
801
  | `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
@@ -805,7 +827,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
805
827
 
806
828
  | Key | Description | Default |
807
829
  | --- | ----------- | ------- |
808
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
809
830
  | `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
810
831
  | `error_handler` | A `Proc` that accepts a `response` parameter. If it evaluates to a *truthy* value, the trace span is marked as an error. By default only sets 5XX responses as errors. | `nil` |
811
832
  | `service_name` | Service name for Excon instrumentation. When provided to middleware for a specific connection, it applies only to that connection object. | `'excon'` |
@@ -868,7 +889,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
868
889
 
869
890
  | Key | Description | Default |
870
891
  | --- | ----------- | ------- |
871
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
872
892
  | `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
873
893
  | `error_handler` | A `Proc` that accepts a `response` parameter. If it evaluates to a *truthy* value, the trace span is marked as an error. By default only sets 5XX responses as errors. | `nil` |
874
894
  | `service_name` | Service name for Faraday instrumentation. When provided to middleware for a specific connection, it applies only to that connection object. | `'faraday'` |
@@ -902,7 +922,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
902
922
 
903
923
  | Key | Description | Default |
904
924
  | --- | ----------- | ------- |
905
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
906
925
  | `enabled` | Defines whether Grape should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
907
926
  | `service_name` | Service name used for `grape` instrumentation | `'grape'` |
908
927
  | `error_statuses`| Defines a status code or range of status codes which should be marked as errors. `'404,405,500-599'` or `[404,405,'500-599']` | `nil` |
@@ -927,7 +946,6 @@ The `use :graphql` method accepts the following parameters. Additional options c
927
946
 
928
947
  | Key | Description | Default |
929
948
  | --- | ----------- | ------- |
930
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
931
949
  | `service_name` | Service name used for `graphql` instrumentation | `'ruby-graphql'` |
932
950
  | `schemas` | Required. Array of `GraphQL::Schema` objects which to trace. Tracing will be added to all the schemas listed, using the options provided to this configuration. If you do not provide any, then tracing will not be activated. | `[]` |
933
951
 
@@ -1006,7 +1024,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1006
1024
 
1007
1025
  | Key | Description | Default |
1008
1026
  | --- | ----------- | ------- |
1009
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1010
1027
  | `service_name` | Service name used for `grpc` instrumentation | `'grpc'` |
1011
1028
 
1012
1029
  **Configuring clients to use different settings**
@@ -1048,7 +1065,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1048
1065
 
1049
1066
  | Key | Description | Default |
1050
1067
  | --- | ----------- | ------- |
1051
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1052
1068
  | `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
1053
1069
  | `service_name` | Service name for `httprb` instrumentation. | `'httprb'` |
1054
1070
  | `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
@@ -1058,7 +1074,7 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1058
1074
  The httpclient integration will trace any HTTP call using the httpclient gem.
1059
1075
 
1060
1076
  ```ruby
1061
- require 'http'
1077
+ require 'httpclient'
1062
1078
  require 'ddtrace'
1063
1079
  Datadog.configure do |c|
1064
1080
  c.use :httpclient, options
@@ -1074,11 +1090,29 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1074
1090
 
1075
1091
  | Key | Description | Default |
1076
1092
  | --- | ----------- | ------- |
1077
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1078
1093
  | `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
1079
1094
  | `service_name` | Service name for `httpclient` instrumentation. | `'httpclient'` |
1080
1095
  | `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
1081
1096
 
1097
+ ### httpx
1098
+
1099
+ `httpx` maintains its [own integration with `ddtrace`](https://honeyryderchuck.gitlab.io/httpx/wiki/Datadog-Adapter):
1100
+
1101
+ ```ruby
1102
+ require "ddtrace"
1103
+ require "httpx/adapters/datadog"
1104
+
1105
+ Datadog.configure do |c|
1106
+ c.use :httpx
1107
+
1108
+ # optionally, specify a different service name for hostnames matching a regex
1109
+ c.use :httpx, describes: /user-[^.]+\.example\.com/ do |http|
1110
+ http.service_name = 'user.example.com'
1111
+ http.split_by_domain = false # Only necessary if split_by_domain is true by default
1112
+ end
1113
+ end
1114
+ ```
1115
+
1082
1116
  ### Kafka
1083
1117
 
1084
1118
  The Kafka integration provides tracing of the `ruby-kafka` gem:
@@ -1099,7 +1133,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1099
1133
 
1100
1134
  | Key | Description | Default |
1101
1135
  | --- | ----------- | ------- |
1102
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1103
1136
  | `service_name` | Service name used for `kafka` instrumentation | `'kafka'` |
1104
1137
  | `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
1105
1138
 
@@ -1128,7 +1161,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1128
1161
 
1129
1162
  | Key | Description | Default |
1130
1163
  | --- | ----------- | ------- |
1131
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1132
1164
  | `quantize` | Hash containing options for quantization. May include `:show` with an Array of keys to not quantize (or `:all` to skip quantization), or `:exclude` with Array of keys to exclude entirely. | `{ show: [:collection, :database, :operation] }` |
1133
1165
  | `service_name` | Service name used for `mongo` instrumentation | `'mongodb'` |
1134
1166
 
@@ -1152,7 +1184,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1152
1184
 
1153
1185
  | Key | Description | Default |
1154
1186
  | --- | ----------- | ------- |
1155
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1156
1187
  | `service_name` | Service name used for `mysql2` instrumentation | `'mysql2'` |
1157
1188
 
1158
1189
  ### Net/HTTP
@@ -1185,7 +1216,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1185
1216
 
1186
1217
  | Key | Description | Default |
1187
1218
  | --- | ----------- | ------- |
1188
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1189
1219
  | `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
1190
1220
  | `service_name` | Service name used for `http` instrumentation | `'net/http'` |
1191
1221
  | `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
@@ -1226,7 +1256,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1226
1256
 
1227
1257
  | Key | Description | Default |
1228
1258
  | --- | ----------- | ------- |
1229
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1230
1259
  | `service_name` | Service name used for `presto` instrumentation | `'presto'` |
1231
1260
 
1232
1261
  ### Qless
@@ -1247,7 +1276,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1247
1276
 
1248
1277
  | Key | Description | Default |
1249
1278
  | --- | ----------- | ------- |
1250
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
1251
1279
  | `service_name` | Service name used for `qless` instrumentation | `'qless'` |
1252
1280
  | `tag_job_data` | Enable tagging with job arguments. true for on, false for off. | `false` |
1253
1281
  | `tag_job_tags` | Enable tagging with job tags. true for on, false for off. | `false` |
@@ -1270,7 +1298,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1270
1298
 
1271
1299
  | Key | Description | Default |
1272
1300
  | --- | ----------- | ------- |
1273
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1274
1301
  | `enabled` | Defines whether Que should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
1275
1302
  | `service_name` | Service name used for `que` instrumentation | `'que'` |
1276
1303
  | `tag_args` | Enable tagging of a job's args field. `true` for on, `false` for off. | `false` |
@@ -1295,7 +1322,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1295
1322
 
1296
1323
  | Key | Description | Default |
1297
1324
  | --- | ----------- | ------- |
1298
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1299
1325
  | `service_name` | Service name used for `racecar` instrumentation | `'racecar'` |
1300
1326
 
1301
1327
  ### Rack
@@ -1325,7 +1351,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1325
1351
 
1326
1352
  | Key | Description | Default |
1327
1353
  | --- | ----------- | ------- |
1328
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
1329
1354
  | `application` | Your Rack application. Required for `middleware_names`. | `nil` |
1330
1355
  | `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) so that this service trace is connected with a trace of another service if tracing headers are received | `true` |
1331
1356
  | `headers` | Hash of HTTP request or response headers to add as tags to the `rack.request`. Accepts `request` and `response` keys with Array values e.g. `['Last-Modified']`. Adds `http.request.headers.*` and `http.response.headers.*` tags respectively. | `{ response: ['Content-Type', 'X-Request-ID'] }` |
@@ -1388,7 +1413,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1388
1413
 
1389
1414
  | Key | Description | Default |
1390
1415
  | --- | ----------- | ------- |
1391
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `nil` |
1392
1416
  | `cache_service` | Cache service name used when tracing cache activity | `'<app_name>-cache'` |
1393
1417
  | `controller_service` | Service name used when tracing a Rails action controller | `'<app_name>'` |
1394
1418
  | `database_service` | Database service name used when tracing database activity | `'<app_name>-<adapter_name>'` |
@@ -1438,7 +1462,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1438
1462
 
1439
1463
  | Key | Description | Default |
1440
1464
  | --- | ----------- | ------- |
1441
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
1442
1465
  | `enabled` | Defines whether Rake tasks should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
1443
1466
  | `quantize` | Hash containing options for quantization of task arguments. See below for more details and examples. | `{}` |
1444
1467
  | `service_name` | Service name used for `rake` instrumentation | `'rake'` |
@@ -1498,7 +1521,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1498
1521
 
1499
1522
  | Key | Description | Default |
1500
1523
  | --- | ----------- | ------- |
1501
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1502
1524
  | `service_name` | Service name used for `redis` instrumentation | `'redis'` |
1503
1525
  | `command_args` | Show the command arguments (e.g. `key` in `GET key`) as resource name and tag | true |
1504
1526
 
@@ -1538,12 +1560,17 @@ Datadog.configure do |c|
1538
1560
  # The default configuration for any redis client
1539
1561
  c.use :redis, service_name: 'redis-default'
1540
1562
 
1541
- # The configuration matching a given unix socket
1563
+ # The configuration matching a given unix socket.
1542
1564
  c.use :redis, describes: { url: 'unix://path/to/file' }, service_name: 'redis-unix'
1543
1565
 
1544
- # Connection string
1545
- c.use :redis, describes: { url: 'redis://127.0.0.1:6379/0' }, service_name: 'redis-connection-string'
1546
- # Client host, port, db, scheme
1566
+ # For network connections, only these fields are considered during matching:
1567
+ # scheme, host, port, db
1568
+ # Other fields are ignored.
1569
+
1570
+ # Network connection string
1571
+ c.use :redis, describes: 'redis://127.0.0.1:6379/0', service_name: 'redis-connection-string'
1572
+ c.use :redis, describes: { url: 'redis://127.0.0.1:6379/1' }, service_name: 'redis-connection-url'
1573
+ # Network client hash
1547
1574
  c.use :redis, describes: { host: 'my-host.com', port: 6379, db: 1, scheme: 'redis' }, service_name: 'redis-connection-hash'
1548
1575
  # Only a subset of the connection hash
1549
1576
  c.use :redis, describes: { host: ENV['APP_CACHE_HOST'], port: ENV['APP_CACHE_PORT'] }, service_name: 'redis-cache'
@@ -1551,6 +1578,8 @@ Datadog.configure do |c|
1551
1578
  end
1552
1579
  ```
1553
1580
 
1581
+ When multiple `describes` configurations match a connection, the latest configured rule that matches will be applied.
1582
+
1554
1583
  ### Resque
1555
1584
 
1556
1585
  The Resque integration uses Resque hooks that wraps the `perform` method.
@@ -1558,16 +1587,11 @@ The Resque integration uses Resque hooks that wraps the `perform` method.
1558
1587
  To add tracing to a Resque job:
1559
1588
 
1560
1589
  ```ruby
1590
+ require 'resque'
1561
1591
  require 'ddtrace'
1562
1592
 
1563
- class MyJob
1564
- def self.perform(*args)
1565
- # do_something
1566
- end
1567
- end
1568
-
1569
1593
  Datadog.configure do |c|
1570
- c.use :resque, options
1594
+ c.use :resque, **options
1571
1595
  end
1572
1596
  ```
1573
1597
 
@@ -1575,10 +1599,9 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1575
1599
 
1576
1600
  | Key | Description | Default |
1577
1601
  | --- | ----------- | ------- |
1578
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
1579
1602
  | `service_name` | Service name used for `resque` instrumentation | `'resque'` |
1580
- | `workers` | An array including all worker classes you want to trace (e.g. `[MyJob]`) | `[]` |
1581
1603
  | `error_handler` | Custom error handler invoked when a job raises an error. Provided `span` and `error` as arguments. Sets error on the span by default. Useful for ignoring transient errors. | `proc { |span, error| span.set_error(error) unless span.nil? }` |
1604
+ | `workers` | **[DEPRECATED]** Limits instrumented worker classes to only the ones specified in an array (e.g. `[MyJob]`). If not provided, instruments all workers. | `nil` |
1582
1605
 
1583
1606
  ### Rest Client
1584
1607
 
@@ -1597,7 +1620,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1597
1620
 
1598
1621
  | Key | Description | Default |
1599
1622
  | --- | ----------- | ------- |
1600
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1601
1623
  | `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
1602
1624
  | `service_name` | Service name for `rest_client` instrumentation. | `'rest_client'` |
1603
1625
 
@@ -1621,7 +1643,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1621
1643
 
1622
1644
  | Key | Description | Default |
1623
1645
  | --- | ----------- | ------- |
1624
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `true` |
1625
1646
  | `enabled` | Defines whether RSpec tests should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
1626
1647
  | `service_name` | Service name used for `rspec` instrumentation. | `'rspec'` |
1627
1648
  | `operation_name` | Operation name used for `rspec` instrumentation. Useful if you want rename automatic trace metrics e.g. `trace.#{operation_name}.errors`. | `'rspec.example'` |
@@ -1656,11 +1677,8 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1656
1677
 
1657
1678
  | Key | Description | Default |
1658
1679
  | --- | ----------- | ------- |
1659
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1660
1680
  | `service_name` | Service name for `sequel` instrumentation | Name of database adapter (e.g. `'mysql2'`) |
1661
1681
 
1662
- Only Ruby 2.0+ is supported.
1663
-
1664
1682
  **Configuring databases to use different settings**
1665
1683
 
1666
1684
  If you use multiple databases with Sequel, you can give each of them different settings by configuring their respective `Sequel::Database` objects:
@@ -1692,8 +1710,8 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1692
1710
 
1693
1711
  | Key | Description | Default |
1694
1712
  | --- | ----------- | ------- |
1695
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1696
1713
  | `service_name` | Service name used for `shoryuken` instrumentation | `'shoryuken'` |
1714
+ | `tag_body` | Tag spans with the SQS message body `true` or `false` | `false` |
1697
1715
  | `error_handler` | Custom error handler invoked when a job raises an error. Provided `span` and `error` as arguments. Sets error on the span by default. Useful for ignoring transient errors. | `proc { |span, error| span.set_error(error) unless span.nil? }` |
1698
1716
 
1699
1717
  ### Sidekiq
@@ -1714,7 +1732,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1714
1732
 
1715
1733
  | Key | Description | Default |
1716
1734
  | --- | ----------- | ------- |
1717
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1718
1735
  | `client_service_name` | Service name used for client-side `sidekiq` instrumentation | `'sidekiq-client'` |
1719
1736
  | `service_name` | Service name used for server-side `sidekiq` instrumentation | `'sidekiq'` |
1720
1737
  | `tag_args` | Enable tagging of job arguments. `true` for on, `false` for off. | `false` |
@@ -1778,7 +1795,6 @@ Ensure you register `Datadog::Contrib::Sinatra::Tracer` as a middleware before y
1778
1795
 
1779
1796
  | Key | Description | Default |
1780
1797
  | --- | ----------- | ------- |
1781
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
1782
1798
  | `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) so that this service trace is connected with a trace of another service if tracing headers are received | `true` |
1783
1799
  | `headers` | Hash of HTTP request or response headers to add as tags to the `sinatra.request`. Accepts `request` and `response` keys with Array values e.g. `['Last-Modified']`. Adds `http.request.headers.*` and `http.response.headers.*` tags respectively. | `{ response: ['Content-Type', 'X-Request-ID'] }` |
1784
1800
  | `resource_script_names` | Prepend resource names with script name | `false` |
@@ -1802,7 +1818,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1802
1818
 
1803
1819
  | Key | Description | Default |
1804
1820
  | --- | ----------- | ------- |
1805
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1806
1821
  | `enabled` | Defines whether Sneakers should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
1807
1822
  | `service_name` | Service name used for `sneakers` instrumentation | `'sneakers'` |
1808
1823
  | `tag_body` | Enable tagging of job message. `true` for on, `false` for off. | `false` |
@@ -1827,7 +1842,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1827
1842
 
1828
1843
  | Key | Description | Default |
1829
1844
  | --- | ----------- | ------- |
1830
- | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1831
1845
  | `service_name` | Service name used for `sucker_punch` instrumentation | `'sucker_punch'` |
1832
1846
 
1833
1847
  ## Advanced configuration
@@ -1843,13 +1857,20 @@ Datadog.configure do |c|
1843
1857
  c.tracer.enabled = true
1844
1858
  c.tracer.hostname = 'my-agent'
1845
1859
  c.tracer.port = 8126
1846
- c.tracer.partial_flush.enabled = false
1860
+
1861
+ # Ensure all traces are ingested by Datadog
1862
+ c.sampling.default_rate = 1.0 # Recommended
1863
+ c.sampling.rate_limit = 200
1864
+ # or provide a custom implementation (overrides c.sampling settings)
1847
1865
  c.tracer.sampler = Datadog::AllSampler.new
1848
1866
 
1849
- # OR for advanced use cases, you can specify your own tracer:
1867
+ # Breaks down very large traces into smaller batches
1868
+ c.tracer.partial_flush.enabled = false
1869
+
1870
+ # You can specify your own tracer
1850
1871
  c.tracer.instance = Datadog::Tracer.new
1851
1872
 
1852
- # To enable debug mode:
1873
+ # To enable debug mode
1853
1874
  c.diagnostics.debug = true
1854
1875
  end
1855
1876
  ```
@@ -1861,9 +1882,12 @@ Available options are:
1861
1882
  - `instance`: set to a custom `Datadog::Tracer` instance. If provided, other trace settings are ignored (you must configure it manually.)
1862
1883
  - `partial_flush.enabled`: set to `true` to enable partial trace flushing (for long running traces.) Disabled by default. *Experimental.*
1863
1884
  - `port`: set the port the trace agent is listening on.
1885
+ - `sampling.default_rate`: default tracer sampling rate, between `0.0` (0%) and `1.0` (100%, recommended). `1.0` or Tracing without Limits™, allows you to send all of your traffic and retention can be [configured within the Datadog app](https://docs.datadoghq.com/tracing/trace_retention_and_ingestion/). When this configuration is not set, the Datadog agent will keep an intelligent assortment of diverse traces.
1886
+ - `sampling.rate_limit`: maximum number of traces per second to sample. Defaults to 100 per second.
1864
1887
  - `sampler`: set to a custom `Datadog::Sampler` instance. If provided, the tracer will use this sampler to determine sampling behavior.
1865
1888
  - `diagnostics.startup_logs.enabled`: Startup configuration and diagnostic log. Defaults to `true`. Can be configured through the `DD_TRACE_STARTUP_LOGS` environment variable.
1866
1889
  - `diagnostics.debug`: set to true to enable debug logging. Can be configured through the `DD_TRACE_DEBUG` environment variable. Defaults to `false`.
1890
+ - `time_now_provider`: when testing, it might be helpful to use a different time provider. For Timecop, for example, `->{ Time.now_without_mock_time }` allows the tracer to use the real wall time. Span duration calculation will still use the system monotonic clock when available, thus not being affected by this setting. Defaults to `->{ Time.now }`.
1867
1891
 
1868
1892
  #### Custom logging
1869
1893
 
@@ -1917,13 +1941,22 @@ Other Environment Variables:
1917
1941
 
1918
1942
  - `DD_TRACE_AGENT_URL`: Sets the URL endpoint where traces are sent. Has priority over `DD_AGENT_HOST` and `DD_TRACE_AGENT_PORT` if set. e.g. `DD_TRACE_AGENT_URL=http://localhost:8126`.
1919
1943
  - `DD_TRACE_<INTEGRATION>_ENABLED`: Enables or disables an **activated** integration. Defaults to `true`.. e.g. `DD_TRACE_RAILS_ENABLED=false`. This option has no effects on integrations that have not been explicitly activated (e.g. `Datadog.configure{ |c| c.use :integration }`).on code. This environment variable can only be used to disable an integration.
1920
- - `DD_TRACE_<INTEGRATION>_ANALYTICS_ENABLED`: Enables or disable App Analytics for a specific integration. Valid values are: true or false (default). e.g. `DD_TRACE_ACTION_CABLE_ANALYTICS_ENABLED=true`.
1921
- - `DD_TRACE_<INTEGRATION>_ANALYTICS_SAMPLE_RATE`: Sets the App Analytics sampling rate for a specific integration. A floating number between 0.0 and 1.0 (default). e.g. `DD_TRACE_ACTION_CABLE_ANALYTICS_SAMPLE_RATE=0.5`.
1944
+ - `DD_TRACE_SAMPLE_RATE`: Sets the trace sampling rate between `0.0` (0%) and `1.0` (100%, recommended). `1.0` or Tracing without Limits™, allows you to send all of your traffic and retention can be [configured within the Datadog app](https://docs.datadoghq.com/tracing/trace_retention_and_ingestion/). When this configuration is not set, the Datadog agent will keep an intelligent assortment of diverse traces.
1922
1945
  - `DD_LOGS_INJECTION`: Automatically enables injection [Trace Correlation](#trace-correlation) information, such as `dd.trace_id`, into Rails logs. Supports the default logger (`ActiveSupport::TaggedLogging`) and `Lograge`. Details on the format of Trace Correlation information can be found in the [Trace Correlation](#trace-correlation) section. Valid values are: `true` or `false`(default). e.g. `DD_LOGS_INJECTION=true`.
1923
1946
 
1924
1947
  ### Sampling
1925
1948
 
1926
- `ddtrace` can perform trace sampling. While the trace agent already samples traces to reduce bandwidth usage, client sampling reduces the performance overhead.
1949
+ Datadog's Tracing without Limits™ allows you to send all of your traffic and [configure retention within the Datadog app](https://docs.datadoghq.com/tracing/trace_retention_and_ingestion/).
1950
+
1951
+ We recommend setting the environment variable `DD_TRACE_SAMPLE_RATE=1.0` in all new applications using `ddtrace`.
1952
+
1953
+ App Analytics, previously configured with the `analytics_enabled` setting, is deprecated in favor of Tracing without Limits™. Documentation for this [deprecated configuration is still available](https://docs.datadoghq.com/tracing/legacy_app_analytics/).
1954
+
1955
+ #### Application-side sampling
1956
+
1957
+ While the trace agent can sample traces to reduce bandwidth usage, application-side sampling reduces the performance overhead.
1958
+
1959
+ This will **reduce visibility and is not recommended**. See [DD_TRACE_SAMPLE_RATE](#environment-variables) for the recommended sampling approach.
1927
1960
 
1928
1961
  `Datadog::RateSampler` samples a ratio of the traces. For example:
1929
1962
 
@@ -2081,13 +2114,14 @@ For more details on how to activate distributed tracing for integrations, see th
2081
2114
 
2082
2115
  - [Excon](#excon)
2083
2116
  - [Faraday](#faraday)
2084
- - [Rest Client](#restclient)
2117
+ - [Rest Client](#rest-client)
2085
2118
  - [Net/HTTP](#nethttp)
2086
2119
  - [Rack](#rack)
2087
2120
  - [Rails](#rails)
2088
2121
  - [Sinatra](#sinatra)
2089
2122
  - [http.rb](#http-rb)
2090
2123
  - [httpclient](#httpclient)
2124
+ - [httpx](#httpx)
2091
2125
 
2092
2126
  **Using the HTTP propagator**
2093
2127
 
@@ -2375,7 +2409,7 @@ The tracer and its integrations can produce some additional metrics that can pro
2375
2409
  To configure your application for metrics collection:
2376
2410
 
2377
2411
  1. [Configure your Datadog agent for StatsD](https://docs.datadoghq.com/developers/dogstatsd/#setup)
2378
- 2. Add `gem 'dogstatsd-ruby'` to your Gemfile
2412
+ 2. Add `gem 'dogstatsd-ruby', '~> 4.0'` to your Gemfile (note that it is advised to pin v4.x [until this issue is solved](https://github.com/DataDog/dogstatsd-ruby/issues/182))
2379
2413
 
2380
2414
  #### For application runtime
2381
2415
 
@@ -2445,3 +2479,19 @@ However, additional instrumentation provided by Datadog can be activated alongsi
2445
2479
  | `OpenTracing::FORMAT_TEXT_MAP` | Yes | |
2446
2480
  | `OpenTracing::FORMAT_RACK` | Yes | Because of the loss of resolution in the Rack format, please note that baggage items with names containing either upper case characters or `-` will be converted to lower case and `_` in a round-trip respectively. We recommend avoiding these characters or accommodating accordingly on the receiving end. |
2447
2481
  | `OpenTracing::FORMAT_BINARY` | No | |
2482
+
2483
+ ### Profiling
2484
+
2485
+ *Currently available as BETA feature.*
2486
+
2487
+ `ddtrace` can produce profiles that measure method-level application resource usage within production environments. These profiles can give insight into resources spent in Ruby code outside of existing trace instrumentation.
2488
+
2489
+ **Setup**
2490
+
2491
+ To get started with profiling, follow the [Profiler Getting Started Guide](https://docs.datadoghq.com/tracing/profiler/getting_started/?code-lang=ruby).
2492
+
2493
+ #### Profiling Resque jobs
2494
+
2495
+ When profiling [Resque](https://github.com/resque/resque) jobs, you should set the `RUN_AT_EXIT_HOOKS=1` option described in the [Resque](https://github.com/resque/resque/blob/v2.0.0/docs/HOOKS.md#worker-hooks) documentation.
2496
+
2497
+ Without this flag, profiles for short-lived Resque jobs will not be available as Resque kills worker processes before they have a chance to submit this information.