elastic-apm 3.13.0 → 3.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ci/.jenkins_codecov.yml +1 -1
- data/.ci/.jenkins_exclude.yml +46 -61
- data/.ci/.jenkins_framework.yml +3 -4
- data/.ci/.jenkins_master_framework.yml +1 -1
- data/.ci/.jenkins_ruby.yml +1 -3
- data/.ci/Jenkinsfile +22 -2
- data/.ci/docker/jruby/11-jdk/Dockerfile +2 -1
- data/.ci/docker/jruby/12-jdk/Dockerfile +2 -1
- data/.ci/docker/jruby/13-jdk/Dockerfile +2 -1
- data/.ci/docker/jruby/7-jdk/Dockerfile +2 -1
- data/.ci/docker/jruby/8-jdk/Dockerfile +2 -1
- data/.github/workflows/addToProject.yml +29 -0
- data/CHANGELOG.asciidoc +14 -0
- data/Gemfile +19 -6
- data/docs/configuration.asciidoc +17 -0
- data/docs/supported-technologies.asciidoc +2 -0
- data/lib/elastic_apm/config.rb +5 -2
- data/lib/elastic_apm/normalizers/rails/active_record.rb +16 -4
- data/lib/elastic_apm/span/context/http.rb +2 -0
- data/lib/elastic_apm/spies/delayed_job.rb +6 -2
- data/lib/elastic_apm/spies/faraday.rb +14 -9
- data/lib/elastic_apm/spies/mongo.rb +8 -4
- data/lib/elastic_apm/spies/net_http.rb +1 -1
- data/lib/elastic_apm/transport/serializers/metadata_serializer.rb +2 -1
- data/lib/elastic_apm/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f35288b7b9e691e200b5ae0183f6cc81ba40cb3cf520f11e3319e6a31461b8d2
|
4
|
+
data.tar.gz: '0487ec48ab081691b85d410711402a9777e9a2c815e5384148d2f33ee0d48e89'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17f18165f940d10a57a0fec94f1f9c5311e0d4c4769273f30a749c2512cc125f912f53b15b78f7a90bb5dc8e6c41dbdf7ecb7b9ecc669f581e0768e22d30771f
|
7
|
+
data.tar.gz: 0d2e0655d61495157b947d1ccd441511ee1508ba32b7acbe00dc6deeebd343efa708c6755afa9fc8a9f150cda3224eac52f42f7841c6eeb704bf40bb85c68fb2
|
data/.ci/.jenkins_codecov.yml
CHANGED
data/.ci/.jenkins_exclude.yml
CHANGED
@@ -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.
|
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-
|
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.
|
13
|
+
FRAMEWORK: grape-1.5
|
16
14
|
- RUBY_VERSION: ruby:2.3
|
17
|
-
FRAMEWORK: grape-1.
|
15
|
+
FRAMEWORK: grape-1.5,sinatra-2.0,rails-6.0
|
18
16
|
- RUBY_VERSION: ruby:2.3
|
19
|
-
FRAMEWORK: rails-
|
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
|
45
|
+
# Only test rails master on ruby 2.7 and ruby 3.0
|
50
46
|
- RUBY_VERSION: ruby:2.6
|
51
|
-
FRAMEWORK: rails-
|
47
|
+
FRAMEWORK: rails-main
|
52
48
|
- RUBY_VERSION: ruby:2.5
|
53
|
-
FRAMEWORK: rails-
|
49
|
+
FRAMEWORK: rails-main
|
54
50
|
- RUBY_VERSION: ruby:2.4
|
55
|
-
FRAMEWORK: rails-
|
51
|
+
FRAMEWORK: rails-main
|
56
52
|
- RUBY_VERSION: jruby:9.2
|
57
|
-
FRAMEWORK: rails-
|
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-
|
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-
|
57
|
+
FRAMEWORK: rails-main
|
66
58
|
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-8-jdk
|
67
|
-
FRAMEWORK: rails-
|
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
|
-
#
|
112
|
-
- RUBY_VERSION:
|
113
|
-
FRAMEWORK: grape-1.
|
114
|
-
- RUBY_VERSION:
|
115
|
-
FRAMEWORK: grape-1.
|
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.
|
107
|
+
FRAMEWORK: grape-1.5,sinatra-2.0,rails-6.1
|
119
108
|
- RUBY_VERSION: ruby:2.5
|
120
|
-
FRAMEWORK: grape-1.
|
109
|
+
FRAMEWORK: grape-1.5,sinatra-2.0,rails-6.1
|
121
110
|
- RUBY_VERSION: ruby:2.4
|
122
|
-
FRAMEWORK: grape-1.
|
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.
|
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.
|
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.
|
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.
|
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
|
data/.ci/.jenkins_framework.yml
CHANGED
data/.ci/.jenkins_ruby.yml
CHANGED
@@ -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
|
-
|
231
|
-
|
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,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'
|
data/CHANGELOG.asciidoc
CHANGED
@@ -35,6 +35,20 @@ endif::[]
|
|
35
35
|
[[release-notes-3.x]]
|
36
36
|
=== Ruby Agent version 3.x
|
37
37
|
|
38
|
+
[[release-notes-3.14.0]]
|
39
|
+
==== 3.14.0 (2021-03-17)
|
40
|
+
|
41
|
+
[float]
|
42
|
+
===== Added
|
43
|
+
- Expanded support for extracting ActiveRecord adapter name from notification payload when using ActiveRecord versions before 6.0 {pull}953[#953]
|
44
|
+
|
45
|
+
[float]
|
46
|
+
===== Fixed
|
47
|
+
|
48
|
+
- Fixed setting outcome in Mongo spy when not traced {pull}937[#937]
|
49
|
+
- Fixed missing container metadata in payloads {pull}942[#942]
|
50
|
+
- Fixed outgoing HTTP request spans with no Host {pull}962[#962]
|
51
|
+
|
38
52
|
[[release-notes-3.13.0]]
|
39
53
|
==== 3.13.0 (2020-12-22)
|
40
54
|
|
data/Gemfile
CHANGED
@@ -23,7 +23,6 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
|
23
23
|
|
24
24
|
# Tools
|
25
25
|
gem 'cucumber', require: false
|
26
|
-
gem 'pry'
|
27
26
|
gem 'rack-test'
|
28
27
|
gem 'rspec', '~> 3'
|
29
28
|
gem 'rspec-its'
|
@@ -40,7 +39,7 @@ gem 'graphql', require: nil
|
|
40
39
|
if !defined?(JRUBY_VERSION) && RUBY_VERSION < '2.5'
|
41
40
|
gem 'google-protobuf', '< 3.12'
|
42
41
|
end
|
43
|
-
gem 'grpc'
|
42
|
+
gem 'grpc' if !defined?(JRUBY_VERSION) && RUBY_VERSION < '3.0'
|
44
43
|
gem 'json'
|
45
44
|
gem 'json-schema', require: nil
|
46
45
|
gem 'mongo', require: nil
|
@@ -57,6 +56,10 @@ gem 'sucker_punch', '~> 2.0', require: nil
|
|
57
56
|
gem 'yard', require: nil
|
58
57
|
gem 'yarjuf'
|
59
58
|
|
59
|
+
# See issue #6547 in the JRuby repo. When that bug is fixed,
|
60
|
+
# we can use the latest version of the i18n gem.
|
61
|
+
gem 'i18n', '< 1.8.8'
|
62
|
+
|
60
63
|
## Install Framework
|
61
64
|
GITHUB_REPOS = {
|
62
65
|
'grape' => 'ruby-grape/grape',
|
@@ -74,8 +77,10 @@ end
|
|
74
77
|
|
75
78
|
frameworks_versions.each do |framework, version|
|
76
79
|
case version
|
77
|
-
when 'master'
|
80
|
+
when 'master' # sinatra, grape
|
78
81
|
gem framework, github: GITHUB_REPOS.fetch(framework)
|
82
|
+
when 'main' # rails
|
83
|
+
gem framework, github: GITHUB_REPOS.fetch(framework), branch: 'main'
|
79
84
|
when /.+/
|
80
85
|
gem framework, "~> #{version}.0"
|
81
86
|
else
|
@@ -84,14 +89,22 @@ frameworks_versions.each do |framework, version|
|
|
84
89
|
end
|
85
90
|
|
86
91
|
if frameworks_versions.key?('rails')
|
87
|
-
unless frameworks_versions['rails'] =~ /^(
|
92
|
+
unless frameworks_versions['rails'] =~ /^(main|6)/
|
88
93
|
gem 'delayed_job', require: nil
|
89
94
|
end
|
90
95
|
end
|
91
96
|
|
92
97
|
if RUBY_PLATFORM == 'java'
|
93
|
-
|
94
|
-
|
98
|
+
case rails = frameworks_versions['rails']
|
99
|
+
when 'main'
|
100
|
+
gem 'activerecord-jdbcsqlite3-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', glob: 'activerecord-jdbcsqlite3-adapter/*.gemspec'
|
101
|
+
when ''
|
102
|
+
gem 'activerecord-jdbcsqlite3-adapter', "~> 61.0"
|
103
|
+
when nil
|
104
|
+
gem 'jdbc-sqlite3'
|
105
|
+
else
|
106
|
+
gem 'activerecord-jdbcsqlite3-adapter', "~> #{rails.tr('.', '')}.0"
|
107
|
+
end
|
95
108
|
elsif frameworks_versions['rails'] =~ /^(4|5)/
|
96
109
|
gem 'sqlite3', '~> 1.3.6'
|
97
110
|
else
|
data/docs/configuration.asciidoc
CHANGED
@@ -322,6 +322,23 @@ Usually APM Server determines how often to poll, but if not the default interval
|
|
322
322
|
|
323
323
|
NOTE: This feature requires APM Server v7.3 or later and that the APM Server is configured with `kibana.enabled: true`.
|
324
324
|
|
325
|
+
[float]
|
326
|
+
[[config-cloud-provider]]
|
327
|
+
==== `cloud_provider`
|
328
|
+
|============
|
329
|
+
| Environment | `Config` key | Default
|
330
|
+
| `ELASTIC_APM_CLOUD_PROVIDER` | `cloud_provider` | `"auto"`
|
331
|
+
|============
|
332
|
+
|
333
|
+
Specify the cloud provider for metadata collection.
|
334
|
+
Defaults to `"auto"`, which means the agent uses trial and
|
335
|
+
error to collect metadata from all supported cloud providers.
|
336
|
+
|
337
|
+
Valid options are `"auto"`, `"aws"`, `"gcp"`, `"azure"`, and `"none"`.
|
338
|
+
If set to `"none"`, no cloud metadata will be collected.
|
339
|
+
If set to any of `"aws"`, `"gcp"`, or `"azure"`,
|
340
|
+
attempts to collect metadata will only be performed from the chosen provider.
|
341
|
+
|
325
342
|
[float]
|
326
343
|
[[config-custom-key-filters]]
|
327
344
|
==== `custom_key_filters` deprecated:[3.5.0,See <<config-sanitize-field-names>> instead.]
|
@@ -77,6 +77,8 @@ requests using these libraries:
|
|
77
77
|
- Http.rb (v0.6+)
|
78
78
|
- Faraday (v0.2.1+)
|
79
79
|
|
80
|
+
*Note:* These libraries usually assume `localhost` if no `Host` is specified, so the agent does as well.
|
81
|
+
|
80
82
|
[float]
|
81
83
|
[[supported-technologies-backgroud-processing]]
|
82
84
|
=== Background Processing
|
data/lib/elastic_apm/config.rb
CHANGED
@@ -303,8 +303,11 @@ module ElasticAPM
|
|
303
303
|
end
|
304
304
|
|
305
305
|
def server_ca_cert=(value)
|
306
|
-
|
307
|
-
'
|
306
|
+
unless value == self.class.schema[:server_ca_cert_file][:default]
|
307
|
+
warn '[DEPRECATED] The option server_ca_cert has been ' \
|
308
|
+
'renamed to server_ca_cert_file to align with other agents.'
|
309
|
+
end
|
310
|
+
|
308
311
|
self.server_ca_cert_file = value
|
309
312
|
end
|
310
313
|
|
@@ -57,10 +57,17 @@ module ElasticAPM
|
|
57
57
|
private
|
58
58
|
|
59
59
|
def subtype_for(payload)
|
60
|
-
cached_adapter_name(
|
61
|
-
|
62
|
-
|
63
|
-
|
60
|
+
return cached_adapter_name(payload[:connection].adapter_name) if payload[:connection]
|
61
|
+
|
62
|
+
if can_attempt_connection_id_lookup?(payload)
|
63
|
+
begin
|
64
|
+
loaded_object = ObjectSpace._id2ref(payload[:connection_id])
|
65
|
+
return cached_adapter_name(loaded_object.adapter_name) if loaded_object.respond_to?(:adapter_name)
|
66
|
+
rescue RangeError # if connection object has somehow been garbage collected
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
cached_adapter_name(::ActiveRecord::Base.connection_config[:adapter])
|
64
71
|
end
|
65
72
|
|
66
73
|
def summarize(sql)
|
@@ -69,11 +76,16 @@ module ElasticAPM
|
|
69
76
|
|
70
77
|
def cached_adapter_name(adapter_name)
|
71
78
|
return UNKNOWN if adapter_name.nil? || adapter_name.empty?
|
79
|
+
|
72
80
|
@adapters[adapter_name] ||
|
73
81
|
(@adapters[adapter_name] = adapter_name.downcase)
|
74
82
|
rescue StandardError
|
75
83
|
nil
|
76
84
|
end
|
85
|
+
|
86
|
+
def can_attempt_connection_id_lookup?(payload)
|
87
|
+
RUBY_ENGINE == "ruby" && payload[:connection_id] && ObjectSpace.respond_to?(:_id2ref)
|
88
|
+
end
|
77
89
|
end
|
78
90
|
end
|
79
91
|
end
|
@@ -38,7 +38,7 @@ module ElasticAPM
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def self.invoke_job(job, *args, &block)
|
41
|
-
job_name =
|
41
|
+
job_name = job_name(job)
|
42
42
|
transaction = ElasticAPM.start_transaction(job_name, TYPE)
|
43
43
|
job.invoke_job_without_apm(*args, &block)
|
44
44
|
transaction&.done 'success'
|
@@ -52,7 +52,9 @@ module ElasticAPM
|
|
52
52
|
ElasticAPM.end_transaction
|
53
53
|
end
|
54
54
|
|
55
|
-
def self.
|
55
|
+
def self.job_name(job)
|
56
|
+
payload_object = job.payload_object
|
57
|
+
|
56
58
|
if payload_object.is_a?(::Delayed::PerformableMethod)
|
57
59
|
performable_method_name(payload_object)
|
58
60
|
elsif payload_object.instance_of?(
|
@@ -62,6 +64,8 @@ module ElasticAPM
|
|
62
64
|
else
|
63
65
|
payload_object.class.name
|
64
66
|
end
|
67
|
+
rescue
|
68
|
+
job.name
|
65
69
|
end
|
66
70
|
|
67
71
|
def self.performable_method_name(payload_object)
|
@@ -55,20 +55,25 @@ module ElasticAPM
|
|
55
55
|
tmp_request = build_request(method) do |req|
|
56
56
|
yield(req) if block_given?
|
57
57
|
end
|
58
|
-
uri = URI(tmp_request.path)
|
58
|
+
uri = tmp_request.path && URI(tmp_request.path)
|
59
59
|
end
|
60
60
|
|
61
|
-
host = uri
|
61
|
+
host = uri&.host || 'localhost'
|
62
62
|
|
63
63
|
upcased_method = method.to_s.upcase
|
64
64
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
65
|
+
if uri
|
66
|
+
destination = ElasticAPM::Span::Context::Destination.from_uri(uri)
|
67
|
+
|
68
|
+
context =
|
69
|
+
ElasticAPM::Span::Context.new(
|
70
|
+
http: { url: uri, method: upcased_method },
|
71
|
+
destination: destination
|
72
|
+
)
|
73
|
+
else
|
74
|
+
context =
|
75
|
+
ElasticAPM::Span::Context.new(http: { url: uri, method: upcased_method })
|
76
|
+
end
|
72
77
|
|
73
78
|
ElasticAPM.with_span(
|
74
79
|
"#{upcased_method} #{host}",
|
@@ -44,14 +44,18 @@ module ElasticAPM
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def failed(event)
|
47
|
-
span = pop_event(event)
|
48
|
-
|
47
|
+
if (span = pop_event(event))
|
48
|
+
span.outcome = Span::Outcome::FAILURE
|
49
|
+
end
|
50
|
+
|
49
51
|
span
|
50
52
|
end
|
51
53
|
|
52
54
|
def succeeded(event)
|
53
|
-
span = pop_event(event)
|
54
|
-
|
55
|
+
if span = pop_event(event)
|
56
|
+
span.outcome = Span::Outcome::SUCCESS
|
57
|
+
end
|
58
|
+
|
55
59
|
span
|
56
60
|
end
|
57
61
|
|
@@ -61,7 +61,7 @@ module ElasticAPM
|
|
61
61
|
return request_without_apm(req, body, &block)
|
62
62
|
end
|
63
63
|
|
64
|
-
host = req['host']&.split(':')&.first || address
|
64
|
+
host = req['host']&.split(':')&.first || address || 'localhost'
|
65
65
|
method = req.method.to_s.upcase
|
66
66
|
path, query = req.path.split('?')
|
67
67
|
|
@@ -84,7 +84,8 @@ module ElasticAPM
|
|
84
84
|
hostname: keyword_field(system.hostname),
|
85
85
|
architecture: keyword_field(system.architecture),
|
86
86
|
platform: keyword_field(system.platform),
|
87
|
-
kubernetes: keyword_object(system.kubernetes)
|
87
|
+
kubernetes: keyword_object(system.kubernetes),
|
88
|
+
container: keyword_object(system.container)
|
88
89
|
}
|
89
90
|
end
|
90
91
|
|
data/lib/elastic_apm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic-apm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikkel Malmberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- ".github/ISSUE_TEMPLATE/Feature_request.md"
|
71
71
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
72
72
|
- ".github/labeler-config.yml"
|
73
|
+
- ".github/workflows/addToProject.yml"
|
73
74
|
- ".github/workflows/labeler.yml"
|
74
75
|
- ".gitignore"
|
75
76
|
- ".pre-commit-config.yaml"
|