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,12 @@
1
+ require 'ddtrace/utils/object_set'
2
+
3
+ module Datadog
4
+ module Profiling
5
+ module Pprof
6
+ # Acts as a unique dictionary of protobuf messages
7
+ class MessageSet < Utils::ObjectSet
8
+ alias_method :messages, :objects
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,18 @@
1
+ module Datadog
2
+ module Profiling
3
+ module Pprof
4
+ # Pprof output data.
5
+ # Includes encoded data and list of types.
6
+ Payload = Struct.new(:data, :types) do
7
+ def initialize(*args)
8
+ super
9
+ self.types = types || []
10
+ end
11
+
12
+ def to_s
13
+ data
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,212 @@
1
+ // Copyright 2016 Google Inc. All Rights Reserved.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ // Profile is a common stacktrace profile format.
16
+ //
17
+ // Measurements represented with this format should follow the
18
+ // following conventions:
19
+ //
20
+ // - Consumers should treat unset optional fields as if they had been
21
+ // set with their default value.
22
+ //
23
+ // - When possible, measurements should be stored in "unsampled" form
24
+ // that is most useful to humans. There should be enough
25
+ // information present to determine the original sampled values.
26
+ //
27
+ // - On-disk, the serialized proto must be gzip-compressed.
28
+ //
29
+ // - The profile is represented as a set of samples, where each sample
30
+ // references a sequence of locations, and where each location belongs
31
+ // to a mapping.
32
+ // - There is a N->1 relationship from sample.location_id entries to
33
+ // locations. For every sample.location_id entry there must be a
34
+ // unique Location with that id.
35
+ // - There is an optional N->1 relationship from locations to
36
+ // mappings. For every nonzero Location.mapping_id there must be a
37
+ // unique Mapping with that id.
38
+
39
+ syntax = "proto3";
40
+
41
+ package perftools.profiles;
42
+
43
+ option java_package = "com.google.perftools.profiles";
44
+ option java_outer_classname = "ProfileProto";
45
+
46
+ message Profile {
47
+ // A description of the samples associated with each Sample.value.
48
+ // For a cpu profile this might be:
49
+ // [["cpu","nanoseconds"]] or [["wall","seconds"]] or [["syscall","count"]]
50
+ // For a heap profile, this might be:
51
+ // [["allocations","count"], ["space","bytes"]],
52
+ // If one of the values represents the number of events represented
53
+ // by the sample, by convention it should be at index 0 and use
54
+ // sample_type.unit == "count".
55
+ repeated ValueType sample_type = 1;
56
+ // The set of samples recorded in this profile.
57
+ repeated Sample sample = 2;
58
+ // Mapping from address ranges to the image/binary/library mapped
59
+ // into that address range. mapping[0] will be the main binary.
60
+ repeated Mapping mapping = 3;
61
+ // Useful program location
62
+ repeated Location location = 4;
63
+ // Functions referenced by locations
64
+ repeated Function function = 5;
65
+ // A common table for strings referenced by various messages.
66
+ // string_table[0] must always be "".
67
+ repeated string string_table = 6;
68
+ // frames with Function.function_name fully matching the following
69
+ // regexp will be dropped from the samples, along with their successors.
70
+ int64 drop_frames = 7; // Index into string table.
71
+ // frames with Function.function_name fully matching the following
72
+ // regexp will be kept, even if it matches drop_functions.
73
+ int64 keep_frames = 8; // Index into string table.
74
+
75
+ // The following fields are informational, do not affect
76
+ // interpretation of results.
77
+
78
+ // Time of collection (UTC) represented as nanoseconds past the epoch.
79
+ int64 time_nanos = 9;
80
+ // Duration of the profile, if a duration makes sense.
81
+ int64 duration_nanos = 10;
82
+ // The kind of events between sampled ocurrences.
83
+ // e.g [ "cpu","cycles" ] or [ "heap","bytes" ]
84
+ ValueType period_type = 11;
85
+ // The number of events between sampled occurrences.
86
+ int64 period = 12;
87
+ // Freeform text associated to the profile.
88
+ repeated int64 comment = 13; // Indices into string table.
89
+ // Index into the string table of the type of the preferred sample
90
+ // value. If unset, clients should default to the last sample value.
91
+ int64 default_sample_type = 14;
92
+ }
93
+
94
+ // ValueType describes the semantics and measurement units of a value.
95
+ message ValueType {
96
+ int64 type = 1; // Index into string table.
97
+ int64 unit = 2; // Index into string table.
98
+ }
99
+
100
+ // Each Sample records values encountered in some program
101
+ // context. The program context is typically a stack trace, perhaps
102
+ // augmented with auxiliary information like the thread-id, some
103
+ // indicator of a higher level request being handled etc.
104
+ message Sample {
105
+ // The ids recorded here correspond to a Profile.location.id.
106
+ // The leaf is at location_id[0].
107
+ repeated uint64 location_id = 1;
108
+ // The type and unit of each value is defined by the corresponding
109
+ // entry in Profile.sample_type. All samples must have the same
110
+ // number of values, the same as the length of Profile.sample_type.
111
+ // When aggregating multiple samples into a single sample, the
112
+ // result has a list of values that is the elemntwise sum of the
113
+ // lists of the originals.
114
+ repeated int64 value = 2;
115
+ // label includes additional context for this sample. It can include
116
+ // things like a thread id, allocation size, etc
117
+ repeated Label label = 3;
118
+ }
119
+
120
+ message Label {
121
+ int64 key = 1; // Index into string table
122
+
123
+ // At most one of the following must be present
124
+ int64 str = 2; // Index into string table
125
+ int64 num = 3;
126
+
127
+ // Should only be present when num is present.
128
+ // Specifies the units of num.
129
+ // Use arbitrary string (for example, "requests") as a custom count unit.
130
+ // If no unit is specified, consumer may apply heuristic to deduce the unit.
131
+ // Consumers may also interpret units like "bytes" and "kilobytes" as memory
132
+ // units and units like "seconds" and "nanoseconds" as time units,
133
+ // and apply appropriate unit conversions to these.
134
+ int64 num_unit = 4; // Index into string table
135
+ }
136
+
137
+ message Mapping {
138
+ // Unique nonzero id for the mapping.
139
+ uint64 id = 1;
140
+ // Address at which the binary (or DLL) is loaded into memory.
141
+ uint64 memory_start = 2;
142
+ // The limit of the address range occupied by this mapping.
143
+ uint64 memory_limit = 3;
144
+ // Offset in the binary that corresponds to the first mapped address.
145
+ uint64 file_offset = 4;
146
+ // The object this entry is loaded from. This can be a filename on
147
+ // disk for the main binary and shared libraries, or virtual
148
+ // abstractions like "[vdso]".
149
+ int64 filename = 5; // Index into string table
150
+ // A string that uniquely identifies a particular program version
151
+ // with high probability. E.g., for binaries generated by GNU tools,
152
+ // it could be the contents of the .note.gnu.build-id field.
153
+ int64 build_id = 6; // Index into string table
154
+
155
+ // The following fields indicate the resolution of symbolic info.
156
+ bool has_functions = 7;
157
+ bool has_filenames = 8;
158
+ bool has_line_numbers = 9;
159
+ bool has_inline_frames = 10;
160
+ }
161
+
162
+ // Describes function and line table debug information.
163
+ message Location {
164
+ // Unique nonzero id for the location. A profile could use
165
+ // instruction addresses or any integer sequence as ids.
166
+ uint64 id = 1;
167
+ // The id of the corresponding profile.Mapping for this location.
168
+ // It can be unset if the mapping is unknown or not applicable for
169
+ // this profile type.
170
+ uint64 mapping_id = 2;
171
+ // The instruction address for this location, if available. It
172
+ // should be within [Mapping.memory_start...Mapping.memory_limit]
173
+ // for the corresponding mapping. A non-leaf address may be in the
174
+ // middle of a call instruction. It is up to display tools to find
175
+ // the beginning of the instruction if necessary.
176
+ uint64 address = 3;
177
+ // Multiple line indicates this location has inlined functions,
178
+ // where the last entry represents the caller into which the
179
+ // preceding entries were inlined.
180
+ //
181
+ // E.g., if memcpy() is inlined into printf:
182
+ // line[0].function_name == "memcpy"
183
+ // line[1].function_name == "printf"
184
+ repeated Line line = 4;
185
+ // Provides an indication that multiple symbols map to this location's
186
+ // address, for example due to identical code folding by the linker. In that
187
+ // case the line information above represents one of the multiple
188
+ // symbols. This field must be recomputed when the symbolization state of the
189
+ // profile changes.
190
+ bool is_folded = 5;
191
+ }
192
+
193
+ message Line {
194
+ // The id of the corresponding profile.Function for this line.
195
+ uint64 function_id = 1;
196
+ // Line number in source code.
197
+ int64 line = 2;
198
+ }
199
+
200
+ message Function {
201
+ // Unique nonzero id for the function.
202
+ uint64 id = 1;
203
+ // Name of the function, in human-readable form if available.
204
+ int64 name = 2; // Index into string table
205
+ // Name of the function, as identified by the system.
206
+ // For instance, it can be a C++ mangled name.
207
+ int64 system_name = 3; // Index into string table
208
+ // Source file containing the function.
209
+ int64 filename = 4; // Index into string table
210
+ // Line number in source file.
211
+ int64 start_line = 5;
212
+ }
@@ -0,0 +1,81 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: lib/ddtrace/profiling/pprof/pprof.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "perftools.profiles.Profile" do
8
+ repeated :sample_type, :message, 1, "perftools.profiles.ValueType"
9
+ repeated :sample, :message, 2, "perftools.profiles.Sample"
10
+ repeated :mapping, :message, 3, "perftools.profiles.Mapping"
11
+ repeated :location, :message, 4, "perftools.profiles.Location"
12
+ repeated :function, :message, 5, "perftools.profiles.Function"
13
+ repeated :string_table, :string, 6
14
+ optional :drop_frames, :int64, 7
15
+ optional :keep_frames, :int64, 8
16
+ optional :time_nanos, :int64, 9
17
+ optional :duration_nanos, :int64, 10
18
+ optional :period_type, :message, 11, "perftools.profiles.ValueType"
19
+ optional :period, :int64, 12
20
+ repeated :comment, :int64, 13
21
+ optional :default_sample_type, :int64, 14
22
+ end
23
+ add_message "perftools.profiles.ValueType" do
24
+ optional :type, :int64, 1
25
+ optional :unit, :int64, 2
26
+ end
27
+ add_message "perftools.profiles.Sample" do
28
+ repeated :location_id, :uint64, 1
29
+ repeated :value, :int64, 2
30
+ repeated :label, :message, 3, "perftools.profiles.Label"
31
+ end
32
+ add_message "perftools.profiles.Label" do
33
+ optional :key, :int64, 1
34
+ optional :str, :int64, 2
35
+ optional :num, :int64, 3
36
+ optional :num_unit, :int64, 4
37
+ end
38
+ add_message "perftools.profiles.Mapping" do
39
+ optional :id, :uint64, 1
40
+ optional :memory_start, :uint64, 2
41
+ optional :memory_limit, :uint64, 3
42
+ optional :file_offset, :uint64, 4
43
+ optional :filename, :int64, 5
44
+ optional :build_id, :int64, 6
45
+ optional :has_functions, :bool, 7
46
+ optional :has_filenames, :bool, 8
47
+ optional :has_line_numbers, :bool, 9
48
+ optional :has_inline_frames, :bool, 10
49
+ end
50
+ add_message "perftools.profiles.Location" do
51
+ optional :id, :uint64, 1
52
+ optional :mapping_id, :uint64, 2
53
+ optional :address, :uint64, 3
54
+ repeated :line, :message, 4, "perftools.profiles.Line"
55
+ optional :is_folded, :bool, 5
56
+ end
57
+ add_message "perftools.profiles.Line" do
58
+ optional :function_id, :uint64, 1
59
+ optional :line, :int64, 2
60
+ end
61
+ add_message "perftools.profiles.Function" do
62
+ optional :id, :uint64, 1
63
+ optional :name, :int64, 2
64
+ optional :system_name, :int64, 3
65
+ optional :filename, :int64, 4
66
+ optional :start_line, :int64, 5
67
+ end
68
+ end
69
+
70
+ module Perftools
71
+ module Profiles
72
+ Profile = Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.Profile").msgclass
73
+ ValueType = Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.ValueType").msgclass
74
+ Sample = Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.Sample").msgclass
75
+ Label = Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.Label").msgclass
76
+ Mapping = Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.Mapping").msgclass
77
+ Location = Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.Location").msgclass
78
+ Line = Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.Line").msgclass
79
+ Function = Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.Function").msgclass
80
+ end
81
+ end
@@ -0,0 +1,106 @@
1
+ require 'ddtrace/ext/profiling'
2
+ require 'ddtrace/profiling/events/stack'
3
+ require 'ddtrace/profiling/pprof/builder'
4
+ require 'ddtrace/profiling/pprof/converter'
5
+
6
+ module Datadog
7
+ module Profiling
8
+ module Pprof
9
+ # Builds a profile from a StackSample
10
+ #
11
+ # NOTE: This class may appear stateless but is in fact stateful; a new instance should be created for every
12
+ # encoded profile.
13
+ class StackSample < Converter
14
+ SAMPLE_TYPES = {
15
+ cpu_time_ns: [
16
+ Datadog::Ext::Profiling::Pprof::VALUE_TYPE_CPU,
17
+ Datadog::Ext::Profiling::Pprof::VALUE_UNIT_NANOSECONDS
18
+ ],
19
+ wall_time_ns: [
20
+ Datadog::Ext::Profiling::Pprof::VALUE_TYPE_WALL,
21
+ Datadog::Ext::Profiling::Pprof::VALUE_UNIT_NANOSECONDS
22
+ ]
23
+ }.freeze
24
+
25
+ def self.sample_value_types
26
+ SAMPLE_TYPES
27
+ end
28
+
29
+ def initialize(*_)
30
+ super
31
+
32
+ @processed_unique_stacks = 0
33
+ @processed_with_trace_ids = 0
34
+ end
35
+
36
+ def add_events!(stack_samples)
37
+ new_samples = build_samples(stack_samples)
38
+ builder.samples.concat(new_samples)
39
+ end
40
+
41
+ def stack_sample_group_key(stack_sample)
42
+ stack_sample.hash
43
+ end
44
+
45
+ def build_samples(stack_samples)
46
+ groups = group_events(stack_samples, &method(:stack_sample_group_key))
47
+ groups.collect do |_group_key, group|
48
+ @processed_unique_stacks += 1
49
+ build_sample(group.sample, group.values)
50
+ end
51
+ end
52
+
53
+ def build_sample(stack_sample, values)
54
+ locations = builder.build_locations(
55
+ stack_sample.frames,
56
+ stack_sample.total_frame_count
57
+ )
58
+
59
+ Perftools::Profiles::Sample.new(
60
+ location_id: locations.collect { |location| location['id'.freeze] },
61
+ value: values,
62
+ label: build_sample_labels(stack_sample)
63
+ )
64
+ end
65
+
66
+ def build_sample_values(stack_sample)
67
+ no_value = Datadog::Ext::Profiling::Pprof::SAMPLE_VALUE_NO_VALUE
68
+ values = super(stack_sample)
69
+ values[sample_value_index(:cpu_time_ns)] = stack_sample.cpu_time_interval_ns || no_value
70
+ values[sample_value_index(:wall_time_ns)] = stack_sample.wall_time_interval_ns || no_value
71
+ values
72
+ end
73
+
74
+ def build_sample_labels(stack_sample)
75
+ labels = [
76
+ Perftools::Profiles::Label.new(
77
+ key: builder.string_table.fetch(Datadog::Ext::Profiling::Pprof::LABEL_KEY_THREAD_ID),
78
+ str: builder.string_table.fetch(stack_sample.thread_id.to_s)
79
+ )
80
+ ]
81
+
82
+ unless stack_sample.trace_id.nil? || stack_sample.trace_id.zero?
83
+ @processed_with_trace_ids += 1
84
+ labels << Perftools::Profiles::Label.new(
85
+ key: builder.string_table.fetch(Datadog::Ext::Profiling::Pprof::LABEL_KEY_TRACE_ID),
86
+ str: builder.string_table.fetch(stack_sample.trace_id.to_s)
87
+ )
88
+ end
89
+
90
+ unless stack_sample.span_id.nil? || stack_sample.span_id.zero?
91
+ labels << Perftools::Profiles::Label.new(
92
+ key: builder.string_table.fetch(Datadog::Ext::Profiling::Pprof::LABEL_KEY_SPAN_ID),
93
+ str: builder.string_table.fetch(stack_sample.span_id.to_s)
94
+ )
95
+ end
96
+
97
+ labels
98
+ end
99
+
100
+ def debug_statistics
101
+ "unique stacks: #{@processed_unique_stacks}, of which had active traces: #{@processed_with_trace_ids}"
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,10 @@
1
+ require 'ddtrace/utils/string_table'
2
+
3
+ module Datadog
4
+ module Profiling
5
+ module Pprof
6
+ # Tracks strings and returns IDs
7
+ class StringTable < Utils::StringTable; end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,118 @@
1
+ require 'ddtrace/profiling/pprof/payload'
2
+ require 'ddtrace/profiling/pprof/message_set'
3
+ require 'ddtrace/profiling/pprof/builder'
4
+
5
+ require 'ddtrace/profiling/events/stack'
6
+ require 'ddtrace/profiling/pprof/stack_sample'
7
+
8
+ module Datadog
9
+ module Profiling
10
+ module Pprof
11
+ # Converts a collection of profiling events into a Perftools::Profiles::Profile
12
+ class Template
13
+ DEFAULT_MAPPINGS = {
14
+ Events::StackSample => Pprof::StackSample
15
+ }.freeze
16
+
17
+ attr_reader \
18
+ :builder,
19
+ :converters,
20
+ :sample_type_mappings
21
+
22
+ def self.for_event_classes(event_classes)
23
+ # Build a map of event class --> converter class
24
+ mappings = event_classes.each_with_object({}) do |event_class, m|
25
+ converter_class = DEFAULT_MAPPINGS[event_class]
26
+ raise NoProfilingEventConversionError, event_class unless converter_class
27
+
28
+ m[event_class] = converter_class
29
+ end
30
+
31
+ new(mappings)
32
+ end
33
+
34
+ def initialize(mappings)
35
+ @builder = Builder.new
36
+ @converters = Hash.new { |_h, event_class| raise NoProfilingEventConversionError, event_class }
37
+ @sample_type_mappings = Hash.new { |_h, type| raise UnknownSampleTypeMappingError, type }
38
+
39
+ # Add default mapping
40
+ builder.mappings.fetch($PROGRAM_NAME, &builder.method(:build_mapping))
41
+
42
+ # Combine all sample types from each converter class
43
+ types = mappings.values.each_with_object({}) do |converter_class, t|
44
+ t.merge!(converter_class.sample_value_types)
45
+ end
46
+
47
+ # Build the sample types into sample type objects
48
+ types.each do |type_name, type_args|
49
+ index = nil
50
+
51
+ sample_type = builder.sample_types.fetch(*type_args) do |id, type, unit|
52
+ index = id
53
+ builder.build_value_type(type, unit)
54
+ end
55
+
56
+ # Create mapping between the type and index to which its assigned.
57
+ # Do this for faster lookup while building profile sample values.
58
+ sample_type_mappings[type_name] = index || builder.sample_types.messages.index(sample_type)
59
+ end
60
+
61
+ # Freeze them so they can't be modified.
62
+ # We don't want the number of sample types to vary between samples within the same profile.
63
+ builder.sample_types.freeze
64
+ sample_type_mappings.freeze
65
+
66
+ # Add converters
67
+ mappings.each do |event_class, converter_class|
68
+ converters[event_class] = converter_class.new(builder, sample_type_mappings)
69
+ end
70
+
71
+ converters.freeze
72
+ end
73
+
74
+ def add_events!(event_class, events)
75
+ converters[event_class].add_events!(events)
76
+ end
77
+
78
+ def debug_statistics
79
+ converters.values.map(&:debug_statistics).join(', ')
80
+ end
81
+
82
+ def to_pprof
83
+ profile = builder.build_profile
84
+ data = builder.encode_profile(profile)
85
+ types = sample_type_mappings.keys
86
+
87
+ Payload.new(data, types)
88
+ end
89
+
90
+ # Error when an unknown event type is given to be converted
91
+ class NoProfilingEventConversionError < ArgumentError
92
+ attr_reader :type
93
+
94
+ def initialize(type)
95
+ @type = type
96
+ end
97
+
98
+ def message
99
+ "Profiling event type '#{type}' cannot be converted to pprof."
100
+ end
101
+ end
102
+
103
+ # Error when the mapping of a sample type to value index is unknown
104
+ class UnknownSampleTypeMappingError < ArgumentError
105
+ attr_reader :type
106
+
107
+ def initialize(type)
108
+ @type = type
109
+ end
110
+
111
+ def message
112
+ "Mapping for sample value type '#{type}' is unknown."
113
+ end
114
+ end
115
+ end
116
+ end
117
+ end
118
+ end