elastic-apm 3.11.0 → 3.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.ci/.jenkins_codecov.yml +1 -1
  3. data/.ci/.jenkins_exclude.yml +46 -61
  4. data/.ci/.jenkins_framework.yml +3 -4
  5. data/.ci/.jenkins_master_framework.yml +1 -1
  6. data/.ci/.jenkins_ruby.yml +1 -3
  7. data/.ci/Jenkinsfile +22 -2
  8. data/.ci/docker/jruby/11-jdk/Dockerfile +2 -1
  9. data/.ci/docker/jruby/12-jdk/Dockerfile +2 -1
  10. data/.ci/docker/jruby/13-jdk/Dockerfile +2 -1
  11. data/.ci/docker/jruby/7-jdk/Dockerfile +2 -1
  12. data/.ci/docker/jruby/8-jdk/Dockerfile +2 -1
  13. data/.github/labeler-config.yml +3 -0
  14. data/.github/workflows/addToProject.yml +29 -0
  15. data/.github/workflows/labeler.yml +16 -0
  16. data/.rubocop.yml +33 -4
  17. data/CHANGELOG.asciidoc +58 -0
  18. data/Gemfile +23 -9
  19. data/Rakefile +10 -10
  20. data/docs/api.asciidoc +2 -1
  21. data/docs/configuration.asciidoc +20 -3
  22. data/docs/supported-technologies.asciidoc +2 -0
  23. data/lib/elastic_apm.rb +14 -2
  24. data/lib/elastic_apm/central_config.rb +7 -2
  25. data/lib/elastic_apm/config.rb +35 -18
  26. data/lib/elastic_apm/config/log_level_map.rb +47 -0
  27. data/lib/elastic_apm/context.rb +2 -8
  28. data/lib/elastic_apm/graphql.rb +2 -0
  29. data/lib/elastic_apm/grpc.rb +3 -3
  30. data/lib/elastic_apm/instrumenter.rb +1 -1
  31. data/lib/elastic_apm/metadata/cloud_info.rb +6 -4
  32. data/lib/elastic_apm/metadata/service_info.rb +2 -2
  33. data/lib/elastic_apm/metadata/system_info/container_info.rb +16 -5
  34. data/lib/elastic_apm/metrics.rb +1 -0
  35. data/lib/elastic_apm/metrics/cpu_mem_set.rb +1 -0
  36. data/lib/elastic_apm/middleware.rb +8 -3
  37. data/lib/elastic_apm/normalizers/rails/active_record.rb +16 -4
  38. data/lib/elastic_apm/opentracing.rb +2 -1
  39. data/lib/elastic_apm/span.rb +13 -2
  40. data/lib/elastic_apm/span/context/db.rb +1 -1
  41. data/lib/elastic_apm/span/context/http.rb +2 -0
  42. data/lib/elastic_apm/spies/delayed_job.rb +11 -3
  43. data/lib/elastic_apm/spies/dynamo_db.rb +8 -1
  44. data/lib/elastic_apm/spies/elasticsearch.rb +4 -2
  45. data/lib/elastic_apm/spies/faraday.rb +19 -11
  46. data/lib/elastic_apm/spies/http.rb +1 -0
  47. data/lib/elastic_apm/spies/mongo.rb +10 -2
  48. data/lib/elastic_apm/spies/net_http.rb +4 -1
  49. data/lib/elastic_apm/spies/rake.rb +4 -2
  50. data/lib/elastic_apm/spies/resque.rb +4 -2
  51. data/lib/elastic_apm/spies/sequel.rb +12 -1
  52. data/lib/elastic_apm/spies/shoryuken.rb +2 -0
  53. data/lib/elastic_apm/spies/sidekiq.rb +2 -0
  54. data/lib/elastic_apm/spies/sneakers.rb +2 -0
  55. data/lib/elastic_apm/spies/sucker_punch.rb +2 -0
  56. data/lib/elastic_apm/sql/signature.rb +4 -2
  57. data/lib/elastic_apm/sql/tokenizer.rb +2 -2
  58. data/lib/elastic_apm/stacktrace/frame.rb +1 -0
  59. data/lib/elastic_apm/stacktrace_builder.rb +2 -4
  60. data/lib/elastic_apm/trace_context.rb +0 -2
  61. data/lib/elastic_apm/trace_context/traceparent.rb +0 -2
  62. data/lib/elastic_apm/trace_context/tracestate.rb +7 -5
  63. data/lib/elastic_apm/transaction.rb +17 -4
  64. data/lib/elastic_apm/transport/connection.rb +1 -1
  65. data/lib/elastic_apm/transport/filters/hash_sanitizer.rb +8 -1
  66. data/lib/elastic_apm/transport/filters/secrets_filter.rb +32 -10
  67. data/lib/elastic_apm/transport/serializers.rb +1 -0
  68. data/lib/elastic_apm/transport/serializers/metadata_serializer.rb +23 -8
  69. data/lib/elastic_apm/transport/serializers/span_serializer.rb +2 -3
  70. data/lib/elastic_apm/transport/serializers/transaction_serializer.rb +1 -0
  71. data/lib/elastic_apm/util/deep_dup.rb +65 -0
  72. data/lib/elastic_apm/util/precision_validator.rb +1 -1
  73. data/lib/elastic_apm/version.rb +1 -1
  74. metadata +7 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bae79ddc57bfa8955a50f062b2305db04ed9618fa40011ec78341f62083487a3
