ddtrace 0.26.1 → 0.27.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +153 -77
  3. data/.circleci/images/primary/{Dockerfile-1.9.3 → Dockerfile-2.5.6} +8 -8
  4. data/.circleci/images/primary/Dockerfile-2.6.4 +73 -0
  5. data/.github/CODEOWNERS +1 -0
  6. data/Appraisals +201 -94
  7. data/CHANGELOG.md +25 -8
  8. data/Rakefile +153 -47
  9. data/ddtrace.gemspec +1 -1
  10. data/docker-compose.yml +56 -26
  11. data/docs/GettingStarted.md +117 -14
  12. data/lib/ddtrace.rb +4 -0
  13. data/lib/ddtrace/analytics.rb +9 -39
  14. data/lib/ddtrace/configuration.rb +0 -19
  15. data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +144 -0
  16. data/lib/ddtrace/contrib/action_pack/action_controller/patcher.rb +37 -0
  17. data/lib/ddtrace/contrib/action_pack/configuration/settings.rb +25 -0
  18. data/lib/ddtrace/contrib/action_pack/ext.rb +16 -0
  19. data/lib/ddtrace/contrib/action_pack/integration.rb +36 -0
  20. data/lib/ddtrace/contrib/action_pack/patcher.rb +29 -0
  21. data/lib/ddtrace/contrib/action_pack/utils.rb +36 -0
  22. data/lib/ddtrace/contrib/action_view/configuration/settings.rb +24 -0
  23. data/lib/ddtrace/contrib/action_view/ext.rb +17 -0
  24. data/lib/ddtrace/contrib/action_view/instrumentation.rb +192 -0
  25. data/lib/ddtrace/contrib/action_view/integration.rb +43 -0
  26. data/lib/ddtrace/contrib/action_view/patcher.rb +47 -0
  27. data/lib/ddtrace/contrib/action_view/utils.rb +32 -0
  28. data/lib/ddtrace/contrib/active_support/cache/instrumentation.rb +157 -0
  29. data/lib/ddtrace/contrib/active_support/cache/patcher.rb +62 -0
  30. data/lib/ddtrace/contrib/active_support/cache/redis.rb +47 -0
  31. data/lib/ddtrace/contrib/active_support/configuration/settings.rb +23 -0
  32. data/lib/ddtrace/contrib/active_support/ext.rb +21 -0
  33. data/lib/ddtrace/contrib/active_support/integration.rb +38 -0
  34. data/lib/ddtrace/contrib/active_support/patcher.rb +29 -0
  35. data/lib/ddtrace/contrib/ethon/configuration/settings.rb +24 -0
  36. data/lib/ddtrace/contrib/ethon/easy_patch.rb +139 -0
  37. data/lib/ddtrace/contrib/ethon/ext.rb +15 -0
  38. data/lib/ddtrace/contrib/ethon/integration.rb +35 -0
  39. data/lib/ddtrace/contrib/ethon/multi_patch.rb +80 -0
  40. data/lib/ddtrace/contrib/ethon/patcher.rb +27 -0
  41. data/lib/ddtrace/contrib/patchable.rb +1 -1
  42. data/lib/ddtrace/contrib/rails/configuration/settings.rb +43 -6
  43. data/lib/ddtrace/contrib/rails/ext.rb +0 -15
  44. data/lib/ddtrace/contrib/rails/framework.rb +37 -6
  45. data/lib/ddtrace/contrib/rails/middlewares.rb +2 -1
  46. data/lib/ddtrace/contrib/rails/patcher.rb +0 -8
  47. data/lib/ddtrace/contrib/rails/utils.rb +0 -46
  48. data/lib/ddtrace/contrib/redis/patcher.rb +12 -19
  49. data/lib/ddtrace/correlation.rb +8 -12
  50. data/lib/ddtrace/forced_tracing.rb +10 -38
  51. data/lib/ddtrace/sampler.rb +20 -74
  52. data/lib/ddtrace/span.rb +3 -4
  53. data/lib/ddtrace/tracer.rb +4 -11
  54. data/lib/ddtrace/version.rb +2 -2
  55. metadata +32 -9
  56. data/lib/ddtrace/contrib/rails/action_controller.rb +0 -100
  57. data/lib/ddtrace/contrib/rails/action_controller_patch.rb +0 -78
  58. data/lib/ddtrace/contrib/rails/action_view.rb +0 -19
  59. data/lib/ddtrace/contrib/rails/active_support.rb +0 -67
  60. data/lib/ddtrace/contrib/rails/core_extensions.rb +0 -353
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e58205299222f3c3a75a0a032ad3cca7c739fc68
4
- data.tar.gz: 41e87bd0031a447ce9267c24bd1df4c7bc2598fd
3
+ metadata.gz: e0968ba35be08053c082756099e810143bf93531
4
+ data.tar.gz: d648169405d516eb09c208776254bbd2b0bb858b
5
5
  SHA512:
6
- metadata.gz: 7b81c99d62190ba829ebca7671493dbb6a187eaf5ef8ddeaf6a6dcf1fc32f543d2acde719208e6aba0bd65f1a2690dc16b043f5649da0e16cccf7974907a7d7e
7
- data.tar.gz: 28c7fa70a10769ed61a23bb60d1a474b939d1e3308225174110cf39fdc856ffa7745c17e9f0b1ef66f95852171ac7293138b9c6261bb75892ed5d9649552902d
6
+ metadata.gz: 3c7ae3e5c9c25819adf0432f1e88057b64cdf16a143139bccae1b1d9649738d39abffdf0ba97a05f11d9dd70ab137cf2ef28da2d15ec2121ab4e3fe387d72b67
7
+ data.tar.gz: 72c24e92cbba1f15f9188da97319f333a4a1eca4c702bbb05c4d18aef6a136e06f23790f5b3ad789b6abca5d441d9e3b7e2455d89fc82eba359de1e691fbf9ad
data/.circleci/config.yml CHANGED
@@ -4,10 +4,6 @@ job_defaults: &job_defaults
4
4
  shell: /bin/bash --login
5
5
 
6
6
  ruby_containers: &ruby_containers
7
- - &container-1_9
8
- image: palazzem/docker-library:ddtrace_rb_1_9_3
9
- environment:
10
- - BUNDLE_GEMFILE=/app/Gemfile
11
7
  - &container-2_0
12
8
  image: palazzem/docker-library:ddtrace_rb_2_0_0
13
9
  environment:
@@ -28,6 +24,14 @@ ruby_containers: &ruby_containers
28
24
  image: palazzem/docker-library:ddtrace_rb_2_4_6
29
25
  environment:
30
26
  - BUNDLE_GEMFILE=/app/Gemfile
27
+ - &container-2_5
28
+ image: marcotc/docker-library:ddtrace_rb_2_5_6
29
+ environment:
30
+ - BUNDLE_GEMFILE=/app/Gemfile
31
+ - &container-2_6
32
+ image: marcotc/docker-library:ddtrace_rb_2_6_4
33
+ environment:
34
+ - BUNDLE_GEMFILE=/app/Gemfile
31
35
 
32
36
  test_containers: &test_containers
33
37
  - &container_postgres
@@ -101,61 +105,6 @@ filters_only_release_tags: &filters_only_release_tags
101
105
 
102
106
  version: 2.0
103
107
  jobs:
104
- checkout-1.9:
105
- <<: *job_defaults
106
- docker:
107
- - *container-1_9
108
- steps:
109
- - checkout
110
- - save_cache:
111
- key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-1.9-{{ .Environment.CIRCLE_SHA1 }}'
112
- paths:
113
- - /app
114
- build-1.9:
115
- <<: *job_defaults
116
- docker:
117
- - *container-1_9
118
- steps:
119
- - restore_cache:
120
- keys:
121
- - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-1.9-{{ .Environment.CIRCLE_SHA1 }}'
122
- - '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-1.9-{{ .Environment.CIRCLE_SHA1 }}'
123
- - *step_init_bundle_checksum
124
- - restore_cache:
125
- keys:
126
- - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-1.9-{{ checksum ".circleci/bundle_checksum" }}'
127
- - *step_bundle_install
128
- - *step_appraisal_install
129
- - *step_compute_bundle_checksum
130
- - save_cache:
131
- key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-1.9-{{ .Environment.CIRCLE_SHA1 }}'
132
- paths:
133
- - /app
134
- - save_cache:
135
- key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-1.9-{{ checksum ".circleci/bundle_checksum" }}'
136
- paths:
137
- - /usr/local/bundle
138
- test-1.9:
139
- <<: *job_defaults
140
- docker:
141
- - <<: *container-1_9
142
- environment:
143
- - TEST_DATADOG_INTEGRATION: 1
144
- - *container_postgres
145
- - *container_mysql
146
- - *container_elasticsearch
147
- - *container_redis
148
- - *container_mongo
149
- - *container_memcached
150
- - *container_agent
151
- steps:
152
- - restore_cache:
153
- keys:
154
- - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-1.9-{{ .Environment.CIRCLE_SHA1 }}'
155
- - restore_cache:
156
- keys:
157
- - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-1.9-{{ checksum ".circleci/bundle_checksum" }}'
158
- - *step_run_all_tests
159
108
  checkout-2.0:
160
109
  <<: *job_defaults
161
110
  docker:
@@ -458,10 +407,125 @@ jobs:
458
407
  keys:
459
408
  - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.4-{{ checksum ".circleci/bundle_checksum" }}'
460
409
  - *step_run_all_tests
