ddtrace 0.49.0 → 0.50.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (377) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +49 -73
  3. data/.circleci/images/primary/{Dockerfile-truffleruby-21.0.0 → Dockerfile-truffleruby-21.1.0} +1 -1
  4. data/.gitignore +0 -2
  5. data/.rubocop.yml +0 -8
  6. data/.rubocop_todo.yml +7 -7
  7. data/Appraisals +1 -107
  8. data/CHANGELOG.md +47 -0
  9. data/Rakefile +278 -333
  10. data/benchmarks/data/profiler-submission-marshal.gz +0 -0
  11. data/benchmarks/profiler_submission.rb +93 -0
  12. data/ddtrace.gemspec +1 -1
  13. data/docker-compose.yml +4 -34
  14. data/docs/GettingStarted.md +24 -9
  15. data/gemfiles/jruby_9.2.0.0_contrib.gemfile.lock +1 -1
  16. data/gemfiles/jruby_9.2.0.0_contrib_old.gemfile.lock +1 -1
  17. data/gemfiles/jruby_9.2.0.0_core_old.gemfile.lock +1 -1
  18. data/gemfiles/jruby_9.2.0.0_cucumber3.gemfile.lock +1 -1
  19. data/gemfiles/jruby_9.2.0.0_cucumber4.gemfile.lock +1 -1
  20. data/gemfiles/jruby_9.2.0.0_cucumber5.gemfile.lock +1 -1
  21. data/gemfiles/jruby_9.2.0.0_rails5_mysql2.gemfile.lock +1 -1
  22. data/gemfiles/jruby_9.2.0.0_rails5_postgres.gemfile.lock +1 -1
  23. data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis.gemfile.lock +1 -1
  24. data/gemfiles/jruby_9.2.0.0_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
  25. data/gemfiles/jruby_9.2.0.0_rails5_postgres_sidekiq.gemfile.lock +1 -1
  26. data/gemfiles/jruby_9.2.0.0_rails61_mysql2.gemfile.lock +1 -1
  27. data/gemfiles/jruby_9.2.0.0_rails61_postgres.gemfile.lock +1 -1
  28. data/gemfiles/jruby_9.2.0.0_rails61_postgres_redis.gemfile.lock +1 -1
  29. data/gemfiles/jruby_9.2.0.0_rails61_postgres_sidekiq.gemfile.lock +1 -1
  30. data/gemfiles/jruby_9.2.0.0_rails6_mysql2.gemfile.lock +1 -1
  31. data/gemfiles/jruby_9.2.0.0_rails6_postgres.gemfile.lock +1 -1
  32. data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis.gemfile.lock +1 -1
  33. data/gemfiles/jruby_9.2.0.0_rails6_postgres_redis_activesupport.gemfile.lock +1 -1
  34. data/gemfiles/jruby_9.2.0.0_rails6_postgres_sidekiq.gemfile.lock +1 -1
  35. data/gemfiles/jruby_9.2.0.0_resque2_redis3.gemfile.lock +1 -1
  36. data/gemfiles/jruby_9.2.0.0_resque2_redis4.gemfile.lock +1 -1
  37. data/gemfiles/jruby_9.2.11.1_contrib.gemfile.lock +1 -1
  38. data/gemfiles/jruby_9.2.11.1_contrib_old.gemfile.lock +1 -1
  39. data/gemfiles/jruby_9.2.11.1_core_old.gemfile.lock +1 -1
  40. data/gemfiles/jruby_9.2.11.1_cucumber3.gemfile.lock +1 -1
  41. data/gemfiles/jruby_9.2.11.1_cucumber4.gemfile.lock +1 -1
  42. data/gemfiles/jruby_9.2.11.1_cucumber5.gemfile.lock +1 -1
  43. data/gemfiles/jruby_9.2.11.1_rails5_mysql2.gemfile.lock +1 -1
  44. data/gemfiles/jruby_9.2.11.1_rails5_postgres.gemfile.lock +1 -1
  45. data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis.gemfile.lock +1 -1
  46. data/gemfiles/jruby_9.2.11.1_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
  47. data/gemfiles/jruby_9.2.11.1_rails5_postgres_sidekiq.gemfile.lock +1 -1
  48. data/gemfiles/jruby_9.2.11.1_rails61_mysql2.gemfile.lock +1 -1
  49. data/gemfiles/jruby_9.2.11.1_rails61_postgres.gemfile.lock +1 -1
  50. data/gemfiles/jruby_9.2.11.1_rails61_postgres_redis.gemfile.lock +1 -1
  51. data/gemfiles/jruby_9.2.11.1_rails61_postgres_sidekiq.gemfile.lock +1 -1
  52. data/gemfiles/jruby_9.2.11.1_rails6_mysql2.gemfile.lock +1 -1
  53. data/gemfiles/jruby_9.2.11.1_rails6_postgres.gemfile.lock +1 -1
  54. data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis.gemfile.lock +1 -1
  55. data/gemfiles/jruby_9.2.11.1_rails6_postgres_redis_activesupport.gemfile.lock +1 -1
  56. data/gemfiles/jruby_9.2.11.1_rails6_postgres_sidekiq.gemfile.lock +1 -1
  57. data/gemfiles/jruby_9.2.11.1_resque2_redis3.gemfile.lock +1 -1
  58. data/gemfiles/jruby_9.2.11.1_resque2_redis4.gemfile.lock +1 -1
  59. data/gemfiles/ruby_2.1.10_contrib_old.gemfile.lock +1 -1
  60. data/gemfiles/ruby_2.1.10_core_old.gemfile.lock +1 -1
  61. data/gemfiles/ruby_2.1.10_rails30_postgres.gemfile.lock +1 -1
  62. data/gemfiles/ruby_2.1.10_rails30_postgres_sidekiq.gemfile.lock +1 -1
  63. data/gemfiles/ruby_2.1.10_rails32_mysql2.gemfile.lock +1 -1
  64. data/gemfiles/ruby_2.1.10_rails32_postgres.gemfile.lock +1 -1
  65. data/gemfiles/ruby_2.1.10_rails32_postgres_redis.gemfile.lock +1 -1
  66. data/gemfiles/ruby_2.1.10_rails32_postgres_sidekiq.gemfile.lock +1 -1
  67. data/gemfiles/ruby_2.1.10_rails4_mysql2.gemfile.lock +1 -1
  68. data/gemfiles/ruby_2.1.10_rails4_postgres.gemfile.lock +1 -1
  69. data/gemfiles/ruby_2.1.10_rails4_postgres_redis.gemfile.lock +1 -1
  70. data/gemfiles/ruby_2.2.10_contrib.gemfile.lock +1 -1
  71. data/gemfiles/ruby_2.2.10_core_old.gemfile.lock +1 -1
  72. data/gemfiles/ruby_2.2.10_rails30_postgres.gemfile.lock +1 -1
  73. data/gemfiles/ruby_2.2.10_rails30_postgres_sidekiq.gemfile.lock +1 -1
  74. data/gemfiles/ruby_2.2.10_rails32_mysql2.gemfile.lock +1 -1
  75. data/gemfiles/ruby_2.2.10_rails32_postgres.gemfile.lock +1 -1
  76. data/gemfiles/ruby_2.2.10_rails32_postgres_redis.gemfile.lock +1 -1
  77. data/gemfiles/ruby_2.2.10_rails32_postgres_sidekiq.gemfile.lock +1 -1
  78. data/gemfiles/ruby_2.2.10_rails4_mysql2.gemfile.lock +1 -1
  79. data/gemfiles/ruby_2.2.10_rails4_postgres.gemfile.lock +1 -1
  80. data/gemfiles/ruby_2.2.10_rails4_postgres_redis.gemfile.lock +1 -1
  81. data/gemfiles/ruby_2.2.10_rails4_postgres_sidekiq.gemfile.lock +1 -1
  82. data/gemfiles/ruby_2.2.10_rails5_mysql2.gemfile.lock +1 -1
  83. data/gemfiles/ruby_2.2.10_rails5_postgres.gemfile.lock +1 -1
  84. data/gemfiles/ruby_2.2.10_rails5_postgres_redis.gemfile.lock +1 -1
  85. data/gemfiles/ruby_2.2.10_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
  86. data/gemfiles/ruby_2.2.10_rails5_postgres_sidekiq.gemfile.lock +1 -1
  87. data/gemfiles/ruby_2.3.8_contrib.gemfile.lock +1 -1
  88. data/gemfiles/ruby_2.3.8_contrib_old.gemfile.lock +1 -1
  89. data/gemfiles/ruby_2.3.8_core_old.gemfile.lock +1 -1
  90. data/gemfiles/ruby_2.3.8_cucumber3.gemfile.lock +1 -1
  91. data/gemfiles/ruby_2.3.8_cucumber4.gemfile.lock +1 -1
  92. data/gemfiles/ruby_2.3.8_rails30_postgres.gemfile.lock +1 -1
  93. data/gemfiles/ruby_2.3.8_rails30_postgres_sidekiq.gemfile.lock +1 -1
  94. data/gemfiles/ruby_2.3.8_rails32_mysql2.gemfile.lock +1 -1
  95. data/gemfiles/ruby_2.3.8_rails32_postgres.gemfile.lock +1 -1
  96. data/gemfiles/ruby_2.3.8_rails32_postgres_redis.gemfile.lock +1 -1
  97. data/gemfiles/ruby_2.3.8_rails32_postgres_sidekiq.gemfile.lock +1 -1
  98. data/gemfiles/ruby_2.3.8_rails4_mysql2.gemfile.lock +1 -1
  99. data/gemfiles/ruby_2.3.8_rails4_postgres.gemfile.lock +1 -1
  100. data/gemfiles/ruby_2.3.8_rails4_postgres_redis.gemfile.lock +1 -1
  101. data/gemfiles/ruby_2.3.8_rails4_postgres_sidekiq.gemfile.lock +1 -1
  102. data/gemfiles/ruby_2.3.8_rails5_mysql2.gemfile.lock +1 -1
  103. data/gemfiles/ruby_2.3.8_rails5_postgres.gemfile.lock +1 -1
  104. data/gemfiles/ruby_2.3.8_rails5_postgres_redis.gemfile.lock +1 -1
  105. data/gemfiles/ruby_2.3.8_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
  106. data/gemfiles/ruby_2.3.8_rails5_postgres_sidekiq.gemfile.lock +1 -1
  107. data/gemfiles/ruby_2.3.8_resque2_redis3.gemfile.lock +1 -1
  108. data/gemfiles/ruby_2.3.8_resque2_redis4.gemfile.lock +1 -1
  109. data/gemfiles/ruby_2.4.6_contrib.gemfile.lock +1 -1
  110. data/gemfiles/ruby_2.4.6_contrib_old.gemfile.lock +1 -1
  111. data/gemfiles/ruby_2.4.6_core_old.gemfile.lock +1 -1
  112. data/gemfiles/ruby_2.4.6_cucumber3.gemfile.lock +1 -1
  113. data/gemfiles/ruby_2.4.6_cucumber4.gemfile.lock +1 -1
  114. data/gemfiles/ruby_2.4.6_rails5_mysql2.gemfile.lock +1 -1
  115. data/gemfiles/ruby_2.4.6_rails5_postgres.gemfile.lock +1 -1
  116. data/gemfiles/ruby_2.4.6_rails5_postgres_redis.gemfile.lock +1 -1
  117. data/gemfiles/ruby_2.4.6_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
  118. data/gemfiles/ruby_2.4.6_rails5_postgres_sidekiq.gemfile.lock +1 -1
  119. data/gemfiles/ruby_2.4.6_resque2_redis3.gemfile.lock +1 -1
  120. data/gemfiles/ruby_2.4.6_resque2_redis4.gemfile.lock +1 -1
  121. data/gemfiles/ruby_2.5.6_contrib.gemfile.lock +1 -1
  122. data/gemfiles/ruby_2.5.6_contrib_old.gemfile.lock +1 -1
  123. data/gemfiles/ruby_2.5.6_core_old.gemfile.lock +1 -1
  124. data/gemfiles/ruby_2.5.6_cucumber3.gemfile.lock +1 -1
  125. data/gemfiles/ruby_2.5.6_cucumber4.gemfile.lock +1 -1
  126. data/gemfiles/ruby_2.5.6_cucumber5.gemfile.lock +1 -1
  127. data/gemfiles/ruby_2.5.6_rails5_mysql2.gemfile.lock +1 -1
  128. data/gemfiles/ruby_2.5.6_rails5_postgres.gemfile.lock +1 -1
  129. data/gemfiles/ruby_2.5.6_rails5_postgres_redis.gemfile.lock +1 -1
  130. data/gemfiles/ruby_2.5.6_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
  131. data/gemfiles/ruby_2.5.6_rails5_postgres_sidekiq.gemfile.lock +1 -1
  132. data/gemfiles/ruby_2.5.6_rails61_mysql2.gemfile.lock +1 -1
  133. data/gemfiles/ruby_2.5.6_rails61_postgres.gemfile.lock +1 -1
  134. data/gemfiles/ruby_2.5.6_rails61_postgres_redis.gemfile.lock +1 -1
  135. data/gemfiles/ruby_2.5.6_rails61_postgres_sidekiq.gemfile.lock +1 -1
  136. data/gemfiles/ruby_2.5.6_rails6_mysql2.gemfile.lock +1 -1
  137. data/gemfiles/ruby_2.5.6_rails6_postgres.gemfile.lock +1 -1
  138. data/gemfiles/ruby_2.5.6_rails6_postgres_redis.gemfile.lock +1 -1
  139. data/gemfiles/ruby_2.5.6_rails6_postgres_redis_activesupport.gemfile.lock +1 -1
  140. data/gemfiles/ruby_2.5.6_rails6_postgres_sidekiq.gemfile.lock +1 -1
  141. data/gemfiles/ruby_2.5.6_resque2_redis3.gemfile.lock +1 -1
  142. data/gemfiles/ruby_2.5.6_resque2_redis4.gemfile.lock +1 -1
  143. data/gemfiles/ruby_2.6.4_contrib.gemfile.lock +1 -1
  144. data/gemfiles/ruby_2.6.4_contrib_old.gemfile.lock +1 -1
  145. data/gemfiles/ruby_2.6.4_core_old.gemfile.lock +1 -1
  146. data/gemfiles/ruby_2.6.4_cucumber3.gemfile.lock +1 -1
  147. data/gemfiles/ruby_2.6.4_cucumber4.gemfile.lock +1 -1
  148. data/gemfiles/ruby_2.6.4_cucumber5.gemfile.lock +1 -1
  149. data/gemfiles/ruby_2.6.4_rails5_mysql2.gemfile.lock +1 -1
  150. data/gemfiles/ruby_2.6.4_rails5_postgres.gemfile.lock +1 -1
  151. data/gemfiles/ruby_2.6.4_rails5_postgres_redis.gemfile.lock +1 -1
  152. data/gemfiles/ruby_2.6.4_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
  153. data/gemfiles/ruby_2.6.4_rails5_postgres_sidekiq.gemfile.lock +1 -1
  154. data/gemfiles/ruby_2.6.4_rails61_mysql2.gemfile.lock +1 -1
  155. data/gemfiles/ruby_2.6.4_rails61_postgres.gemfile.lock +1 -1
  156. data/gemfiles/ruby_2.6.4_rails61_postgres_redis.gemfile.lock +1 -1
  157. data/gemfiles/ruby_2.6.4_rails61_postgres_sidekiq.gemfile.lock +1 -1
  158. data/gemfiles/ruby_2.6.4_rails6_mysql2.gemfile.lock +1 -1
  159. data/gemfiles/ruby_2.6.4_rails6_postgres.gemfile.lock +1 -1
  160. data/gemfiles/ruby_2.6.4_rails6_postgres_redis.gemfile.lock +1 -1
  161. data/gemfiles/ruby_2.6.4_rails6_postgres_redis_activesupport.gemfile.lock +1 -1
  162. data/gemfiles/ruby_2.6.4_rails6_postgres_sidekiq.gemfile.lock +1 -1
  163. data/gemfiles/ruby_2.6.4_resque2_redis3.gemfile.lock +1 -1
  164. data/gemfiles/ruby_2.6.4_resque2_redis4.gemfile.lock +1 -1
  165. data/gemfiles/ruby_2.7.0_contrib.gemfile.lock +1 -1
  166. data/gemfiles/ruby_2.7.0_contrib_old.gemfile.lock +1 -1
  167. data/gemfiles/ruby_2.7.0_core_old.gemfile.lock +1 -1
  168. data/gemfiles/ruby_2.7.0_cucumber3.gemfile.lock +1 -1
  169. data/gemfiles/ruby_2.7.0_cucumber4.gemfile.lock +1 -1
  170. data/gemfiles/ruby_2.7.0_cucumber5.gemfile.lock +1 -1
  171. data/gemfiles/ruby_2.7.0_rails5_mysql2.gemfile.lock +1 -1
  172. data/gemfiles/ruby_2.7.0_rails5_postgres.gemfile.lock +1 -1
  173. data/gemfiles/ruby_2.7.0_rails5_postgres_redis.gemfile.lock +1 -1
  174. data/gemfiles/ruby_2.7.0_rails5_postgres_redis_activesupport.gemfile.lock +1 -1
  175. data/gemfiles/ruby_2.7.0_rails5_postgres_sidekiq.gemfile.lock +1 -1
  176. data/gemfiles/ruby_2.7.0_rails61_mysql2.gemfile.lock +1 -1
  177. data/gemfiles/ruby_2.7.0_rails61_postgres.gemfile.lock +1 -1
  178. data/gemfiles/ruby_2.7.0_rails61_postgres_redis.gemfile.lock +1 -1
  179. data/gemfiles/ruby_2.7.0_rails61_postgres_sidekiq.gemfile.lock +1 -1
  180. data/gemfiles/ruby_2.7.0_rails6_mysql2.gemfile.lock +1 -1
  181. data/gemfiles/ruby_2.7.0_rails6_postgres.gemfile.lock +1 -1
  182. data/gemfiles/ruby_2.7.0_rails6_postgres_redis.gemfile.lock +1 -1
  183. data/gemfiles/ruby_2.7.0_rails6_postgres_redis_activesupport.gemfile.lock +1 -1
  184. data/gemfiles/ruby_2.7.0_rails6_postgres_sidekiq.gemfile.lock +1 -1
  185. data/gemfiles/ruby_2.7.0_resque2_redis3.gemfile.lock +1 -1
  186. data/gemfiles/ruby_2.7.0_resque2_redis4.gemfile.lock +1 -1
  187. data/gemfiles/ruby_3.0.0_contrib.gemfile +1 -0
  188. data/gemfiles/ruby_3.0.0_contrib.gemfile.lock +7 -1
  189. data/gemfiles/ruby_3.0.0_core_old.gemfile.lock +1 -1
  190. data/gemfiles/ruby_3.0.0_cucumber3.gemfile.lock +1 -1
  191. data/gemfiles/ruby_3.0.0_cucumber4.gemfile.lock +1 -1
  192. data/gemfiles/ruby_3.0.0_cucumber5.gemfile.lock +1 -1
  193. data/gemfiles/ruby_3.0.0_rails61_mysql2.gemfile.lock +1 -1
  194. data/gemfiles/ruby_3.0.0_rails61_postgres.gemfile.lock +1 -1
  195. data/gemfiles/ruby_3.0.0_rails61_postgres_redis.gemfile.lock +1 -1
  196. data/gemfiles/ruby_3.0.0_rails61_postgres_sidekiq.gemfile.lock +1 -1
  197. data/gemfiles/ruby_3.0.0_resque2_redis3.gemfile.lock +1 -1
  198. data/gemfiles/ruby_3.0.0_resque2_redis4.gemfile.lock +1 -1
  199. data/integration/apps/rack/README.md +2 -2
  200. data/integration/apps/rack/script/ci +2 -1
  201. data/integration/apps/rails-five/README.md +2 -2
  202. data/integration/apps/rails-five/script/ci +2 -1
  203. data/integration/apps/rspec/.dockerignore +1 -0
  204. data/integration/apps/rspec/.envrc.sample +1 -0
  205. data/integration/apps/rspec/.gitignore +2 -0
  206. data/integration/apps/rspec/.rspec +1 -0
  207. data/integration/apps/rspec/Dockerfile +25 -0
  208. data/integration/apps/rspec/Dockerfile-ci +11 -0
  209. data/integration/apps/rspec/Gemfile +14 -0
  210. data/integration/apps/rspec/README.md +70 -0
  211. data/integration/apps/rspec/agent.yaml +3 -0
  212. data/integration/apps/rspec/app/datadog.rb +13 -0
  213. data/integration/apps/rspec/app/fibonacci.rb +30 -0
  214. data/integration/apps/rspec/bin/run +20 -0
  215. data/integration/apps/rspec/bin/setup +17 -0
  216. data/integration/apps/rspec/bin/test +21 -0
  217. data/integration/apps/rspec/docker-compose.ci.yml +51 -0
  218. data/integration/apps/rspec/docker-compose.yml +63 -0
  219. data/integration/apps/rspec/script/build-images +37 -0
  220. data/integration/apps/rspec/script/ci +53 -0
  221. data/integration/apps/rspec/spec/fibonacci_spec.rb +16 -0
  222. data/integration/apps/rspec/spec/rspec_spec.rb +58 -0
  223. data/integration/apps/rspec/spec/spec_helper.rb +24 -0
  224. data/integration/apps/ruby/README.md +2 -2
  225. data/integration/apps/ruby/script/ci +2 -1
  226. data/lib/datadog/ci.rb +16 -0
  227. data/lib/datadog/ci/configuration/components.rb +30 -0
  228. data/lib/datadog/ci/configuration/settings.rb +36 -0
  229. data/lib/datadog/ci/context_flush.rb +28 -0
  230. data/lib/datadog/ci/contrib/cucumber/configuration/settings.rb +30 -0
  231. data/lib/datadog/ci/contrib/cucumber/ext.rb +19 -0
  232. data/lib/datadog/ci/contrib/cucumber/formatter.rb +97 -0
  233. data/lib/datadog/ci/contrib/cucumber/instrumentation.rb +26 -0
  234. data/lib/datadog/ci/contrib/cucumber/integration.rb +47 -0
  235. data/lib/datadog/ci/contrib/cucumber/patcher.rb +25 -0
  236. data/lib/datadog/ci/contrib/rspec/configuration/settings.rb +30 -0
  237. data/lib/datadog/ci/contrib/rspec/example.rb +73 -0
  238. data/lib/datadog/ci/contrib/rspec/ext.rb +18 -0
  239. data/lib/datadog/ci/contrib/rspec/integration.rb +48 -0
  240. data/lib/datadog/ci/contrib/rspec/patcher.rb +25 -0
  241. data/lib/datadog/ci/ext/app_types.rb +9 -0
  242. data/lib/datadog/ci/ext/environment.rb +303 -0
  243. data/lib/datadog/ci/ext/settings.rb +10 -0
  244. data/lib/datadog/ci/ext/test.rb +28 -0
  245. data/lib/datadog/ci/extensions.rb +17 -0
  246. data/lib/datadog/ci/test.rb +63 -0
  247. data/lib/ddtrace.rb +0 -2
  248. data/lib/ddtrace/configuration.rb +1 -23
  249. data/lib/ddtrace/configuration/agent_settings_resolver.rb +8 -19
  250. data/lib/ddtrace/configuration/base.rb +6 -9
  251. data/lib/ddtrace/configuration/components.rb +33 -10
  252. data/lib/ddtrace/configuration/options.rb +2 -2
  253. data/lib/ddtrace/configuration/settings.rb +49 -1
  254. data/lib/ddtrace/context.rb +17 -14
  255. data/lib/ddtrace/context_flush.rb +14 -2
  256. data/lib/ddtrace/contrib/action_cable/event.rb +4 -4
  257. data/lib/ddtrace/contrib/action_pack/action_controller/patcher.rb +1 -1
  258. data/lib/ddtrace/contrib/action_view/event.rb +2 -2
  259. data/lib/ddtrace/contrib/action_view/patcher.rb +4 -4
  260. data/lib/ddtrace/contrib/active_model_serializers/event.rb +2 -2
  261. data/lib/ddtrace/contrib/active_record/event.rb +2 -2
  262. data/lib/ddtrace/contrib/active_support/cache/patcher.rb +7 -7
  263. data/lib/ddtrace/contrib/active_support/cache/redis.rb +1 -5
  264. data/lib/ddtrace/contrib/active_support/notifications/event.rb +2 -2
  265. data/lib/ddtrace/contrib/active_support/notifications/subscriber.rb +1 -1
  266. data/lib/ddtrace/contrib/auto_instrument.rb +1 -1
  267. data/lib/ddtrace/contrib/aws/instrumentation.rb +29 -0
  268. data/lib/ddtrace/contrib/aws/patcher.rb +4 -0
  269. data/lib/ddtrace/contrib/concurrent_ruby/patcher.rb +1 -1
  270. data/lib/ddtrace/contrib/configurable.rb +1 -1
  271. data/lib/ddtrace/contrib/dalli/instrumentation.rb +1 -1
  272. data/lib/ddtrace/contrib/dalli/patcher.rb +1 -1
  273. data/lib/ddtrace/contrib/ethon/easy_patch.rb +1 -1
  274. data/lib/ddtrace/contrib/ethon/multi_patch.rb +1 -1
  275. data/lib/ddtrace/contrib/ethon/patcher.rb +2 -2
  276. data/lib/ddtrace/contrib/extensions.rb +3 -3
  277. data/lib/ddtrace/contrib/faraday/patcher.rb +2 -2
  278. data/lib/ddtrace/contrib/grape/instrumentation.rb +2 -2
  279. data/lib/ddtrace/contrib/grape/patcher.rb +1 -1
  280. data/lib/ddtrace/contrib/grpc/patcher.rb +1 -1
  281. data/lib/ddtrace/contrib/http/instrumentation.rb +1 -1
  282. data/lib/ddtrace/contrib/http/patcher.rb +1 -1
  283. data/lib/ddtrace/contrib/httpclient/instrumentation.rb +1 -1
  284. data/lib/ddtrace/contrib/httpclient/patcher.rb +1 -1
  285. data/lib/ddtrace/contrib/httprb/instrumentation.rb +1 -1
  286. data/lib/ddtrace/contrib/httprb/patcher.rb +1 -1
  287. data/lib/ddtrace/contrib/integration.rb +3 -3
  288. data/lib/ddtrace/contrib/kafka/event.rb +2 -2
  289. data/lib/ddtrace/contrib/mongodb/instrumentation.rb +2 -2
  290. data/lib/ddtrace/contrib/mongodb/patcher.rb +2 -2
  291. data/lib/ddtrace/contrib/mysql2/instrumentation.rb +1 -1
  292. data/lib/ddtrace/contrib/mysql2/patcher.rb +1 -1
  293. data/lib/ddtrace/contrib/patchable.rb +2 -2
  294. data/lib/ddtrace/contrib/patcher.rb +2 -2
  295. data/lib/ddtrace/contrib/presto/instrumentation.rb +1 -1
  296. data/lib/ddtrace/contrib/presto/patcher.rb +1 -1
  297. data/lib/ddtrace/contrib/qless/patcher.rb +3 -5
  298. data/lib/ddtrace/contrib/racecar/event.rb +2 -2
  299. data/lib/ddtrace/contrib/rake/instrumentation.rb +1 -1
  300. data/lib/ddtrace/contrib/rake/patcher.rb +1 -1
  301. data/lib/ddtrace/contrib/registerable.rb +2 -2
  302. data/lib/ddtrace/contrib/resque/patcher.rb +1 -1
  303. data/lib/ddtrace/contrib/rest_client/patcher.rb +1 -1
  304. data/lib/ddtrace/contrib/rest_client/request_patch.rb +1 -1
  305. data/lib/ddtrace/contrib/sequel/database.rb +1 -1
  306. data/lib/ddtrace/contrib/sequel/dataset.rb +1 -1
  307. data/lib/ddtrace/contrib/sequel/patcher.rb +2 -2
  308. data/lib/ddtrace/contrib/sinatra/patcher.rb +1 -1
  309. data/lib/ddtrace/contrib/sucker_punch/exception_handler.rb +4 -6
  310. data/lib/ddtrace/diagnostics/environment_logger.rb +2 -2
  311. data/lib/ddtrace/error.rb +52 -61
  312. data/lib/ddtrace/ext/app_types.rb +0 -1
  313. data/lib/ddtrace/ext/test.rb +2 -18
  314. data/lib/ddtrace/metrics.rb +28 -3
  315. data/lib/ddtrace/opentelemetry/extensions.rb +1 -1
  316. data/lib/ddtrace/opentracer.rb +20 -39
  317. data/lib/ddtrace/patcher.rb +2 -2
  318. data/lib/ddtrace/profiling.rb +11 -9
  319. data/lib/ddtrace/profiling/collectors/stack.rb +5 -2
  320. data/lib/ddtrace/profiling/encoding/profile.rb +6 -0
  321. data/lib/ddtrace/profiling/ext/cpu.rb +2 -2
  322. data/lib/ddtrace/profiling/ext/cthread.rb +9 -11
  323. data/lib/ddtrace/profiling/ext/forking.rb +7 -7
  324. data/lib/ddtrace/profiling/flush.rb +3 -1
  325. data/lib/ddtrace/profiling/pprof/builder.rb +26 -28
  326. data/lib/ddtrace/profiling/pprof/converter.rb +4 -0
  327. data/lib/ddtrace/profiling/pprof/stack_sample.rb +17 -1
  328. data/lib/ddtrace/profiling/pprof/template.rb +4 -0
  329. data/lib/ddtrace/profiling/scheduler.rb +12 -1
  330. data/lib/ddtrace/profiling/tasks/setup.rb +13 -13
  331. data/lib/ddtrace/profiling/transport/http/api/endpoint.rb +11 -2
  332. data/lib/ddtrace/runtime/metrics.rb +3 -5
  333. data/lib/ddtrace/sync_writer.rb +2 -1
  334. data/lib/ddtrace/tracer.rb +8 -4
  335. data/lib/ddtrace/transport/http/statistics.rb +2 -2
  336. data/lib/ddtrace/transport/http/traces.rb +3 -3
  337. data/lib/ddtrace/transport/io/traces.rb +1 -1
  338. data/lib/ddtrace/utils/forking.rb +1 -1
  339. data/lib/ddtrace/utils/object_set.rb +3 -5
  340. data/lib/ddtrace/utils/time.rb +1 -3
  341. data/lib/ddtrace/version.rb +2 -4
  342. data/lib/ddtrace/workers.rb +1 -1
  343. data/lib/ddtrace/workers/async.rb +3 -2
  344. data/lib/ddtrace/workers/loop.rb +1 -1
  345. data/lib/ddtrace/workers/polling.rb +11 -5
  346. data/lib/ddtrace/workers/queue.rb +1 -1
  347. metadata +48 -34
  348. data/.circleci/images/primary/Dockerfile-2.0.0 +0 -83
  349. data/gemfiles/ruby_2.0.0_contrib_old.gemfile +0 -64
  350. data/gemfiles/ruby_2.0.0_contrib_old.gemfile.lock +0 -290
  351. data/gemfiles/ruby_2.0.0_core_old.gemfile +0 -33
  352. data/gemfiles/ruby_2.0.0_core_old.gemfile.lock +0 -118
  353. data/gemfiles/ruby_2.0.0_rails30_postgres.gemfile +0 -39
  354. data/gemfiles/ruby_2.0.0_rails30_postgres.gemfile.lock +0 -196
  355. data/gemfiles/ruby_2.0.0_rails30_postgres_sidekiq.gemfile +0 -40
  356. data/gemfiles/ruby_2.0.0_rails30_postgres_sidekiq.gemfile.lock +0 -205
  357. data/gemfiles/ruby_2.0.0_rails32_mysql2.gemfile +0 -43
  358. data/gemfiles/ruby_2.0.0_rails32_mysql2.gemfile.lock +0 -217
  359. data/gemfiles/ruby_2.0.0_rails32_postgres.gemfile +0 -39
  360. data/gemfiles/ruby_2.0.0_rails32_postgres.gemfile.lock +0 -204
  361. data/gemfiles/ruby_2.0.0_rails32_postgres_redis.gemfile +0 -41
  362. data/gemfiles/ruby_2.0.0_rails32_postgres_redis.gemfile.lock +0 -223
  363. data/gemfiles/ruby_2.0.0_rails32_postgres_sidekiq.gemfile +0 -40
  364. data/gemfiles/ruby_2.0.0_rails32_postgres_sidekiq.gemfile.lock +0 -213
  365. data/integration/images/ruby/2.0/Dockerfile +0 -54
  366. data/lib/ddtrace/contrib/cucumber/configuration/settings.rb +0 -28
  367. data/lib/ddtrace/contrib/cucumber/ext.rb +0 -17
  368. data/lib/ddtrace/contrib/cucumber/formatter.rb +0 -98
  369. data/lib/ddtrace/contrib/cucumber/instrumentation.rb +0 -24
  370. data/lib/ddtrace/contrib/cucumber/integration.rb +0 -45
  371. data/lib/ddtrace/contrib/cucumber/patcher.rb +0 -23
  372. data/lib/ddtrace/contrib/rspec/configuration/settings.rb +0 -28
  373. data/lib/ddtrace/contrib/rspec/example.rb +0 -75
  374. data/lib/ddtrace/contrib/rspec/ext.rb +0 -16
  375. data/lib/ddtrace/contrib/rspec/integration.rb +0 -46
  376. data/lib/ddtrace/contrib/rspec/patcher.rb +0 -23
  377. data/lib/ddtrace/ext/ci.rb +0 -297