4
- data.tar.gz: 176267b31455a0f491aaff4326e1274db3684aa878bf811b60b7f5195613a228
3
+ metadata.gz: f35288b7b9e691e200b5ae0183f6cc81ba40cb3cf520f11e3319e6a31461b8d2
4
+ data.tar.gz: '0487ec48ab081691b85d410711402a9777e9a2c815e5384148d2f33ee0d48e89'
5
5
  SHA512:
6
- metadata.gz: '089b563ba5cba6732bf75f6b29218e1b2cdf29f251c21c4c0abd577b4492fcea2c7ee24d5d616c6e8cec92f051cbbf551219e580846db48689fcf5c77c857b71'
7
- data.tar.gz: 28c4160d29e5af26bd388dfda7feacdbb0d484f522080e57b5aafc10041ed07b8c62b6c799a8a6676bb59fca3db643a9319fcb7afbe661788c37558454bd924c
6
+ metadata.gz: 17f18165f940d10a57a0fec94f1f9c5311e0d4c4769273f30a749c2512cc125f912f53b15b78f7a90bb5dc8e6c41dbdf7ecb7b9ecc669f581e0768e22d30771f
7
+ data.tar.gz: 0d2e0655d61495157b947d1ccd441511ee1508ba32b7acbe00dc6deeebd343efa708c6755afa9fc8a9f150cda3224eac52f42f7841c6eeb704bf40bb85c68fb2
@@ -2,4 +2,4 @@
2
2
  # Tuple of ruby version and frameworks which are in charge to send data to codecov.
3
3
  # # is the separator between the ruby version and the framework.
4
4
  ENABLED:
5
- - ruby:2.6#rails-6.0
5
+ - ruby:2.7#rails-6.1
@@ -2,91 +2,79 @@ exclude:
2
2
  # Ruby 2.3
3
3
  # Only includes rails-5.2, sinatra-2.0
4
4
  - RUBY_VERSION: ruby:2.3
5
- FRAMEWORK: rails-6.0
6
- - RUBY_VERSION: ruby:2.3
7
- FRAMEWORK: rails-5.1
5
+ FRAMEWORK: rails-6.1
8
6
  - RUBY_VERSION: ruby:2.3
9
- FRAMEWORK: rails-5.0
7
+ FRAMEWORK: rails-6.0
10
8
  - RUBY_VERSION: ruby:2.3
11
9
  FRAMEWORK: rails-4.2
12
10
  - RUBY_VERSION: ruby:2.3
13
11
  FRAMEWORK: sinatra-1.4
14
12
  - RUBY_VERSION: ruby:2.3
