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
@@ -0,0 +1,43 @@
1
+ require 'ddtrace/transport/http/api/map'
2
+ require 'ddtrace/profiling/encoding/profile'
3
+ require 'ddtrace/profiling/transport/http/api/spec'
4
+ require 'ddtrace/profiling/transport/http/api/instance'
5
+ require 'ddtrace/profiling/transport/http/api/endpoint'
6
+
7
+ module Datadog
8
+ module Profiling
9
+ module Transport
10
+ module HTTP
11
+ # Extensions for HTTP API Spec
12
+ module API
13
+ # Default API versions
14
+ V1 = 'v1'.freeze
15
+
16
+ module_function
17
+
18
+ def agent_defaults
19
+ @agent_defaults ||= Datadog::Transport::HTTP::API::Map[
20
+ V1 => Spec.new do |s|
21
+ s.profiles = Endpoint.new(
22
+ '/profiling/v1/input'.freeze,
23
+ Profiling::Encoding::Profile::Protobuf
24
+ )
25
+ end
26
+ ]
27
+ end
28
+
29
+ def api_defaults
30
+ @api_defaults ||= Datadog::Transport::HTTP::API::Map[
31
+ V1 => Spec.new do |s|
32
+ s.profiles = Endpoint.new(
33
+ '/v1/input'.freeze,
34
+ Profiling::Encoding::Profile::Protobuf
35
+ )
36
+ end
37
+ ]
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,100 @@
1
+ require 'ddtrace/ext/profiling'
2
+ require 'ddtrace/utils/compression'
3
+ require 'ddtrace/vendor/multipart-post/multipart/post/composite_read_io'
4
+
5
+ require 'ddtrace/transport/http/api/endpoint'
6
+ require 'ddtrace/profiling/transport/http/response'
7
+
8
+ module Datadog
9
+ module Profiling
10
+ module Transport
11
+ module HTTP
12
+ module API
13
+ # Datadog API endpoint for profiling
14
+ class Endpoint < Datadog::Transport::HTTP::API::Endpoint
15
+ include Datadog::Ext::Profiling::Transport::HTTP
16
+
17
+ # These tags are read from the flush object (see below) directly and so we ignore any extra copies that
18
+ # may come in the tags hash to avoid duplicates.
19
+ TAGS_TO_IGNORE_IN_TAGS_HASH = %w[service env version].freeze
20
+ private_constant :TAGS_TO_IGNORE_IN_TAGS_HASH
21
+
22
+ attr_reader \
23
+ :encoder
24
+
25
+ def initialize(path, encoder)
26
+ super(:post, path)
27
+ @encoder = encoder
28
+ end
29
+
30
+ def call(env, &block)
31
+ # Build request
32
+ env.form = build_form(env)
33
+
34
+ # Send request
35
+ http_response = super(env, &block)
36
+
37
+ # Build response
38
+ Profiling::Transport::HTTP::Response.new(http_response)
39
+ end
40
+
41
+ def build_form(env)
42
+ flush = env.request.parcel.data
43
+ pprof_file, types = build_pprof(flush)
44
+
45
+ form = {
46
+ # NOTE: Redundant w/ 'runtime-id' tag below; may want to remove this later.
47
+ FORM_FIELD_RUNTIME_ID => flush.runtime_id,
48
+ FORM_FIELD_RECORDING_START => flush.start.utc.iso8601,
49
+ FORM_FIELD_RECORDING_END => flush.finish.utc.iso8601,
50
+ FORM_FIELD_TAGS => [
51
+ "#{FORM_FIELD_TAG_RUNTIME}:#{flush.language}",
52
+ "#{FORM_FIELD_TAG_RUNTIME_ID}:#{flush.runtime_id}",
53
+ "#{FORM_FIELD_TAG_RUNTIME_ENGINE}:#{flush.runtime_engine}",
54
+ "#{FORM_FIELD_TAG_RUNTIME_PLATFORM}:#{flush.runtime_platform}",
55
+ "#{FORM_FIELD_TAG_RUNTIME_VERSION}:#{flush.runtime_version}",
56
+ "#{FORM_FIELD_TAG_PID}:#{Process.pid}",
57
+ "#{FORM_FIELD_TAG_PROFILER_VERSION}:#{flush.profiler_version}",
58
+ # NOTE: Redundant w/ 'runtime'; may want to remove this later.
59
+ "#{FORM_FIELD_TAG_LANGUAGE}:#{flush.language}",
60
+ "#{FORM_FIELD_TAG_HOST}:#{flush.host}",
61
+ *flush
62
+ .tags
63
+ .reject { |tag_key| TAGS_TO_IGNORE_IN_TAGS_HASH.include?(tag_key) }
64
+ .map { |tag_key, tag_value| "#{tag_key}:#{tag_value}" }
65
+ ],
66
+ FORM_FIELD_DATA => pprof_file,
67
+ FORM_FIELD_RUNTIME => flush.language,
68
+ FORM_FIELD_FORMAT => FORM_FIELD_FORMAT_PPROF
69
+ }
70
+
71
+ # Add types
72
+ form[FORM_FIELD_TYPES] = types.join(',')
73
+
74
+ # Optional fields
75
+ form[FORM_FIELD_TAGS] << "#{FORM_FIELD_TAG_SERVICE}:#{flush.service}" unless flush.service.nil?
76
+ form[FORM_FIELD_TAGS] << "#{FORM_FIELD_TAG_ENV}:#{flush.env}" unless flush.env.nil?
77
+ form[FORM_FIELD_TAGS] << "#{FORM_FIELD_TAG_VERSION}:#{flush.version}" unless flush.version.nil?
78
+
79
+ form
80
+ end
81
+
82
+ def build_pprof(flush)
83
+ pprof = encoder.encode(flush)
84
+
85
+ # Wrap pprof as a gzipped file
86
+ gzipped_data = Datadog::Utils::Compression.gzip(pprof.data)
87
+ pprof_file = Datadog::Vendor::Multipart::Post::UploadIO.new(
88
+ StringIO.new(gzipped_data),
89
+ HEADER_CONTENT_TYPE_OCTET_STREAM,
90
+ PPROF_DEFAULT_FILENAME
91
+ )
92
+
93
+ [pprof_file, [FORM_FIELD_TYPES_AUTO]]
94
+ end
95
+ end
96
+ end
97
+ end
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,36 @@
1
+ require 'ddtrace/transport/http/api/instance'
2
+ require 'ddtrace/profiling/transport/http/api/spec'
3
+
4
+ module Datadog
5
+ module Profiling
6
+ module Transport
7
+ module HTTP
8
+ module API
9
+ # API instance for profiling
10
+ class Instance < Datadog::Transport::HTTP::API::Instance
11
+ def send_profiling_flush(env)
12
+ raise ProfilesNotSupportedError, spec unless spec.is_a?(Spec)
13
+
14
+ spec.send_profiling_flush(env) do |request_env|
15
+ call(request_env)
16
+ end
17
+ end
18
+
19
+ # Raised when profiles sent to API that does not support profiles
20
+ class ProfilesNotSupportedError < StandardError
21
+ attr_reader :spec
22
+
23
+ def initialize(spec)
24
+ @spec = spec
25
+ end
26
+
27
+ def message
28
+ 'Profiles not supported for this API!'
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,40 @@
1
+ require 'ddtrace/transport/http/api/spec'
2
+
3
+ module Datadog
4
+ module Profiling
5
+ module Transport
6
+ module HTTP
7
+ module API
8
+ # API specification for profiling
9
+ class Spec < Datadog::Transport::HTTP::API::Spec
10
+ attr_accessor \
11
+ :profiles
12
+
13
+ def send_profiling_flush(env, &block)
14
+ raise NoProfilesEndpointDefinedError, self if profiles.nil?
15
+
16
+ profiles.call(env, &block)
17
+ end
18
+
19
+ def encoder
20
+ profiles.encoder
21
+ end
22
+
23
+ # Raised when profiles sent but no profiles endpoint is defined
24
+ class NoProfilesEndpointDefinedError < StandardError
25
+ attr_reader :spec
26
+
27
+ def initialize(spec)
28
+ @spec = spec
29
+ end
30
+
31
+ def message
32
+ 'No profiles endpoint is defined for API specification!'
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,28 @@
1
+ require 'ddtrace/transport/http/builder'
2
+
3
+ require 'ddtrace/profiling/transport/http/api'
4
+ require 'ddtrace/profiling/transport/http/client'
5
+
6
+ module Datadog
7
+ module Profiling
8
+ module Transport
9
+ module HTTP
10
+ # Builds new instances of Transport::HTTP::Client
11
+ class Builder < Datadog::Transport::HTTP::Builder
12
+ def api_instance_class
13
+ API::Instance
14
+ end
15
+
16
+ def to_transport
17
+ raise Datadog::Transport::HTTP::Builder::NoDefaultApiError if @default_api.nil?
18
+
19
+ # TODO: Profiling doesn't have multiple APIs yet.
20
+ # When it does, we should build it out with these APIs.
21
+ # Just use :default_api for now.
22
+ Client.new(to_api_instances[@default_api])
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,33 @@
1
+ require 'ddtrace/transport/http/client'
2
+ require 'ddtrace/profiling/transport/client'
3
+
4
+ module Datadog
5
+ module Profiling
6
+ module Transport
7
+ module HTTP
8
+ # Routes, encodes, and sends tracer data to the trace agent via HTTP.
9
+ class Client < Datadog::Transport::HTTP::Client
10
+ include Transport::Client
11
+
12
+ def send_profiling_flush(flush)
13
+ # Build a request
14
+ request = Profiling::Transport::Request.new(flush)
15
+ send_payload(request).tap do |response|
16
+ if response.ok?
17
+ Datadog.logger.debug('Successfully reported profiling data')
18
+ else
19
+ Datadog.logger.debug { "Failed to report profiling data -- #{response.inspect}" }
20
+ end
21
+ end
22
+ end
23
+
24
+ def send_payload(request)
25
+ send_request(request) do |api, env|
26
+ api.send_profiling_flush(env)
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,21 @@
1
+ require 'ddtrace/transport/http/response'
2
+ require 'ddtrace/profiling/transport/response'
3
+
4
+ module Datadog
5
+ module Profiling
6
+ module Transport
7
+ # HTTP transport behavior for profiling
8
+ module HTTP
9
+ # Response from HTTP transport for profiling
10
+ class Response
11
+ include Datadog::Transport::HTTP::Response
12
+ include Profiling::Transport::Response
13
+
14
+ def initialize(http_response, options = {})
15
+ super(http_response)
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,30 @@
1
+ require 'ddtrace/profiling/transport/io/client'
2
+ require 'ddtrace/profiling/encoding/profile'
3
+
4
+ module Datadog
5
+ module Profiling
6
+ module Transport
7
+ # Namespace for profiling IO transport components
8
+ module IO
9
+ module_function
10
+
11
+ # Builds a new Profiling::Transport::IO::Client
12
+ def new(out, encoder, options = {})
13
+ Client.new(out, encoder, options)
14
+ end
15
+
16
+ # Builds a new Profiling::Transport::IO::Client with default settings
17
+ # Pass options to override any settings.
18
+ def default(options = {})
19
+ options = options.dup
20
+
21
+ new(
22
+ options.delete(:out) || $stdout,
23
+ options.delete(:encoder) || Profiling::Encoding::Profile::Protobuf,
24
+ options
25
+ )
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,27 @@
1
+ require 'ddtrace/transport/io/client'
2
+ require 'ddtrace/profiling/transport/client'
3
+ require 'ddtrace/profiling/transport/request'
4
+ require 'ddtrace/profiling/transport/io/response'
5
+
6
+ module Datadog
7
+ module Profiling
8
+ module Transport
9
+ module IO
10
+ # IO transport for profiling
11
+ class Client < Datadog::Transport::IO::Client
12
+ include Transport::Client
13
+
14
+ def send_profiling_flush(flush)
15
+ # Build a request
16
+ request = Profiling::Transport::Request.new(flush)
17
+ send_request(request)
18
+ end
19
+
20
+ def build_response(_request, _data, result)
21
+ Profiling::Transport::IO::Response.new(result)
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,16 @@
1
+ require 'ddtrace/transport/io/response'
2
+ require 'ddtrace/profiling/transport/response'
3
+
4
+ module Datadog
5
+ module Profiling
6
+ module Transport
7
+ # IO transport behavior for profiling
8
+ module IO
9
+ # Response from IO transport for profiling
10
+ class Response < Datadog::Transport::IO::Response
11
+ include Profiling::Transport::Response
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,17 @@
1
+ require 'ddtrace/transport/parcel'
2
+
3
+ module Datadog
4
+ module Profiling
5
+ module Transport
6
+ # Data transfer object for profiling data
7
+ class Parcel
8
+ include Datadog::Transport::Parcel
9
+
10
+ def encode_with(encoder)
11
+ # TODO: Determine encoding behavior
12
+ encoder.encode(data)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ require 'ddtrace/transport/request'
2
+ require 'ddtrace/profiling/transport/parcel'
3
+
4
+ module Datadog
5
+ module Profiling
6
+ module Transport
7
+ # Profiling request
8
+ class Request < Datadog::Transport::Request
9
+ def initialize(flush)
10
+ super(Parcel.new(flush))
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,8 @@
1
+ module Datadog
2
+ module Profiling
3
+ module Transport
4
+ # Profiling response
5
+ module Response; end
6
+ end
7
+ end
8
+ end
@@ -19,6 +19,7 @@ module Datadog
19
19
  def self.extract(metadata)
20
20
  metadata = Carrier.new(metadata)
21
21
  return Datadog::Context.new unless metadata.valid?
22
+
22
23
  Datadog::Context.new(trace_id: metadata.trace_id,
23
24
  span_id: metadata.parent_id,
24
25
  sampling_priority: metadata.sampling_priority,