elastic-apm 2.9.0 → 2.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ci/.jenkins_exclude.yml +73 -0
- data/.ci/.jenkins_framework.yml +12 -0
- data/.ci/.jenkins_ruby.yml +11 -0
- data/{Jenkinsfile → .ci/Jenkinsfile} +5 -5
- data/.ci/downstreamTests.groovy +159 -0
- data/.ci/jobs/apm-agent-ruby-downstream.yml +6 -0
- data/.ci/jobs/apm-agent-ruby-mbp.yml +1 -0
- data/.ci/jobs/defaults.yml +3 -3
- data/CHANGELOG.md +6 -0
- data/lib/elastic_apm/transport/connection.rb +3 -0
- data/lib/elastic_apm/version.rb +1 -1
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47f1adcea0273ee666706ddea65216aa0d8ba4d15acb14be64a425b77e1c188c
|
4
|
+
data.tar.gz: 7aa7372590f8c43585681cb84464af8bf984557699c43c09a4614f71e0cfc8b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4afe772c0f242885882347f6c5ed3b6e319c533ab24f88e52ab3e5c68be16c33243529a642ff3644936218808b7163e7c60536c3632aa11c28d8072efc3ca21
|
7
|
+
data.tar.gz: 49a6baa392426cb6f51b1327b23fc0f0d7257685c26737e222613595fb68be80b44f00b39d309535b918315e7138ba48ae9100837a92160c62265bafa2140764
|
@@ -0,0 +1,73 @@
|
|
1
|
+
exclude:
|
2
|
+
# Tests fail, but we don't care
|
3
|
+
- RUBY_VERSION: jruby:9.2
|
4
|
+
FRAMEWORK: rails-4.2
|
5
|
+
- RUBY_VERSION: jruby:9.1
|
6
|
+
FRAMEWORK: rails-4.2
|
7
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-12-jdk
|
8
|
+
FRAMEWORK: rails-4.2
|
9
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-11-jdk
|
10
|
+
FRAMEWORK: rails-4.2
|
11
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-8-jdk
|
12
|
+
FRAMEWORK: rails-4.2
|
13
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.1-7-jdk
|
14
|
+
FRAMEWORK: rails-4.2
|
15
|
+
|
16
|
+
# Only test master on newest ruby
|
17
|
+
- RUBY_VERSION: ruby:2.5
|
18
|
+
FRAMEWORK: rails-master
|
19
|
+
- RUBY_VERSION: ruby:2.4
|
20
|
+
FRAMEWORK: rails-master
|
21
|
+
- RUBY_VERSION: ruby:2.3
|
22
|
+
FRAMEWORK: rails-master
|
23
|
+
- RUBY_VERSION: jruby:9.2
|
24
|
+
FRAMEWORK: rails-master
|
25
|
+
- RUBY_VERSION: jruby:9.1
|
26
|
+
FRAMEWORK: rails-master
|
27
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-12-jdk
|
28
|
+
FRAMEWORK: rails-master
|
29
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-11-jdk
|
30
|
+
FRAMEWORK: rails-master
|
31
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-8-jdk
|
32
|
+
FRAMEWORK: rails-master
|
33
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.1-7-jdk
|
34
|
+
FRAMEWORK: rails-master
|
35
|
+
|
36
|
+
- RUBY_VERSION: ruby:2.5
|
37
|
+
FRAMEWORK: sinatra-master
|
38
|
+
- RUBY_VERSION: ruby:2.4
|
39
|
+
FRAMEWORK: sinatra-master
|
40
|
+
- RUBY_VERSION: ruby:2.3
|
41
|
+
FRAMEWORK: sinatra-master
|
42
|
+
- RUBY_VERSION: jruby:9.2
|
43
|
+
FRAMEWORK: sinatra-master
|
44
|
+
- RUBY_VERSION: jruby:9.1
|
45
|
+
FRAMEWORK: sinatra-master
|
46
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-12-jdk
|
47
|
+
FRAMEWORK: sinatra-master
|
48
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-11-jdk
|
49
|
+
FRAMEWORK: sinatra-master
|
50
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-8-jdk
|
51
|
+
FRAMEWORK: sinatra-master
|
52
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.1-7-jdk
|
53
|
+
FRAMEWORK: sinatra-master
|
54
|
+
|
55
|
+
# Rails 6 beta
|
56
|
+
- RUBY_VERSION: ruby:2.5
|
57
|
+
FRAMEWORK: rails-6.0-rc1
|
58
|
+
- RUBY_VERSION: ruby:2.4
|
59
|
+
FRAMEWORK: rails-6.0-rc1
|
60
|
+
- RUBY_VERSION: ruby:2.3
|
61
|
+
FRAMEWORK: rails-6.0-rc1
|
62
|
+
- RUBY_VERSION: jruby:9.2
|
63
|
+
FRAMEWORK: rails-6.0-rc1
|
64
|
+
- RUBY_VERSION: jruby:9.1
|
65
|
+
FRAMEWORK: rails-6.0-rc1
|
66
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-12-jdk
|
67
|
+
FRAMEWORK: rails-6.0-rc1
|
68
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-11-jdk
|
69
|
+
FRAMEWORK: rails-6.0-rc1
|
70
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.2-8-jdk
|
71
|
+
FRAMEWORK: rails-6.0-rc1
|
72
|
+
- RUBY_VERSION: docker.elastic.co/observability-ci/jruby:9.1-7-jdk
|
73
|
+
FRAMEWORK: rails-6.0-rc1
|
@@ -0,0 +1,11 @@
|
|
1
|
+
RUBY_VERSION:
|
2
|
+
- ruby:2.6
|
3
|
+
- ruby:2.5
|
4
|
+
- ruby:2.4
|
5
|
+
- ruby:2.3
|
6
|
+
- jruby:9.2
|
7
|
+
- jruby:9.1
|
8
|
+
- docker.elastic.co/observability-ci/jruby:9.2-12-jdk
|
9
|
+
- docker.elastic.co/observability-ci/jruby:9.2-11-jdk
|
10
|
+
- docker.elastic.co/observability-ci/jruby:9.2-8-jdk
|
11
|
+
- docker.elastic.co/observability-ci/jruby:9.1-7-jdk
|
@@ -70,9 +70,9 @@ pipeline {
|
|
70
70
|
rubyTasksGen = new RubyParallelTaskGenerator(
|
71
71
|
xKey: 'RUBY_VERSION',
|
72
72
|
yKey: 'FRAMEWORK',
|
73
|
-
xFile: "
|
74
|
-
yFile: "
|
75
|
-
exclusionFile: "
|
73
|
+
xFile: ".ci/.jenkins_ruby.yml",
|
74
|
+
yFile: ".ci/.jenkins_framework.yml",
|
75
|
+
exclusionFile: ".ci/.jenkins_exclude.yml",
|
76
76
|
tag: "Ruby",
|
77
77
|
name: "Ruby",
|
78
78
|
steps: this
|
@@ -123,7 +123,7 @@ pipeline {
|
|
123
123
|
unstash 'source'
|
124
124
|
dir("${BASE_DIR}"){
|
125
125
|
script {
|
126
|
-
def versions = readYaml(file: "
|
126
|
+
def versions = readYaml(file: ".ci/.jenkins_ruby.yml")
|
127
127
|
def benchmarkTask = [:]
|
128
128
|
versions['RUBY_VERSION'].each{ v ->
|
129
129
|
benchmarkTask[v] = runBenchmark(v)
|
@@ -185,7 +185,7 @@ pipeline {
|
|
185
185
|
}
|
186
186
|
}
|
187
187
|
post {
|
188
|
-
|
188
|
+
cleanup {
|
189
189
|
script{
|
190
190
|
if(rubyTasksGen?.results){
|
191
191
|
writeJSON(file: 'results.json', json: toJSON(rubyTasksGen.results), pretty: 2)
|
@@ -0,0 +1,159 @@
|
|
1
|
+
#!/usr/bin/env groovy
|
2
|
+
@Library('apm@current') _
|
3
|
+
|
4
|
+
import co.elastic.matrix.*
|
5
|
+
import groovy.transform.Field
|
6
|
+
|
7
|
+
/**
|
8
|
+
This is the parallel tasks generator,
|
9
|
+
it is need as field to store the results of the tests.
|
10
|
+
*/
|
11
|
+
@Field def rubyTasksGen
|
12
|
+
|
13
|
+
pipeline {
|
14
|
+
agent any
|
15
|
+
environment {
|
16
|
+
REPO="git@github.com:elastic/apm-agent-ruby.git"
|
17
|
+
BASE_DIR="src/github.com/elastic/apm-agent-ruby"
|
18
|
+
PIPELINE_LOG_LEVEL='INFO'
|
19
|
+
NOTIFY_TO = credentials('notify-to')
|
20
|
+
JOB_GCS_BUCKET = credentials('gcs-bucket')
|
21
|
+
JOB_GIT_CREDENTIALS = "f6c7695a-671e-4f4f-a331-acdce44ff9ba"
|
22
|
+
DOCKER_REGISTRY = 'docker.elastic.co'
|
23
|
+
DOCKER_SECRET = 'secret/apm-team/ci/docker-registry/prod'
|
24
|
+
CODECOV_SECRET = 'secret/apm-team/ci/apm-agent-ruby-codecov'
|
25
|
+
}
|
26
|
+
options {
|
27
|
+
timeout(time: 2, unit: 'HOURS')
|
28
|
+
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20', daysToKeepStr: '30'))
|
29
|
+
timestamps()
|
30
|
+
ansiColor('xterm')
|
31
|
+
disableResume()
|
32
|
+
durabilityHint('PERFORMANCE_OPTIMIZED')
|
33
|
+
rateLimitBuilds(throttle: [count: 60, durationName: 'hour', userBoost: true])
|
34
|
+
quietPeriod(10)
|
35
|
+
}
|
36
|
+
parameters {
|
37
|
+
string(name: 'RUBY_VERSION', defaultValue: "ruby:2.6", description: "Ruby version to test")
|
38
|
+
string(name: 'BRANCH_SPECIFIER', defaultValue: "master", description: "Git branch/tag to use")
|
39
|
+
string(name: 'CHANGE_TARGET', defaultValue: "master", description: "Git branch/tag to merge before building")
|
40
|
+
}
|
41
|
+
stages {
|
42
|
+
/**
|
43
|
+
Checkout the code and stash it, to use it on other stages.
|
44
|
+
*/
|
45
|
+
stage('Checkout') {
|
46
|
+
agent { label 'master || immutable' }
|
47
|
+
options { skipDefaultCheckout() }
|
48
|
+
steps {
|
49
|
+
deleteDir()
|
50
|
+
gitCheckout(basedir: "${BASE_DIR}",
|
51
|
+
branch: "${params.BRANCH_SPECIFIER}",
|
52
|
+
repo: "${REPO}",
|
53
|
+
credentialsId: "${JOB_GIT_CREDENTIALS}",
|
54
|
+
mergeTarget: "${params.CHANGE_TARGET}",
|
55
|
+
reference: '/var/lib/jenkins/apm-agent-ruby.git')
|
56
|
+
stash allowEmpty: true, name: 'source', useDefaultExcludes: false
|
57
|
+
}
|
58
|
+
}
|
59
|
+
/**
|
60
|
+
Execute unit tests.
|
61
|
+
*/
|
62
|
+
stage('Test') {
|
63
|
+
agent { label 'linux && immutable' }
|
64
|
+
options { skipDefaultCheckout() }
|
65
|
+
steps {
|
66
|
+
deleteDir()
|
67
|
+
unstash "source"
|
68
|
+
dir("${BASE_DIR}"){
|
69
|
+
script {
|
70
|
+
rubyTasksGen = new RubyParallelTaskGenerator(
|
71
|
+
xVersions: [ "${params.RUBY_VERSION}" ],
|
72
|
+
yKey: 'FRAMEWORK',
|
73
|
+
yFile: ".ci/.jenkins_framework.yml",
|
74
|
+
exclusionFile: ".ci/.jenkins_exclude.yml",
|
75
|
+
tag: "Ruby",
|
76
|
+
name: "Ruby",
|
77
|
+
steps: this
|
78
|
+
)
|
79
|
+
def mapPatallelTasks = rubyTasksGen.generateParallelTests()
|
80
|
+
parallel(mapPatallelTasks)
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
post {
|
87
|
+
cleanup {
|
88
|
+
script{
|
89
|
+
if(rubyTasksGen?.results){
|
90
|
+
writeJSON(file: 'results.json', json: toJSON(rubyTasksGen.results), pretty: 2)
|
91
|
+
def mapResults = ["Ruby": rubyTasksGen.results]
|
92
|
+
def processor = new ResultsProcessor()
|
93
|
+
processor.processResults(mapResults)
|
94
|
+
archiveArtifacts allowEmptyArchive: true, artifacts: 'results.json,results.html', defaultExcludes: false
|
95
|
+
}
|
96
|
+
}
|
97
|
+
notifyBuildResult()
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
/**
|
103
|
+
Parallel task generator for the integration tests.
|
104
|
+
*/
|
105
|
+
class RubyParallelTaskGenerator extends DefaultParallelTaskGenerator {
|
106
|
+
|
107
|
+
public RubyParallelTaskGenerator(Map params){
|
108
|
+
super(params)
|
109
|
+
}
|
110
|
+
|
111
|
+
/**
|
112
|
+
build a clousure that launch and agent and execute the corresponding test script,
|
113
|
+
then store the results.
|
114
|
+
*/
|
115
|
+
public Closure generateStep(x, y){
|
116
|
+
return {
|
117
|
+
steps.sleep steps.randomNumber(min:10, max: 30)
|
118
|
+
steps.node('linux && immutable'){
|
119
|
+
// Label is transformed to avoid using the internal docker registry in the x coordinate
|
120
|
+
// TODO: def label = "${tag}:${x?.drop(x?.lastIndexOf('/')+1)}#${y}"
|
121
|
+
def label = "${tag}:${x}#${y}"
|
122
|
+
try {
|
123
|
+
steps.runScript(label: label, ruby: x, framework: y)
|
124
|
+
saveResult(x, y, 1)
|
125
|
+
} catch(e){
|
126
|
+
saveResult(x, y, 0)
|
127
|
+
steps.error("${label} tests failed : ${e.toString()}\n")
|
128
|
+
} finally {
|
129
|
+
steps.junit(allowEmptyResults: false,
|
130
|
+
keepLongStdio: true,
|
131
|
+
testResults: "**/spec/ruby-agent-junit.xml")
|
132
|
+
steps.codecov(repo: "${steps.env.REPO}", basedir: "${steps.env.BASE_DIR}",
|
133
|
+
secret: "${steps.env.CODECOV_SECRET}")
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
}
|
139
|
+
|
140
|
+
/**
|
141
|
+
Run tests for a Ruby version and framework version.
|
142
|
+
*/
|
143
|
+
def runScript(Map params = [:]){
|
144
|
+
def label = params.label
|
145
|
+
def ruby = params.ruby
|
146
|
+
def framework = params.framework
|
147
|
+
log(level: 'INFO', text: "${label}")
|
148
|
+
env.HOME = "${env.WORKSPACE}"
|
149
|
+
env.PATH = "${env.PATH}:${env.WORKSPACE}/bin"
|
150
|
+
deleteDir()
|
151
|
+
unstash 'source'
|
152
|
+
dir("${BASE_DIR}"){
|
153
|
+
retry(2){
|
154
|
+
sleep randomNumber(min:10, max: 30)
|
155
|
+
dockerLogin(secret: "${DOCKER_SECRET}", registry: "${DOCKER_REGISTRY}")
|
156
|
+
sh("./spec/scripts/spec.sh ${ruby} ${framework}")
|
157
|
+
}
|
158
|
+
}
|
159
|
+
}
|
data/.ci/jobs/defaults.yml
CHANGED
@@ -13,11 +13,11 @@
|
|
13
13
|
logrotate:
|
14
14
|
daysToKeep: 30
|
15
15
|
numToKeep: 100
|
16
|
-
number-to-keep: '
|
17
|
-
days-to-keep: '
|
16
|
+
number-to-keep: '100'
|
17
|
+
days-to-keep: '30'
|
18
18
|
concurrent: true
|
19
19
|
node: linux
|
20
|
-
script-path: Jenkinsfile
|
20
|
+
script-path: .ci/Jenkinsfile
|
21
21
|
scm:
|
22
22
|
- github:
|
23
23
|
branch-discovery: all
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## 2.9.1 (2019-06-28)
|
8
|
+
|
9
|
+
### Fixed
|
10
|
+
|
11
|
+
- Use system CA certificate if none is specified ([#460](https://github.com/elastic/apm-agent-ruby/pull/460))
|
12
|
+
|
7
13
|
## 2.9.0 (2019-06-25)
|
8
14
|
|
9
15
|
### Security
|
@@ -136,6 +136,9 @@ module ElasticAPM
|
|
136
136
|
OpenSSL::SSL::SSLContext.new.tap do |context|
|
137
137
|
if @config.server_ca_cert
|
138
138
|
context.ca_file = @config.server_ca_cert
|
139
|
+
else
|
140
|
+
context.cert_store =
|
141
|
+
OpenSSL::X509::Store.new.tap(&:set_default_paths)
|
139
142
|
end
|
140
143
|
|
141
144
|
context.verify_mode =
|
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: 2.9.
|
4
|
+
version: 2.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikkel Malmberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -45,7 +45,13 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
+
- ".ci/.jenkins_exclude.yml"
|
49
|
+
- ".ci/.jenkins_framework.yml"
|
50
|
+
- ".ci/.jenkins_ruby.yml"
|
51
|
+
- ".ci/Jenkinsfile"
|
48
52
|
- ".ci/bin/check_paths_for_matches.py"
|
53
|
+
- ".ci/downstreamTests.groovy"
|
54
|
+
- ".ci/jobs/apm-agent-ruby-downstream.yml"
|
49
55
|
- ".ci/jobs/apm-agent-ruby-mbp.yml"
|
50
56
|
- ".ci/jobs/apm-agent-ruby.yml"
|
51
57
|
- ".ci/jobs/defaults.yml"
|
@@ -57,7 +63,6 @@ files:
|
|
57
63
|
- CODE_OF_CONDUCT.md
|
58
64
|
- CONTRIBUTING.md
|
59
65
|
- Gemfile
|
60
|
-
- Jenkinsfile
|
61
66
|
- LICENSE
|
62
67
|
- README.md
|
63
68
|
- Rakefile
|