15
- FRAMEWORK: grape-1.3
13
+ FRAMEWORK: grape-1.5
16
14
  - RUBY_VERSION: ruby:2.3
17
- FRAMEWORK: grape-1.3,sinatra-2.0,rails-6.0
15
+ FRAMEWORK: grape-1.5,sinatra-2.0,rails-6.0
18
16
  - RUBY_VERSION: ruby:2.3
19
- FRAMEWORK: rails-master
17
+ FRAMEWORK: rails-main
20
18
  - RUBY_VERSION: ruby:2.3
21
19
  FRAMEWORK: sinatra-master
22
20
  - RUBY_VERSION: ruby:2.3
23
21
  FRAMEWORK: grape-master
24
22
 
23
+ # rails-4.2 exclusions
24
+ # Only test on ruby 2.6, 2.5, 2.4, 2.3
25
+ - RUBY_VERSION: ruby:3.0
26
+ FRAMEWORK: rails-4.2
25
27
  - RUBY_VERSION: ruby:2.7
26
28
  FRAMEWORK: rails-4.2
27
29
  - RUBY_VERSION: jruby:9.2
28
30
  FRAMEWORK: rails-4.2
29
- - RUBY_VERSION: jruby:9.1
30
- FRAMEWORK: rails-4.2
31
31
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-13-jdk
32
32
  FRAMEWORK: rails-4.2
33
- - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-12-jdk
34
- FRAMEWORK: rails-4.2
35
33
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-11-jdk
36
34
  FRAMEWORK: rails-4.2
37
35
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-8-jdk
38
36
  FRAMEWORK: rails-4.2
39
- - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.1-7-jdk
40
- FRAMEWORK: rails-4.2
41
37
 
38
+ # rails-6.0 and rails-6.1 exclusions
39
+ # Don't test on ruby 2.4
40
+ - RUBY_VERSION: ruby:2.4
41
+ FRAMEWORK: rails-6.1
42
42
  - RUBY_VERSION: ruby:2.4
43
- FRAMEWORK: rails-6.0
44
- - RUBY_VERSION: jruby:9.1
45
- FRAMEWORK: rails-6.0
46
- - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.1-7-jdk
47
43
  FRAMEWORK: rails-6.0
48
44
 
49
- # Only test master on newest ruby
45
+ # Only test rails master on ruby 2.7 and ruby 3.0
50
46
  - RUBY_VERSION: ruby:2.6
51
- FRAMEWORK: rails-master
47
+ FRAMEWORK: rails-main
52
48
  - RUBY_VERSION: ruby:2.5
53
- FRAMEWORK: rails-master
49
+ FRAMEWORK: rails-main
54
50
  - RUBY_VERSION: ruby:2.4
55
- FRAMEWORK: rails-master
51
+ FRAMEWORK: rails-main
56
52
  - RUBY_VERSION: jruby:9.2
57
- FRAMEWORK: rails-master
58
- - RUBY_VERSION: jruby:9.1
59
- FRAMEWORK: rails-master
53
+ FRAMEWORK: rails-main
60
54
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-13-jdk
61
- FRAMEWORK: rails-master
62
- - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-12-jdk
63
- FRAMEWORK: rails-master
55
+ FRAMEWORK: rails-main
64
56
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-11-jdk
65
- FRAMEWORK: rails-master
57
+ FRAMEWORK: rails-main
66
58
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-8-jdk
67
- FRAMEWORK: rails-master
68
- - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.1-7-jdk
69
- FRAMEWORK: rails-master
59
+ FRAMEWORK: rails-main
70
60
 
61
+ # Only test sinatra master on ruby 2.7 and ruby 3.0
62
+ - RUBY_VERSION: ruby:2.6
63
+ FRAMEWORK: sinatra-master
71
64
  - RUBY_VERSION: ruby:2.5
72
65
  FRAMEWORK: sinatra-master
73
66
  - RUBY_VERSION: ruby:2.4
74
67
  FRAMEWORK: sinatra-master
75
68
  - RUBY_VERSION: jruby:9.2