410
+
411
+ checkout-2.5:
412
+ <<: *job_defaults
413
+ docker:
414
+ - *container-2_5
415
+ steps:
416
+ - checkout
417
+ - save_cache:
418
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-2.5-{{ .Environment.CIRCLE_SHA1 }}'
419
+ paths:
420
+ - /app
421
+ build-2.5:
422
+ <<: *job_defaults
423
+ docker:
424
+ - *container-2_5
425
+ steps:
426
+ - restore_cache:
427
+ keys:
428
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.5-{{ .Environment.CIRCLE_SHA1 }}'
429
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-2.5-{{ .Environment.CIRCLE_SHA1 }}'
430
+ - *step_init_bundle_checksum
431
+ - restore_cache:
432
+ keys:
433
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.5-{{ checksum ".circleci/bundle_checksum" }}'
434
+ - *step_bundle_install
435
+ - *step_rubocop
436
+ - *step_appraisal_install
437
+ - *step_compute_bundle_checksum
438
+ - save_cache:
439
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.5-{{ .Environment.CIRCLE_SHA1 }}'
440
+ paths:
441
+ - /app
442
+ - save_cache:
443
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.5-{{ checksum ".circleci/bundle_checksum" }}'
444
+ paths:
445
+ - /usr/local/bundle
446
+ test-2.5:
447
+ <<: *job_defaults
448
+ docker:
449
+ - <<: *container-2_5
450
+ environment:
451
+ - TEST_DATADOG_INTEGRATION: 1
452
+ - *container_postgres
453
+ - *container_mysql
454
+ - *container_elasticsearch
455
+ - *container_redis
456
+ - *container_mongo
457
+ - *container_memcached
458
+ - *container_agent
459
+ steps:
460
+ - restore_cache:
461
+ keys:
462
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.5-{{ .Environment.CIRCLE_SHA1 }}'
463
+ - restore_cache:
464
+ keys:
465
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.5-{{ checksum ".circleci/bundle_checksum" }}'
466
+ - *step_run_all_tests
467
+
468
+ checkout-2.6:
469
+ <<: *job_defaults
470
+ docker:
471
+ - *container-2_6
472
+ steps:
473
+ - checkout
474
+ - save_cache:
475
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-2.6-{{ .Environment.CIRCLE_SHA1 }}'
476
+ paths:
477
+ - /app
478
+ build-2.6:
479
+ <<: *job_defaults
480
+ docker:
481
+ - *container-2_6
482
+ steps:
483
+ - restore_cache:
484
+ keys:
485
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.6-{{ .Environment.CIRCLE_SHA1 }}'
486
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-2.6-{{ .Environment.CIRCLE_SHA1 }}'
487
+ - *step_init_bundle_checksum
488
+ - restore_cache:
489
+ keys:
490
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.6-{{ checksum ".circleci/bundle_checksum" }}'
491
+ - *step_bundle_install
492
+ - *step_rubocop
493
+ - *step_appraisal_install
494
+ - *step_compute_bundle_checksum
495
+ - save_cache:
496
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.6-{{ .Environment.CIRCLE_SHA1 }}'
497
+ paths:
498
+ - /app
499
+ - save_cache:
500
+ key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.6-{{ checksum ".circleci/bundle_checksum" }}'
501
+ paths:
502
+ - /usr/local/bundle
503
+ test-2.6:
504
+ <<: *job_defaults
505
+ docker:
506
+ - <<: *container-2_6
507
+ environment:
508
+ - TEST_DATADOG_INTEGRATION: 1
509
+ - *container_postgres
510
+ - *container_mysql
511
+ - *container_elasticsearch
512
+ - *container_redis
513
+ - *container_mongo
514
+ - *container_memcached
515
+ - *container_agent
516
+ steps:
517
+ - restore_cache:
518
+ keys:
519
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-2.6-{{ .Environment.CIRCLE_SHA1 }}'
520
+ - restore_cache:
521
+ keys:
522
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-2.6-{{ checksum ".circleci/bundle_checksum" }}'
523
+ - *step_run_all_tests
524
+
461
525
  "deploy release":
462
526
  <<: *job_defaults
463
527
  docker:
464
- - *container-2_4
528
+ - *container-2_5
465
529
  steps:
466
530
  - checkout
467
531
  - run:
@@ -479,7 +543,7 @@ jobs:
479
543
  "deploy prerelease Gem":
480
544
  <<: *job_defaults
481
545
  docker:
482
- - *container-2_4
546
+ - *container-2_5
483
547
  steps:
484
548
  - checkout
485
549
  - run:
@@ -490,10 +554,10 @@ jobs:
490
554
  - run:
491
555
  name: Rename to pre-release version based on branch name and build number
492
556
  command: |
493
- # create safe version string
494
- PRE=$(echo "${CIRCLE_BRANCH:-unknown}.${CIRCLE_BUILD_NUM:-R$RANDOM}" | sed -e 's/[^a-zA-Z0-9+]\{1,\}/./g')
495
- echo PRE=$PRE
496
- sed lib/ddtrace/version.rb -i -e "s/^\([\t ]*PRE\) *=*/\1 = \'${PRE}\' #/g"
557
+ # create safe version string
558
+ PRE=$(echo "${CIRCLE_BRANCH:-unknown}.${CIRCLE_BUILD_NUM:-R$RANDOM}" | sed -e 's/[^a-zA-Z0-9+]\{1,\}/./g')
559
+ echo PRE=$PRE
560
+ sed lib/ddtrace/version.rb -i -e "s/^\([\t ]*PRE\) *=*/\1 = \'${PRE}\' #/g"
497
561
  - run:
498
562
  name: Upload prereleas Gem and rebuild index
499
563
  command: S3_DIR=prerelease bundle exec rake release:gem
@@ -505,16 +569,6 @@ workflows:
505
569
  version: 2
506
570
  build-and-test:
507
571
  jobs:
508
- - checkout-1.9:
509
- <<: *filters_all_branches_and_tags
510
- - build-1.9:
511
- <<: *filters_all_branches_and_tags
512
- requires:
513
- - checkout-1.9
514
- - test-1.9:
515
- <<: *filters_all_branches_and_tags
516
- requires:
517
- - build-1.9
518
572
  - checkout-2.0:
519
573
  <<: *filters_all_branches_and_tags
520
574
  - build-2.0:
@@ -569,21 +623,43 @@ workflows:
569
623
  <<: *filters_all_branches_and_tags
570
624
  requires:
571
625
  - build-2.4
626
+ - checkout-2.5:
627
+ <<: *filters_all_branches_and_tags
628
+ - build-2.5:
629
+ <<: *filters_all_branches_and_tags
630
+ requires:
631
+ - checkout-2.5
632
+ - test-2.5:
633
+ <<: *filters_all_branches_and_tags
634
+ requires:
635
+ - build-2.5
636
+ - checkout-2.6:
637
+ <<: *filters_all_branches_and_tags
638
+ - build-2.6:
639
+ <<: *filters_all_branches_and_tags
640
+ requires:
641
+ - checkout-2.6
642
+ - test-2.6:
643
+ <<: *filters_all_branches_and_tags
644
+ requires:
645
+ - build-2.6
572
646
  - "deploy prerelease Gem":
573
647
  <<: *filters_all_branches_and_tags
574
648
  requires:
575
- - test-1.9
576
649
  - test-2.0
577
650
  - test-2.1
578
651
  - test-2.2
579
652
  - test-2.3
580
653
  - test-2.4
654
+ - test-2.5
655
+ - test-2.6
581
656
  - "deploy release":
582
657
  <<: *filters_only_release_tags
583
658
  requires:
584
- - test-1.9
585
659
  - test-2.0
586
660
  - test-2.1
587
661
  - test-2.2
588
662
  - test-2.3
589
663
  - test-2.4
664
+ - test-2.5
665
+ - test-2.6
@@ -1,9 +1,5 @@
1
- # Last version: https://github.com/docker-library/ruby/blob/90c4e3be58d565007c518d311d4bd05086a1638c/1.9/Dockerfile
2
- FROM ruby:1.9.3
3
-
4
- # Add Jessie repos
5
- # Fixes https://superuser.com/questions/1423486/issue-with-fetching-http-deb-debian-org-debian-dists-jessie-updates-inrelease
6
- RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list
1
+ # Current version: https://github.com/docker-library/ruby/blob/6a7df7a72b4a3d1b3e06ead303841b3fdaca560e/2.5/buster/Dockerfile
2
+ FROM ruby:2.5.6
7
3
 
8
4
  # Make apt non-interactive
9
5
  RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \
@@ -63,8 +59,12 @@ RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cac
63
59
  && dockerize --version
64
60
 
65
61
  # Install RubyGems
66
- RUN gem update --system 2.7.9
67
- RUN gem install bundler -v '1.17.3'
62
+ RUN gem update --system
63
+ RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
64
+
65
+ # Install RubyGems
66
+ RUN gem update --system
67
+ RUN gem install bundler
68
68
  ENV BUNDLE_SILENCE_ROOT_WARNING 1
69
69
 
70
70
  RUN mkdir /app