@@ -1,23 +0,0 @@
1
- require 'ddtrace/contrib/patcher'
2
- require 'ddtrace/contrib/rspec/example'
3
-
4
- module Datadog
5
- module Contrib
6
- module RSpec
7
- # Patcher enables patching of 'rspec' module.
8
- module Patcher
9
- include Contrib::Patcher
10
-
11
- module_function
12
-
13
- def target_version
14
- Integration.version
15
- end
16
-
17
- def patch
18
- ::RSpec::Core::Example.send(:include, Example)
19
- end
20
- end
21
- end
22
- end
23
- end
@@ -1,297 +0,0 @@
1
- require 'ddtrace/ext/git'
2
-
3
- module Datadog
4
- module Ext
5
- # Defines constants for CI tags
6
- # rubocop:disable Metrics/ModuleLength:
7
- module CI
8
- TAG_STAGE_NAME = 'ci.stage.name'.freeze
9
- TAG_JOB_NAME = 'ci.job.name'.freeze
10
- TAG_JOB_URL = 'ci.job.url'.freeze
11
- TAG_PIPELINE_ID = 'ci.pipeline.id'.freeze
12
- TAG_PIPELINE_NAME = 'ci.pipeline.name'.freeze
13
- TAG_PIPELINE_NUMBER = 'ci.pipeline.number'.freeze
14
- TAG_PIPELINE_URL = 'ci.pipeline.url'.freeze
15
- TAG_PROVIDER_NAME = 'ci.provider.name'.freeze
16
- TAG_WORKSPACE_PATH = 'ci.workspace_path'.freeze
17
-
18
- PROVIDERS = [
19
- ['APPVEYOR'.freeze, :extract_appveyor],
20
- ['TF_BUILD'.freeze, :extract_azure_pipelines],
21
- ['BITBUCKET_COMMIT'.freeze, :extract_bitbucket],
22
- ['BUILDKITE'.freeze, :extract_buildkite],
23
- ['CIRCLECI'.freeze, :extract_circle_ci],
24
- ['GITHUB_SHA'.freeze, :extract_github_actions],
25
- ['GITLAB_CI'.freeze, :extract_gitlab],
26
- ['JENKINS_URL'.freeze, :extract_jenkins],
27
- ['TEAMCITY_VERSION'.freeze, :extract_teamcity],
28
- ['TRAVIS'.freeze, :extract_travis],
29
- ['BITRISE_BUILD_SLUG'.freeze, :extract_bitrise]
30
- ].freeze
31
-
32
- module_function
33
-
34
- def tags(env)
35
- provider = PROVIDERS.find { |c| env.key? c[0] }
36
- return {} if provider.nil?
37
-
38
- tags = send(provider[1], env)
39
-
40
- tags[Git::TAG_TAG] = normalize_ref(tags[Git::TAG_TAG])
41
- tags.delete(Git::TAG_BRANCH) unless tags[Git::TAG_TAG].nil?
42
- tags[Git::TAG_BRANCH] = normalize_ref(tags[Git::TAG_BRANCH])
43
- tags[Git::TAG_REPOSITORY_URL] = filter_sensitive_info(tags[Git::TAG_REPOSITORY_URL])
44
-
45
- # Expand ~
46
- workspace_path = tags[TAG_WORKSPACE_PATH]
47
- if !workspace_path.nil? && (workspace_path == '~' || workspace_path.start_with?('~/'))
48
- tags[TAG_WORKSPACE_PATH] = File.expand_path(workspace_path)
49
- end
50
- tags.reject { |_, v| v.nil? }
51
- end
52
-
53
- def normalize_ref(name)
54
- refs = %r{^refs/(heads/)?}
55
- origin = %r{^origin/}
56
- tags = %r{^tags/}
57
- name.gsub(refs, '').gsub(origin, '').gsub(tags, '') unless name.nil?
58
- end
59
-
60
- def filter_sensitive_info(url)
61
- url.gsub(%r{(https?://)[^/]*@}, '\1') unless url.nil?
62
- end
63
-
64
- # CI providers
65
-
66
- def extract_appveyor(env)
67
- url = "https://ci.appveyor.com/project/#{env['APPVEYOR_REPO_NAME']}/builds/#{env['APPVEYOR_BUILD_ID']}"
68
-
69
- if env['APPVEYOR_REPO_PROVIDER'] == 'github'
70
- repository = "https://github.com/#{env['APPVEYOR_REPO_NAME']}.git"
71
- commit = env['APPVEYOR_REPO_COMMIT']
72
- branch = (env['APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH'] || env['APPVEYOR_REPO_BRANCH'])
73
- tag = env['APPVEYOR_REPO_TAG_NAME']
74
- end
75
-
76
- {
77
- TAG_PROVIDER_NAME => 'appveyor',
78
- Git::TAG_REPOSITORY_URL => repository,
79
- Git::TAG_COMMIT_SHA => commit,
80
- TAG_WORKSPACE_PATH => env['APPVEYOR_BUILD_FOLDER'],
81
- TAG_PIPELINE_ID => env['APPVEYOR_BUILD_ID'],
82
- TAG_PIPELINE_NAME => env['APPVEYOR_REPO_NAME'],
83
- TAG_PIPELINE_NUMBER => env['APPVEYOR_BUILD_NUMBER'],
84
- TAG_PIPELINE_URL => url,
85
- TAG_JOB_URL => url,
86
- Git::TAG_BRANCH => branch,
87
- Git::TAG_TAG => tag
88
- }
89
- end
90
-
91
- def extract_azure_pipelines(env)
92
- if env['SYSTEM_TEAMFOUNDATIONSERVERURI'] && env['SYSTEM_TEAMPROJECTID'] && env['BUILD_BUILDID']
93
- base_url = "#{env['SYSTEM_TEAMFOUNDATIONSERVERURI']}#{env['SYSTEM_TEAMPROJECTID']}" \
94
- "/_build/results?buildId=#{env['BUILD_BUILDID']}"
95
- pipeline_url = base_url
96
- job_url = base_url + "&view=logs&j=#{env['SYSTEM_JOBID']}&t=#{env['SYSTEM_TASKINSTANCEID']}"
97
- else
98
- pipeline_url = job_url = nil
99
- end
100
- branch_or_tag = (
101
- env['SYSTEM_PULLREQUEST_SOURCEBRANCH'] || env['BUILD_SOURCEBRANCH'] || env['BUILD_SOURCEBRANCHNAME']
102
- )
103
- if branch_or_tag.include? 'tags/'
104
- branch = nil
105
- tag = branch_or_tag
106
- else
107
- branch = branch_or_tag
108
- tag = nil
109
- end
110
- {
111
- TAG_PROVIDER_NAME => 'azurepipelines',
112
- TAG_WORKSPACE_PATH => env['BUILD_SOURCESDIRECTORY'],
113
- TAG_PIPELINE_ID => env['BUILD_BUILDID'],
114
- TAG_PIPELINE_NAME => env['BUILD_DEFINITIONNAME'],
115
- TAG_PIPELINE_NUMBER => env['BUILD_BUILDID'],
116
- TAG_PIPELINE_URL => pipeline_url,
117
- TAG_JOB_URL => job_url,
118
- Git::TAG_REPOSITORY_URL => (env['SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI'] || env['BUILD_REPOSITORY_URI']),
119
- Git::TAG_COMMIT_SHA => (env['SYSTEM_PULLREQUEST_SOURCECOMMITID'] || env['BUILD_SOURCEVERSION']),
120
- Git::TAG_BRANCH => branch,
121
- Git::TAG_TAG => tag
122
- }
123
- end
124
-
125
- def extract_bitbucket(env)
126
- url = "https://bitbucket.org/#{env['BITBUCKET_REPO_FULL_NAME']}/addon/pipelines/home#" \
127
- "!/results/#{env['BITBUCKET_BUILD_NUMBER']}"
128
- {
129
- Git::TAG_BRANCH => env['BITBUCKET_BRANCH'],
130
- Git::TAG_COMMIT_SHA => env['BITBUCKET_COMMIT'],
131
- Git::TAG_REPOSITORY_URL => env['BITBUCKET_GIT_SSH_ORIGIN'],
132
- Git::TAG_TAG => env['BITBUCKET_TAG'],
133
- TAG_JOB_URL => url,
134
- TAG_PIPELINE_ID => env['BITBUCKET_PIPELINE_UUID'] ? env['BITBUCKET_PIPELINE_UUID'].tr('{}', '') : None,
135
- TAG_PIPELINE_NAME => env['BITBUCKET_REPO_FULL_NAME'],
136
- TAG_PIPELINE_NUMBER => env['BITBUCKET_BUILD_NUMBER'],
137
- TAG_PIPELINE_URL => url,
138
- TAG_PROVIDER_NAME => 'bitbucket',
139
- TAG_WORKSPACE_PATH => env['BITBUCKET_CLONE_DIR']
140
- }
141
- end
142
-
143
- def extract_buildkite(env)
144
- {
145
- Git::TAG_BRANCH => env['BUILDKITE_BRANCH'],
146
- Git::TAG_COMMIT_SHA => env['BUILDKITE_COMMIT'],
147
- Git::TAG_REPOSITORY_URL => env['BUILDKITE_REPO'],
148
- Git::TAG_TAG => env['BUILDKITE_TAG'],
149
- TAG_PIPELINE_ID => env['BUILDKITE_BUILD_ID'],
150
- TAG_PIPELINE_NAME => env['BUILDKITE_PIPELINE_SLUG'],
151
- TAG_PIPELINE_NUMBER => env['BUILDKITE_BUILD_NUMBER'],
152
- TAG_PIPELINE_URL => env['BUILDKITE_BUILD_URL'],
153
- TAG_JOB_URL => "#{env['BUILDKITE_BUILD_URL']}##{env['BUILDKITE_JOB_ID']}",
154
- TAG_PROVIDER_NAME => 'buildkite',
155
- TAG_WORKSPACE_PATH => env['BUILDKITE_BUILD_CHECKOUT_PATH']
156
- }
157
- end
158
-
159
- def extract_circle_ci(env)
160
- {
161
- Git::TAG_BRANCH => env['CIRCLE_BRANCH'],
162
- Git::TAG_COMMIT_SHA => env['CIRCLE_SHA1'],
163
- Git::TAG_REPOSITORY_URL => env['CIRCLE_REPOSITORY_URL'],
164
- Git::TAG_TAG => env['CIRCLE_TAG'],
165
- TAG_PIPELINE_ID => env['CIRCLE_WORKFLOW_ID'],
166
- TAG_PIPELINE_NAME => env['CIRCLE_PROJECT_REPONAME'],
167
- TAG_PIPELINE_NUMBER => env['CIRCLE_BUILD_NUM'],
168
- TAG_PIPELINE_URL => env['CIRCLE_BUILD_URL'],
169
- TAG_JOB_URL => env['CIRCLE_BUILD_URL'],
170
- TAG_PROVIDER_NAME => 'circleci',
171
- TAG_WORKSPACE_PATH => env['CIRCLE_WORKING_DIRECTORY']
172
- }
173
- end
174
-
175
- def extract_github_actions(env)
176
- branch_or_tag = (env['GITHUB_HEAD_REF'] || env['GITHUB_REF'])
177
- if branch_or_tag.include? 'tags/'
178
- branch = nil
179
- tag = branch_or_tag
180
- else
181
- branch = branch_or_tag
182
- tag = nil
183
- end
184
- {
185
- Git::TAG_BRANCH => branch,
186
- Git::TAG_COMMIT_SHA => env['GITHUB_SHA'],
187
- Git::TAG_REPOSITORY_URL => "https://github.com/#{env['GITHUB_REPOSITORY']}.git",
188
- Git::TAG_TAG => tag,
189
- TAG_JOB_URL => "https://github.com/#{env['GITHUB_REPOSITORY']}/commit/#{env['GITHUB_SHA']}/checks",
190
- TAG_PIPELINE_ID => env['GITHUB_RUN_ID'],
191
- TAG_PIPELINE_NAME => env['GITHUB_WORKFLOW'],
192
- TAG_PIPELINE_NUMBER => env['GITHUB_RUN_NUMBER'],
193
- TAG_PIPELINE_URL => "https://github.com/#{env['GITHUB_REPOSITORY']}/commit/#{env['GITHUB_SHA']}/checks",
194
- TAG_PROVIDER_NAME => 'github',
195
- TAG_WORKSPACE_PATH => env['GITHUB_WORKSPACE']
196
- }
197
- end
198
-
199
- def extract_gitlab(env)
200
- url = env['CI_PIPELINE_URL']
201
- url = url.gsub(%r{/-/pipelines/}, '/pipelines/') unless url.nil?
202
- {
203
- Git::TAG_BRANCH => env['CI_COMMIT_BRANCH'],
204
- Git::TAG_COMMIT_SHA => env['CI_COMMIT_SHA'],
205
- Git::TAG_REPOSITORY_URL => env['CI_REPOSITORY_URL'],
206
- Git::TAG_TAG => env['CI_COMMIT_TAG'],
207
- TAG_STAGE_NAME => env['CI_JOB_STAGE'],
208
- TAG_JOB_NAME => env['CI_JOB_NAME'],
209
- TAG_JOB_URL => env['CI_JOB_URL'],
210
- TAG_PIPELINE_ID => env['CI_PIPELINE_ID'],
211
- TAG_PIPELINE_NAME => env['CI_PROJECT_PATH'],
212
- TAG_PIPELINE_NUMBER => env['CI_PIPELINE_IID'],
213
- TAG_PIPELINE_URL => url,
214
- TAG_PROVIDER_NAME => 'gitlab',
215
- TAG_WORKSPACE_PATH => env['CI_PROJECT_DIR']
216
- }
217
- end
218
-
219
- def extract_jenkins(env)
220
- branch_or_tag = env['GIT_BRANCH']
221
- if branch_or_tag.include? 'tags/'
222
- branch = nil
223
- tag = branch_or_tag
224
- else
225
- branch = branch_or_tag
226
- tag = nil
227
- end
228
- name = env['JOB_NAME']
229
- name = name.gsub("/#{normalize_ref(branch)}", '') unless name.nil? || branch.nil?
230
- name = name.split('/').reject { |v| v.nil? || v.include?('=') }.join('/') unless name.nil?
231
- {
232
- Git::TAG_BRANCH => branch,
233
- Git::TAG_COMMIT_SHA => env['GIT_COMMIT'],
234
- Git::TAG_REPOSITORY_URL => env['GIT_URL'],
235
- Git::TAG_TAG => tag,
236
- TAG_PIPELINE_ID => env['BUILD_TAG'],
237
- TAG_PIPELINE_NAME => name,
238
- TAG_PIPELINE_NUMBER => env['BUILD_NUMBER'],
239
- TAG_PIPELINE_URL => env['BUILD_URL'],
240
- TAG_PROVIDER_NAME => 'jenkins',
241
- TAG_WORKSPACE_PATH => env['WORKSPACE']
242
- }
243
- end
244
-
245
- def extract_teamcity(env)
246
- {
247
- TAG_PROVIDER_NAME => 'teamcity',
248
- Git::TAG_REPOSITORY_URL => env['BUILD_VCS_URL'],
249
- Git::TAG_COMMIT_SHA => env['BUILD_VCS_NUMBER'],
250
- TAG_WORKSPACE_PATH => env['BUILD_CHECKOUTDIR'],
251
- TAG_PIPELINE_ID => env['BUILD_ID'],
252
- TAG_PIPELINE_NUMBER => env['BUILD_NUMBER'],
253
- TAG_PIPELINE_URL => (
254
- env['SERVER_URL'] && env['BUILD_ID'] ? "#{env['SERVER_URL']}/viewLog.html?buildId=#{env['SERVER_URL']}" : nil
255
- )
256
- }
257
- end
258
-
259
- def extract_travis(env)
260
- {
261
- Git::TAG_BRANCH => (env['TRAVIS_PULL_REQUEST_BRANCH'] || env['TRAVIS_BRANCH']),
262
- Git::TAG_COMMIT_SHA => env['TRAVIS_COMMIT'],
263
- Git::TAG_REPOSITORY_URL => "https://github.com/#{env['TRAVIS_REPO_SLUG']}.git",
264
- Git::TAG_TAG => env['TRAVIS_TAG'],
265
- TAG_JOB_URL => env['TRAVIS_JOB_WEB_URL'],
266
- TAG_PIPELINE_ID => env['TRAVIS_BUILD_ID'],
267
- TAG_PIPELINE_NAME => env['TRAVIS_REPO_SLUG'],
268
- TAG_PIPELINE_NUMBER => env['TRAVIS_BUILD_NUMBER'],
269
- TAG_PIPELINE_URL => env['TRAVIS_BUILD_WEB_URL'],
270
- TAG_PROVIDER_NAME => 'travisci',
271
- TAG_WORKSPACE_PATH => env['TRAVIS_BUILD_DIR']
272
- }
273
- end
274
-
275
- def extract_bitrise(env)
276
- commit = (
277
- env['BITRISE_GIT_COMMIT'] || env['GIT_CLONE_COMMIT_HASH']
278
- )
279
- branch = (
280
- env['BITRISEIO_GIT_BRANCH_DEST'] || env['BITRISE_GIT_BRANCH']
281
- )
282
- {
283
- TAG_PROVIDER_NAME => 'bitrise',
284
- TAG_PIPELINE_ID => env['BITRISE_BUILD_SLUG'],
285
- TAG_PIPELINE_NAME => env['BITRISE_APP_TITLE'],
286
- TAG_PIPELINE_NUMBER => env['BITRISE_BUILD_NUMBER'],
287
- TAG_PIPELINE_URL => env['BITRISE_BUILD_URL'],
288
- TAG_WORKSPACE_PATH => env['BITRISE_SOURCE_DIR'],
289
- Git::TAG_REPOSITORY_URL => env['GIT_REPOSITORY_URL'],
290
- Git::TAG_COMMIT_SHA => commit,
291
- Git::TAG_BRANCH => branch,
292
- Git::TAG_TAG => env['BITRISE_GIT_TAG']
293
- }
294
- end
295
- end
296
- end
297
- end