76
69
  FRAMEWORK: sinatra-master
77
- - RUBY_VERSION: jruby:9.1
78
- FRAMEWORK: sinatra-master
79
70
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-13-jdk
80
71
  FRAMEWORK: sinatra-master
81
- - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-12-jdk
82
- FRAMEWORK: sinatra-master
83
72
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-11-jdk
84
73
  FRAMEWORK: sinatra-master
85
74
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-8-jdk
86
75
  FRAMEWORK: sinatra-master
87
- - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.1-7-jdk
88
- FRAMEWORK: sinatra-master
89
76
 
77
+ # Only test grape master on ruby 2.7 and ruby 3.0
90
78
  - RUBY_VERSION: ruby:2.6
91
79
  FRAMEWORK: grape-master
92
80
  - RUBY_VERSION: ruby:2.5
@@ -95,42 +83,39 @@ exclude:
95
83
  FRAMEWORK: grape-master
96
84
  - RUBY_VERSION: jruby:9.2
97
85
  FRAMEWORK: grape-master
98
- - RUBY_VERSION: jruby:9.1
99
- FRAMEWORK: grape-master
100
86
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-13-jdk
101
87
  FRAMEWORK: grape-master
102
- - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-12-jdk
103
- FRAMEWORK: grape-master
104
88
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-11-jdk
105
89
  FRAMEWORK: grape-master
106
90
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-8-jdk
107
91
  FRAMEWORK: grape-master
108
- - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.1-7-jdk
109
- FRAMEWORK: grape-master
110
92
 
111
- # Unsupported
112
- - RUBY_VERSION: jruby:9.1
113
- FRAMEWORK: grape-1.3
114
- - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.1-7-jdk
115
- FRAMEWORK: grape-1.3
93
+ # grape 1.5 doesn't support ruby 3.0
94
+ - RUBY_VERSION: ruby:3.0
95
+ FRAMEWORK: grape-1.5
96
+ - RUBY_VERSION: ruby:3.0
97
+ FRAMEWORK: grape-1.5,sinatra-2.0,rails-6.1
98
+
99
+ # only test ruby 3.0 with rails 6.0 and rails 6.1
100
+ - RUBY_VERSION: ruby:3.0
101
+ FRAMEWORK: rails-5.2
102
+ - RUBY_VERSION: ruby:3.0
103
+ FRAMEWORK: rails-5.1
116
104
 
105
+ # Unsupported
117
106
  - RUBY_VERSION: ruby:2.6
118
- FRAMEWORK: grape-1.3,sinatra-2.0,rails-6.0
107
+ FRAMEWORK: grape-1.5,sinatra-2.0,rails-6.1
119
108
  - RUBY_VERSION: ruby:2.5
120
- FRAMEWORK: grape-1.3,sinatra-2.0,rails-6.0
109
+ FRAMEWORK: grape-1.5,sinatra-2.0,rails-6.1
121
110
  - RUBY_VERSION: ruby:2.4
122
- FRAMEWORK: grape-1.3,sinatra-2.0,rails-6.0
111
+ FRAMEWORK: grape-1.5,sinatra-2.0,rails-6.1
112
+ - RUBY_VERSION: ruby:2.3
113
+ FRAMEWORK: grape-1.5,sinatra-2.0,rails-6.1
123
114
  - RUBY_VERSION: jruby:9.2
124
- FRAMEWORK: grape-1.3,sinatra-2.0,rails-6.0
125
- - RUBY_VERSION: jruby:9.1
126
- FRAMEWORK: grape-1.3,sinatra-2.0,rails-6.0
115
+ FRAMEWORK: grape-1.5,sinatra-2.0,rails-6.1
127
116
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-13-jdk
128
- FRAMEWORK: grape-1.3,sinatra-2.0,rails-6.0
129
- - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-12-jdk
130
- FRAMEWORK: grape-1.3,sinatra-2.0,rails-6.0
117
+ FRAMEWORK: grape-1.5,sinatra-2.0,rails-6.1
131
118
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-11-jdk
132
- FRAMEWORK: grape-1.3,sinatra-2.0,rails-6.0
119
+ FRAMEWORK: grape-1.5,sinatra-2.0,rails-6.1
133
120
  - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-8-jdk