@@ -0,0 +1,73 @@
1
+ # Current version: https://github.com/docker-library/ruby/blob/6a7df7a72b4a3d1b3e06ead303841b3fdaca560e/2.6/buster/Dockerfile
2
+ FROM ruby:2.6.4
3
+
4
+ # Make apt non-interactive
5
+ RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \
6
+ && echo 'DPkg::Options "--force-confnew";' >> /etc/apt/apt.conf.d/90circleci
7
+
8
+ ENV DEBIAN_FRONTEND=noninteractive
9
+
10
+ # Install required packages
11
+ RUN set -ex; \
12
+ apt-get update; \
13
+ mkdir -p /usr/share/man/man1; \
14
+ apt-get install -y --no-install-recommends \
15
+ git mercurial xvfb \
16
+ locales sudo openssh-client ca-certificates tar gzip parallel \
17
+ net-tools netcat unzip zip bzip2 gnupg curl wget \
18
+ tzdata rsync vim; \
19
+ rm -rf /var/lib/apt/lists/*;
20
+
21
+ # Set timezone to UTC by default
22
+ RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
23
+
24
+ # Set language
25
+ RUN locale-gen en_US.UTF-8
26
+ ENV LANG en_US.UTF-8
27
+ ENV LANGUAGE en_US:en
28
+
29
+ # Install jq
30
+ RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \
31
+ && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \
32
+ && chmod +x /usr/bin/jq \
33
+ && jq --version
34
+
35
+ # Install Docker
36
+ RUN set -ex \
37
+ && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \
38
+ && DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \
39
+ && echo Docker URL: $DOCKER_URL \
40
+ && curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \
41
+ && ls -lha /tmp/docker.tgz \
42
+ && tar -xz -C /tmp -f /tmp/docker.tgz \
43
+ && mv /tmp/docker/* /usr/bin \
44
+ && rm -rf /tmp/docker /tmp/docker.tgz \
45
+ && which docker \
46
+ && (docker version || true)
47
+
48
+ # Install Docker Compose
49
+ RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \
50
+ && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \
51
+ && chmod +x /usr/bin/docker-compose \
52
+ && docker-compose version
53
+
54
+ # Install Dockerize
55
+ RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \
56
+ && curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \
57
+ && tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \
58
+ && rm -rf /tmp/dockerize-linux-amd64.tar.gz \
59
+ && dockerize --version
60
+
61
+ # Install RubyGems
62
+ RUN gem update --system
63
+ RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
64
+
65
+ # Install RubyGems
66
+ RUN gem update --system
67
+ RUN gem install bundler
68
+ ENV BUNDLE_SILENCE_ROOT_WARNING 1
69
+
70
+ RUN mkdir /app
71
+ WORKDIR /app
72
+
73
+ CMD ["/bin/sh"]
@@ -0,0 +1 @@
1
+ * @DataDog/apm-ruby
data/Appraisals CHANGED
@@ -1,96 +1,5 @@
1
- if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('1.9.3')
2
- raise NotImplementedError, 'Ruby versions < 1.9.3 are not supported!'
3
- elsif Gem::Version.new('1.9.3') <= Gem::Version.new(RUBY_VERSION) \
4
- && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0.0')
5
- if RUBY_PLATFORM != 'java'
6
- appraise 'rails30-postgres' do
7
- gem 'test-unit'
8
- gem 'rails', '3.0.20'
9
- gem 'pg', '0.15.1', platform: :ruby
10
- gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
11
- gem 'rack-cache', '1.7.1'
12
- gem 'rake', '< 12.3'
13
- end
14
-
15
- appraise 'rails30-postgres-sidekiq' do
16
- gem 'test-unit'
17
- gem 'rails', '3.0.20'
18
- gem 'pg', '0.15.1', platform: :ruby
19
- gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
20
- gem 'sidekiq', '4.0.0'
21
- gem 'rack-cache', '1.7.1'
22
- gem 'rake', '< 12.3'
23
- end
24
-
25
- appraise 'rails32-mysql2' do
26
- gem 'test-unit'
27
- gem 'rails', '3.2.22.5'
28
- gem 'mysql2', '0.3.21', platform: :ruby
29
- gem 'activerecord-mysql-adapter', platform: :ruby
30
- gem 'activerecord-jdbcmysql-adapter', platform: :jruby
31
- gem 'rack-cache', '1.7.1'
32
- gem 'rake', '< 12.3'
33
- end
34
-
35
- appraise 'rails32-postgres' do
36
- gem 'test-unit'
37
- gem 'rails', '3.2.22.5'
38
- gem 'pg', '0.15.1', platform: :ruby
39
- gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
40
- gem 'rack-cache', '1.7.1'
41
- gem 'rake', '< 12.3'
42
- end
43
-
44
- appraise 'rails32-postgres-redis' do
45
- gem 'test-unit'
46
- gem 'rails', '3.2.22.5'
47
- gem 'pg', '0.15.1', platform: :ruby
48
- gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
49
- gem 'redis-rails'
50
- gem 'redis', '< 4.0'
51
- gem 'rack-cache', '1.7.1'
52
- gem 'rake', '< 12.3'
53
- end
54
-
55
- appraise 'rails32-postgres-sidekiq' do
56
- gem 'test-unit'
57
- gem 'rails', '3.2.22.5'
58
- gem 'pg', '0.15.1', platform: :ruby
59
- gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
60
- gem 'sidekiq', '4.0.0'
61
- gem 'rack-cache', '1.7.1'
62
- gem 'rake', '< 12.3'
63
- end
64
-
65
- appraise 'contrib-old' do
66
- gem 'active_model_serializers', '~> 0.9.0'
67
- gem 'activerecord', '3.2.22.5'
68
- gem 'activerecord-mysql-adapter', platform: :ruby
69
- gem 'aws-sdk', '~> 2.0'
70
- gem 'concurrent-ruby'
71
- gem 'dalli'
72
- gem 'delayed_job'
73
- gem 'delayed_job_active_record'
74
- gem 'elasticsearch-transport'
75
- gem 'excon'
76
- gem 'hiredis'
77
- gem 'mongo', '< 2.5'
78
- gem 'mysql2', '0.3.21', platform: :ruby
79
- gem 'rack', '1.4.7'
80
- gem 'rack-cache', '1.7.1'
81
- gem 'rack-test', '0.7.0'
82
- gem 'rake', '< 12.3'
83
- gem 'redis', '< 4.0'
84
- gem 'rest-client', '< 2.0'
85
- gem 'resque', '< 2.0'
86
- gem 'sequel', '~> 4.0', '< 4.37'
87
- gem 'sidekiq', '~> 3.5.4'
88
- gem 'sinatra', '1.4.5'
89
- gem 'sqlite3', '~> 1.3.6'
90
- gem 'sucker_punch'
91
- gem 'timers', '< 4.2'
92
- end
93
- end
1
+ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0.0')
2
+ raise NotImplementedError, 'Ruby versions < 2.0.0 are not supported!'
94
3
  elsif Gem::Version.new('2.0.0') <= Gem::Version.new(RUBY_VERSION) \
95
4
  && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.1.0')
96
5
  if RUBY_PLATFORM != 'java'
@@ -157,6 +66,7 @@ elsif Gem::Version.new('2.0.0') <= Gem::Version.new(RUBY_VERSION) \
157
66
  gem 'delayed_job'
158
67
  gem 'delayed_job_active_record'
159
68
  gem 'elasticsearch-transport'
69
+ gem 'ethon'
160
70
  gem 'excon'
161
71
  gem 'hiredis'
162
72
  gem 'mongo', '< 2.5'
@@ -174,6 +84,7 @@ elsif Gem::Version.new('2.0.0') <= Gem::Version.new(RUBY_VERSION) \
174
84
  gem 'sqlite3', '~> 1.3.6'
175
85
  gem 'sucker_punch'
176
86
  gem 'timers', '< 4.2'
87
+ gem 'typhoeus'
177
88
  end
178
89
  end
179
90
  elsif Gem::Version.new('2.1.0') <= Gem::Version.new(RUBY_VERSION) \
@@ -262,6 +173,7 @@ elsif Gem::Version.new('2.1.0') <= Gem::Version.new(RUBY_VERSION) \
262
173
  gem 'delayed_job'
263
174
  gem 'delayed_job_active_record'
264
175
  gem 'elasticsearch-transport'
176
+ gem 'ethon'
265
177
  gem 'excon'
266
178
  gem 'hiredis'
267
179
  gem 'mongo', '< 2.5'
@@ -280,6 +192,7 @@ elsif Gem::Version.new('2.1.0') <= Gem::Version.new(RUBY_VERSION) \
280
192
  gem 'sqlite3', '~> 1.3.6'
281
193
  gem 'sucker_punch'
282
194
  gem 'timers', '< 4.2'
195
+ gem 'typhoeus'
283
196
  end
284
197
  end
285
198
  elsif Gem::Version.new('2.2.0') <= Gem::Version.new(RUBY_VERSION) \
@@ -377,6 +290,12 @@ elsif Gem::Version.new('2.2.0') <= Gem::Version.new(RUBY_VERSION) \
377
290
  end
378
291
 
379
292
  appraise 'rails5-postgres-redis' do
293
+ gem 'rails', '~> 5.2.1'
294
+ gem 'pg', '< 1.0', platform: :ruby
295
+ gem 'redis'
296
+ end
297
+
298
+ appraise 'rails5-postgres-redis-activesupport' do
380
299
  gem 'rails', '~> 5.2.1'
381
300
  gem 'pg', '< 1.0', platform: :ruby
382
301
  gem 'redis-rails'
@@ -391,6 +310,8 @@ elsif Gem::Version.new('2.2.0') <= Gem::Version.new(RUBY_VERSION) \
391
310
  end
392
311
 
393
312
  appraise 'contrib' do
313
+ gem 'actionpack'
314
+ gem 'actionview'
394
315
  gem 'active_model_serializers', '>= 0.10.0'
395
316
  gem 'activerecord', '< 5.1.5'
396
317
  gem 'aws-sdk'
@@ -399,6 +320,7 @@ elsif Gem::Version.new('2.2.0') <= Gem::Version.new(RUBY_VERSION) \
399
320
  gem 'delayed_job'
400
321
  gem 'delayed_job_active_record'
401
322
  gem 'elasticsearch-transport'
323
+ gem 'ethon'
402
324
  gem 'excon'
403
325
  gem 'grape'
404
326
  gem 'graphql', '< 1.9.4'
@@ -419,6 +341,7 @@ elsif Gem::Version.new('2.2.0') <= Gem::Version.new(RUBY_VERSION) \
419
341
  gem 'sinatra'
420
342
  gem 'sqlite3', '~> 1.3.6'
421
343
  gem 'sucker_punch'
344
+ gem 'typhoeus'
422
345
  end
423
346
  end
424
347
  elsif Gem::Version.new('2.3.0') <= Gem::Version.new(RUBY_VERSION) \
@@ -516,6 +439,12 @@ elsif Gem::Version.new('2.3.0') <= Gem::Version.new(RUBY_VERSION) \
516
439
  end
517
440
 
518
441
  appraise 'rails5-postgres-redis' do
442
+ gem 'rails', '~> 5.2.1'
443
+ gem 'pg', '< 1.0', platform: :ruby
444
+ gem 'redis'
445
+ end
446
+
447
+ appraise 'rails5-postgres-redis-activesupport' do
519
448
  gem 'rails', '~> 5.2.1'
520
449
  gem 'pg', '< 1.0', platform: :ruby
521
450
  gem 'redis-rails'
@@ -530,6 +459,8 @@ elsif Gem::Version.new('2.3.0') <= Gem::Version.new(RUBY_VERSION) \
530
459
  end
531
460
 
532
461
  appraise 'contrib' do
462
+ gem 'actionpack'
463
+ gem 'actionview'
533
464
  gem 'active_model_serializers', '>= 0.10.0'
534
465
  gem 'activerecord', '< 5.1.5'
535
466
  gem 'aws-sdk'
@@ -538,6 +469,7 @@ elsif Gem::Version.new('2.3.0') <= Gem::Version.new(RUBY_VERSION) \
538
469
  gem 'delayed_job'
539
470
  gem 'delayed_job_active_record'
540
471
  gem 'elasticsearch-transport'
472
+ gem 'ethon'
541
473
  gem 'excon'
542
474
  gem 'grape'
543
475
  gem 'graphql'
@@ -558,11 +490,115 @@ elsif Gem::Version.new('2.3.0') <= Gem::Version.new(RUBY_VERSION) \
558
490
  gem 'sinatra'
559
491
  gem 'sqlite3', '~> 1.3.6'
560
492
  gem 'sucker_punch'
493
+ gem 'typhoeus'
561
494
  end
562
495
  end
563
- elsif Gem::Version.new('2.4.0') <= Gem::Version.new(RUBY_VERSION)
496
+ elsif Gem::Version.new('2.4.0') <= Gem::Version.new(RUBY_VERSION) \
497
+ && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.5.0')
564
498
  if RUBY_PLATFORM != 'java'
499
+ appraise 'rails5-mysql2' do
500
+ gem 'rails', '~> 5.2.1'
501
+ gem 'mysql2', '< 0.5', platform: :ruby
502
+ end
503
+
504
+ appraise 'rails5-postgres' do
505
+ gem 'rails', '~> 5.2.1'
506
+ gem 'pg', '< 1.0', platform: :ruby
507
+ end
508
+
509
+ appraise 'rails5-postgres-redis' do
510
+ gem 'rails', '~> 5.2.1'
511
+ gem 'pg', '< 1.0', platform: :ruby
512
+ gem 'redis-rails'
513
+ gem 'redis'
514
+ end
515
+
516
+ appraise 'rails5-postgres-redis-activesupport' do
517
+ gem 'rails', '~> 5.2.1'
518
+ gem 'pg', '< 1.0', platform: :ruby
519
+ gem 'redis-rails'
520
+ gem 'redis'
521
+ end
522
+
523
+ appraise 'rails5-postgres-sidekiq' do
524
+ gem 'rails', '~> 5.2.1'
525
+ gem 'pg', '< 1.0', platform: :ruby
526
+ gem 'sidekiq'
527
+ gem 'activejob'
528
+ end
529
+
530
+ appraise 'contrib' do
531
+ gem 'actionpack'
532
+ gem 'actionview'
533
+ gem 'active_model_serializers', '>= 0.10.0'
534
+ gem 'activerecord', '< 5.1.5'
535
+ gem 'aws-sdk'
536
+ gem 'concurrent-ruby'
537
+ gem 'dalli'
538
+ gem 'delayed_job'
539
+ gem 'delayed_job_active_record'
540
+ gem 'elasticsearch-transport'
541
+ gem 'ethon'
542
+ gem 'excon'
543
+ gem 'grape'
544
+ gem 'graphql'
545
+ gem 'grpc'
546
+ gem 'hiredis'
547
+ gem 'mongo', '>= 2.8.0'
548
+ gem 'mysql2', '< 0.5', platform: :ruby
549
+ gem 'racecar', '>= 0.3.5'
550
+ gem 'rack'
551
+ gem 'rack-test'
552
+ gem 'rake', '>= 12.3'
553
+ gem 'redis', '< 4.0'
554
+ gem 'rest-client'
555
+ gem 'resque', '< 2.0'
556
+ gem 'sequel'
557
+ gem 'shoryuken'
558
+ gem 'sidekiq'
559
+ gem 'sinatra'
560
+ gem 'sqlite3', '~> 1.3.6'
561
+ gem 'sucker_punch'
562
+ gem 'typhoeus'
563
+ end
564
+ end
565
+ elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
566
+ && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0')
567
+ if RUBY_PLATFORM != 'java'
568
+ appraise 'rails5-mysql2' do
569
+ gem 'rails', '~> 5.2.1'
570
+ gem 'mysql2', '< 0.5', platform: :ruby
571
+ end
572
+
573
+ appraise 'rails5-postgres' do
574
+ gem 'rails', '~> 5.2.1'
575
+ gem 'pg', '< 1.0', platform: :ruby
576
+ end
577
+
578
+ appraise 'rails5-postgres-redis' do
579
+ gem 'rails', '~> 5.2.1'
580
+ gem 'pg', '< 1.0', platform: :ruby
581
+ gem 'redis-rails'
582
+ gem 'redis'
583
+ end
584
+
585
+ appraise 'rails5-postgres-redis-activesupport' do
586
+ gem 'rails', '~> 5.2.1'
587
+ gem 'pg', '< 1.0', platform: :ruby
588
+ gem 'redis-rails'
589
+ gem 'redis'
590
+ end
591
+
592
+ appraise 'rails5-postgres-sidekiq' do
593
+ gem 'rails', '~> 5.2.1'
594
+ gem 'pg', '< 1.0', platform: :ruby
595
+ gem 'sidekiq'
596
+ gem 'activejob'
597
+ end
598
+
565
599
  appraise 'contrib' do
600
+ gem 'actionpack'
601
+ gem 'actionview'
566
602
  gem 'active_model_serializers', '>= 0.10.0'
567
603
  gem 'activerecord', '< 5.1.5'
568
604
  gem 'aws-sdk'
@@ -571,6 +607,7 @@ elsif Gem::Version.new('2.4.0') <= Gem::Version.new(RUBY_VERSION)
571
607
  gem 'delayed_job'
572
608
  gem 'delayed_job_active_record'
573
609
  gem 'elasticsearch-transport'
610
+ gem 'ethon'
574
611
  gem 'excon'
575
612
  gem 'grape'
576
613
  gem 'graphql'
@@ -591,6 +628,76 @@ elsif Gem::Version.new('2.4.0') <= Gem::Version.new(RUBY_VERSION)
591
628
  gem 'sinatra'
592
629
  gem 'sqlite3', '~> 1.3.6'
593
630
  gem 'sucker_punch'
631
+ gem 'typhoeus'
632
+ end
633
+ end
634
+ elsif Gem::Version.new('2.6.0') <= Gem::Version.new(RUBY_VERSION)
635
+ if RUBY_PLATFORM != 'java'
636
+ appraise 'rails5-mysql2' do
637
+ gem 'rails', '~> 5.2.1'
638
+ gem 'mysql2', '< 0.5', platform: :ruby
639
+ end
640
+
641
+ appraise 'rails5-postgres' do
642
+ gem 'rails', '~> 5.2.1'
643
+ gem 'pg', '< 1.0', platform: :ruby
644
+ end
645
+
646
+ appraise 'rails5-postgres-redis' do
647
+ gem 'rails', '~> 5.2.1'
648
+ gem 'pg', '< 1.0', platform: :ruby
649
+ gem 'redis-rails'
650
+ gem 'redis'
651
+ end
652
+
653
+ appraise 'rails5-postgres-redis-activesupport' do
654
+ gem 'rails', '~> 5.2.1'
655
+ gem 'pg', '< 1.0', platform: :ruby
656
+ gem 'redis-rails'
657
+ gem 'redis'
658
+ end
659
+
660
+ appraise 'rails5-postgres-sidekiq' do
661
+ gem 'rails', '~> 5.2.1'
662
+ gem 'pg', '< 1.0', platform: :ruby
663
+ gem 'sidekiq'
664
+ gem 'activejob'
665
+ end
666
+
667
+ appraise 'contrib' do
668
+ gem 'actionpack'
669
+ gem 'actionview'
670
+ gem 'active_model_serializers', '>= 0.10.0'
671
+ gem 'activerecord', '< 5.1.5'
672
+ gem 'aws-sdk'
673
+ gem 'concurrent-ruby'
674
+ gem 'dalli'
675
+ gem 'delayed_job'
676
+ gem 'delayed_job_active_record'
677
+ gem 'elasticsearch-transport'
678
+ gem 'ethon'
679
+ gem 'excon'
680
+ gem 'grape'
681
+ gem 'graphql'
682
+ gem 'grpc'
683
+ gem 'hiredis'
684
+ gem 'mongo', '>= 2.8.0'
685
+ gem 'mysql2', '< 0.5', platform: :ruby
686
+ gem 'racecar', '>= 0.3.5'
687
+ gem 'rack'
688
+ gem 'rack-test'
689
+ gem 'rake', '>= 12.3'
690
+ gem 'redis', '< 4.0'
691
+ gem 'rest-client'
692
+ gem 'resque', '< 2.0'
693
+ gem 'sequel'
694
+ gem 'shoryuken'
695
+ gem 'sidekiq'
696
+ gem 'sinatra'
697
+ gem 'sqlite3', '~> 1.3.6'
698
+ gem 'sucker_punch'
699
+ gem 'typhoeus'
594
700
  end
595
701
  end
596
702
  end
703
+