134
- FRAMEWORK: grape-1.3,sinatra-2.0,rails-6.0
135
- - RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.1-7-jdk
136
- FRAMEWORK: grape-1.3,sinatra-2.0,rails-6.0
121
+ FRAMEWORK: grape-1.5,sinatra-2.0,rails-6.1
@@ -1,13 +1,12 @@
1
1
  FRAMEWORK:
2
+ - rails-6.1
2
3
  - rails-6.0
3
4
  - rails-5.2
4
- - rails-5.1
5
- - rails-5.0
6
5
  - rails-4.2
7
6
 
8
7
  - sinatra-2.0
9
8
  - sinatra-1.4
10
9
 
11
- - grape-1.3
10
+ - grape-1.5
12
11
 
13
- - grape-1.3,sinatra-2.0,rails-6.0
12
+ - grape-1.5,sinatra-2.0,rails-6.1
@@ -1,4 +1,4 @@
1
1
  FRAMEWORK:
2
- - rails-master
2
+ - rails-main
3
3
  - sinatra-master
4
4
  - grape-master
@@ -1,13 +1,11 @@
1
1
  RUBY_VERSION:
2
+ - ruby:3.0
2
3
  - ruby:2.7
3
4
  - ruby:2.6
4
5
  - ruby:2.5
5
6
  - ruby:2.4
6
7
  - ruby:2.3
7
8
  - jruby:9.2
8
- - jruby:9.1
9
9
  - docker.elastic.co/observability-ci/jruby:9.2-13-jdk
10
- - docker.elastic.co/observability-ci/jruby:9.2-12-jdk
11
10
  - docker.elastic.co/observability-ci/jruby:9.2-11-jdk
12
11
  - docker.elastic.co/observability-ci/jruby:9.2-8-jdk
13
- - docker.elastic.co/observability-ci/jruby:9.1-7-jdk
data/.ci/Jenkinsfile CHANGED
@@ -26,6 +26,7 @@ pipeline {
26
26
  RELEASE_SECRET = 'secret/apm-team/ci/apm-agent-ruby-rubygems-release'
27
27
  OPBEANS_REPO = 'opbeans-ruby'
28
28
  REFERENCE_REPO = '/var/lib/jenkins/.git-references/apm-agent-ruby.git'
29
+ SLACK_CHANNEL = '#apm-agent-ruby'
29
30
  }
30
31
  options {
31
32
  timeout(time: 2, unit: 'HOURS')
@@ -206,6 +207,12 @@ pipeline {
206
207
  tag pattern: 'v\\d+.*', comparator: 'REGEXP'
207
208
  }
208
209
  stages {
210
+ stage('Notify') {
211
+ steps {
212
+ notifyStatus(slackStatus: 'warning', subject: "[${env.REPO}] Release *${env.TAG_NAME}* ready to be pushed",
213
+ body: "(<${env.RUN_DISPLAY_URL}|Open>).\n Changes: ${env.TAG_NAME}")
214
+ }
215
+ }
209
216
  stage('Release') {
210
217
  steps {
211
218
  deleteDir()
@@ -226,9 +233,13 @@ pipeline {
226
233
  }
227
234
  }
228
235
  post {
236
+ success {
237
+ notifyStatus(slackStatus: 'good', subject: "[${env.REPO}] Release *${env.TAG_NAME}* published",
238
+ body: "Great news, the release has been done successfully. (<${env.RUN_DISPLAY_URL}|Open>).")
239
+ }
229
240
  unsuccessful {
230
- emailext subject: "[${env.REPO}] Syncup post-release stage failed.", to: "${NOTIFY_TO}",
231
- body: "Please go to ${env.BUILD_URL} to review the logs. Most likely you need to update the branch manually."
241
+ notifyStatus(slackStatus: 'warning', subject: "[${env.REPO}] Release *${env.TAG_NAME}* has some sync-up post-release failures.",
242
+ body: "Please go to ${env.BUILD_URL} to review the logs. Most likely you need to update the branch manually. (<${env.RUN_DISPLAY_URL}|Open>)")
232
243
  }
233
244
  }
234
245
  }
@@ -417,3 +428,12 @@ def prepareRelease(Closure body){
417
428
  def normalise(def what) {
418
429
  return what.replaceAll('.*/', '').replaceAll(':', '-')
419
430
  }
431
+
432
+ def notifyStatus(def args = [:]) {
433
+ releaseNotification(slackChannel: "${env.SLACK_CHANNEL}",
434
+ slackColor: args.slackStatus,
435
+ slackCredentialsId: 'jenkins-slack-integration-token',
436
+ to: "${env.NOTIFY_TO}",
437
+ subject: args.subject,
438
+ body: args.body)
439
+ }
@@ -2,6 +2,7 @@ FROM openjdk:11-jdk
2
2
 
3
3
  RUN apt-get update \
4
4
  && apt-get install -y libc6-dev --no-install-recommends \
5
+ && apt-get install -y gcc \
5
6
  && rm -rf /var/lib/apt/lists/*
6
7
 
7
8
  ENV JRUBY_VERSION 9.2.10.0
@@ -37,4 +38,4 @@ ENV PATH $BUNDLE_BIN:$PATH
37
38
  RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
38
39
  && chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
39
40
 
40
- CMD [ "irb" ]
41
+ CMD [ "irb" ]
@@ -2,6 +2,7 @@ FROM adoptopenjdk:12-jdk-openj9
2
2
 
3
3
  RUN apt-get update \
4
4
  && apt-get install -y libc6-dev git tcc netbase --no-install-recommends \
5
+ && apt-get install -y gcc \
5
6
  && rm -rf /var/lib/apt/lists/*
6
7
 
7
8
  ENV JRUBY_VERSION 9.2.10.0
@@ -37,4 +38,4 @@ ENV PATH $BUNDLE_BIN:$PATH
37
38
  RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
38
39
  && chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
39
40
 
40
- CMD [ "irb" ]
41
+ CMD [ "irb" ]
@@ -2,6 +2,7 @@ FROM openjdk:13-jdk-slim
2
2
 
3
3
  RUN apt-get update \
4
4
  && apt-get install -y libc6-dev git tcc curl netbase --no-install-recommends \
5
+ && apt-get install -y gcc \
5
6
  && rm -rf /var/lib/apt/lists/*
6
7
 
7
8
  ENV JRUBY_VERSION 9.2.10.0
@@ -37,4 +38,4 @@ ENV PATH $BUNDLE_BIN:$PATH
37
38
  RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
38
39
  && chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
39
40
 
40
- CMD [ "irb" ]
41
+ CMD [ "irb" ]
@@ -2,6 +2,7 @@ FROM openjdk:7-jdk
2
2
 
3
3
  RUN apt-get update \
4
4
  && apt-get install -y libc6-dev --no-install-recommends \
5
+ && apt-get install -y gcc \
5
6
  && rm -rf /var/lib/apt/lists/*
6
7
 
7
8
  ENV JRUBY_VERSION 9.1.17.0
@@ -37,4 +38,4 @@ ENV PATH $BUNDLE_BIN:$PATH
37
38
  RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
38
39
  && chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
39
40
 
40
- CMD [ "irb" ]
41
+ CMD [ "irb" ]
@@ -2,6 +2,7 @@ FROM openjdk:8-jdk
2
2
 
3
3
  RUN apt-get update \
4
4
  && apt-get install -y libc6-dev --no-install-recommends \
5
+ && apt-get install -y gcc \
5
6
  && rm -rf /var/lib/apt/lists/*
6
7
 
7
8
  ENV JRUBY_VERSION 9.2.10.0
@@ -37,4 +38,4 @@ ENV PATH $BUNDLE_BIN:$PATH
37
38
  RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
38
39
  && chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
39
40
 
40
- CMD [ "irb" ]
41
+ CMD [ "irb" ]
@@ -0,0 +1,3 @@
1
+ # add 'agent-ruby' label to all new issues
2
+ agent-ruby:
3
+ - '.*'
@@ -0,0 +1,29 @@
1
+ name: Auto Assign to Project(s)
2
+
3
+ on:
4
+ issues:
5
+ types: [opened, edited, milestoned]
6
+ pull_request_target:
7
+ types: [opened, edited, milestoned]
8
+ env:
9
+ MY_GITHUB_TOKEN: ${{ secrets.APM_TECH_USER_TOKEN }}
10
+
11
+ jobs:
12
+ assign_one_project:
13
+ runs-on: ubuntu-latest
14
+ name: Assign milestoned to Project
15
+ steps:
16
+ - name: Assign issues with milestones to project
17
+ uses: elastic/assign-one-project-github-action@1.2.2
18
+ if: github.event.issue && github.event.issue.milestone
19
+ with:
20
+ project: 'https://github.com/orgs/elastic/projects/454'
21
+ project_id: '5882982'
22
+ column_name: 'Planned'
23
+ - name: Assign new pull requests to project
24
+ uses: elastic/assign-one-project-github-action@1.2.2
25
+ if: github.event.action == 'opened' && github.event.pull_request
26
+ with:
27
+ project: 'https://github.com/orgs/elastic/projects/454'
28
+ project_id: '5882982'
29
+ column_name: 'In Progress'
@@ -0,0 +1,16 @@
1
+ name: "Issue Labeler"
2
+ on:
3
+ issues:
4
+ types: [opened]
5
+ pull_request_target:
6
+ types: [opened]
7
+
8
+ jobs:
9
+ triage:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: AlexanderWert/issue-labeler@v2.3
13
+ with:
14
+ repo-token: "${{ secrets.GITHUB_TOKEN }}"
15
+ configuration-path: .github/labeler-config.yml
16
+ enable-versioned-regex: 0
data/.rubocop.yml CHANGED
@@ -1,11 +1,13 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.3
2
+ TargetRubyVersion: 2.4
3
+ NewCops: enable
3
4
  Exclude:
4
5
  - 'elastic-apm.gemspec'
5
6
  - 'vendor/**/*'
6
7
  - 'bench/*'
7
8
  - 'spec/support/helloworld_pb.rb'
8
9
  - 'spec/support/helloworld_services_pb.rb'
10
+ - 'features/step_definitions/stepdefs.rb'
9
11
 
10
12
  require:
11
13
  - rubocop-performance
@@ -32,6 +34,15 @@ Lint/RescueException:
32
34
  Lint/SuppressedException:
33
35
  Enabled: false
34
36
 
37
+ Lint/ConstantDefinitionInBlock: # So we can define a class in an rspec block
38
+ Enabled: false
39
+
40
+ Lint/EmptyClass:
41
+ Enabled: false
42
+
43
+ Lint/NoReturnInBeginEndBlocks:
44
+ Enabled: false
45
+
35
46
  # Metrics /
36
47
 
37
48
  Metrics/AbcSize:
@@ -104,9 +115,27 @@ Style/HashEachMethods:
104
115
  Style/HashTransformKeys:
105
116
  Enabled: true
106
117
 
107
- Style/HashTransformValues:
108
- Enabled: true
109
-
110
118
  Style/FrozenStringLiteralComment:
111
119
  Enabled: false
112
120
 
121
+ Style/StringLiterals:
122
+ Enabled: false
123
+
124
+ Style/RescueStandardError:
125
+ Enabled: false
126
+
127
+ Style/SoleNestedConditional:
128
+ Enabled: false
129
+
130
+ Style/StringConcatenation:
131
+ Enabled: false
132
+
133
+ Style/DocumentDynamicEvalDefinition:
134
+ Enabled: false
135
+
136
+ # Applies to > ruby 2.3, enable when 2.3 support is dropped
137
+ Performance/RegexpMatch:
138
+ Enabled: false
139
+
140
+ Style/HashTransformValues:
141
+ Enabled: false