elastic-apm 4.6.2 → 4.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ci/.exclude.yml +193 -0
- data/.ci/.ruby.yml +10 -0
- data/.ci/scripts/bench.sh +52 -0
- data/.ci/scripts/install-build-system.sh +5 -0
- data/.ci/snapshoty.yml +2 -3
- data/.ci/updatecli/updatecli.d/update-gherkin-specs.yml +84 -0
- data/.ci/updatecli/updatecli.d/update-json-specs.yml +84 -0
- data/.ci/updatecli/updatecli.d/update-specs.yml +86 -0
- data/.ci/updatecli/values.yml +14 -0
- data/.github/dependabot.yml +17 -1
- data/.github/workflows/README.md +58 -0
- data/.github/workflows/addToProject.yml +3 -0
- data/.github/workflows/ci-docs.yml +20 -0
- data/.github/workflows/ci.yml +70 -0
- data/.github/workflows/coverage-reporter.yml +34 -0
- data/.github/workflows/labeler.yml +5 -0
- data/.github/workflows/microbenchmark.yml +48 -0
- data/.github/workflows/opentelemetry.yml +22 -0
- data/.github/workflows/release.yml +71 -0
- data/.github/workflows/run-matrix.yml +59 -0
- data/.github/workflows/snapshoty.yml +35 -0
- data/.github/workflows/test-reporter.yml +24 -0
- data/.github/workflows/{update-specs.yml → updatecli.yml} +3 -4
- data/.pre-commit-config.yaml +0 -2
- data/CHANGELOG.asciidoc +39 -0
- data/Gemfile +16 -3
- data/README.md +1 -1
- data/bench/rubyprof.rb +1 -0
- data/bin/run-tests +10 -1
- data/docker-compose.yml +4 -1
- data/docs/configuration.asciidoc +6 -5
- data/docs/index.asciidoc +2 -2
- data/docs/{log-correlation.asciidoc → logs.asciidoc} +29 -2
- data/docs/opentracing.asciidoc +1 -1
- data/docs/redirects.asciidoc +9 -0
- data/lib/elastic_apm/context_builder.rb +10 -5
- data/lib/elastic_apm/metadata/cloud_info.rb +9 -7
- data/lib/elastic_apm/metrics.rb +24 -20
- data/lib/elastic_apm/span_helpers.rb +6 -6
- data/lib/elastic_apm/spies/action_dispatch.rb +11 -3
- data/lib/elastic_apm/spies/faraday.rb +8 -1
- data/lib/elastic_apm/version.rb +1 -1
- metadata +26 -19
- data/.ci/.jenkins_exclude.yml +0 -191
- data/.ci/.jenkins_ruby.yml +0 -10
- data/.ci/.jenkins_ruby_benchmarks.yml +0 -6
- data/.ci/Jenkinsfile +0 -450
- data/.ci/jobs/apm-agent-ruby-downstream.yml +0 -38
- data/.ci/jobs/apm-agent-ruby-linting-mbp.yml +0 -39
- data/.ci/jobs/apm-agent-ruby-mbp.yml +0 -43
- data/.ci/jobs/apm-agent-ruby.yml +0 -4
- data/.ci/jobs/defaults.yml +0 -24
- data/.ci/linting.groovy +0 -32
- data/.ci/packer_cache.sh +0 -16
- data/.ci/update-specs.yml +0 -108
- /data/.ci/{.jenkins_codecov.yml → .codecov.yml} +0 -0
- /data/.ci/{.jenkins_framework.yml → .framework.yml} +0 -0
- /data/.ci/{.jenkins_main_framework.yml → .main_framework.yml} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fb7f8389ec374ccb57a8496ba24e365006ce44590d4ab064763133c8129cdf4
|
4
|
+
data.tar.gz: 4010d4aeaea7c13d15cfd6a0fce757ab1d7477b5be7a72d350012a07a6b473a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e0a026ec99b9ccd90c2f17ce4929cc583dc331582a9ad5e64b71410c0099da6f8478d3306c72d8cd9031d8c728f86d663325fdafe16381dd15a0302317fd747
|
7
|
+
data.tar.gz: 3df0f2d41ab038328f30ddbf7e88e2a3c0708004b64de06df165bfb073dde2bf37a546cf4b6a3c3f7c5971ff27698094cf48f480df96dff2c639b3b6986d47af
|
data/.ci/.exclude.yml
ADDED
@@ -0,0 +1,193 @@
|
|
1
|
+
exclude:
|
2
|
+
# Ruby 2.4
|
3
|
+
# Only test on rails-4.2, sinatra-1.4
|
4
|
+
- VERSION: ruby:2.4
|
5
|
+
FRAMEWORK: rails-7.0
|
6
|
+
- VERSION: ruby:2.4
|
7
|
+
FRAMEWORK: rails-6.1
|
8
|
+
- VERSION: ruby:2.4
|
9
|
+
FRAMEWORK: rails-6.0
|
10
|
+
- VERSION: ruby:2.4
|
11
|
+
FRAMEWORK: rails-5.2
|
12
|
+
- VERSION: ruby:2.4
|
13
|
+
FRAMEWORK: sinatra-2.2
|
14
|
+
- VERSION: ruby:2.4
|
15
|
+
FRAMEWORK: grape-1.6
|
16
|
+
- VERSION: ruby:2.4
|
17
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-6.0
|
18
|
+
- VERSION: ruby:2.4
|
19
|
+
FRAMEWORK: rails-main
|
20
|
+
- VERSION: ruby:2.4
|
21
|
+
FRAMEWORK: sinatra-main
|
22
|
+
- VERSION: ruby:2.4
|
23
|
+
FRAMEWORK: grape-master
|
24
|
+
|
25
|
+
# rails-4.2 exclusions
|
26
|
+
# Only test on ruby 2.4
|
27
|
+
- VERSION: ruby:3.1
|
28
|
+
FRAMEWORK: rails-4.2
|
29
|
+
- VERSION: ruby:3.0
|
30
|
+
FRAMEWORK: rails-4.2
|
31
|
+
- VERSION: ruby:2.7
|
32
|
+
FRAMEWORK: rails-4.2
|
33
|
+
- VERSION: ruby:2.6
|
34
|
+
FRAMEWORK: rails-4.2
|
35
|
+
- VERSION: jruby:9.2
|
36
|
+
FRAMEWORK: rails-4.2
|
37
|
+
- VERSION: elasticobservability/jruby:9.2-13-jdk
|
38
|
+
FRAMEWORK: rails-4.2
|
39
|
+
- VERSION: elasticobservability/jruby:9.2-11-jdk
|
40
|
+
FRAMEWORK: rails-4.2
|
41
|
+
- VERSION: elasticobservability/jruby:9.2-8-jdk
|
42
|
+
FRAMEWORK: rails-4.2
|
43
|
+
# sinatra-1.4 exclusions
|
44
|
+
- VERSION: ruby:3.1
|
45
|
+
FRAMEWORK: sinatra-1.4
|
46
|
+
- VERSION: ruby:3.0
|
47
|
+
FRAMEWORK: sinatra-1.4
|
48
|
+
- VERSION: ruby:2.7
|
49
|
+
FRAMEWORK: sinatra-1.4
|
50
|
+
- VERSION: jruby:9.2
|
51
|
+
FRAMEWORK: sinatra-1.4
|
52
|
+
- VERSION: elasticobservability/jruby:9.2-13-jdk
|
53
|
+
FRAMEWORK: sinatra-1.4
|
54
|
+
- VERSION: elasticobservability/jruby:9.2-11-jdk
|
55
|
+
FRAMEWORK: sinatra-1.4
|
56
|
+
- VERSION: elasticobservability/jruby:9.2-8-jdk
|
57
|
+
FRAMEWORK: sinatra-1.4
|
58
|
+
|
59
|
+
# rails-6.0 and rails-6.1 exclusions
|
60
|
+
# Don't test on ruby 2.4
|
61
|
+
- VERSION: ruby:2.4
|
62
|
+
FRAMEWORK: rails-6.1
|
63
|
+
- VERSION: ruby:2.4
|
64
|
+
FRAMEWORK: rails-6.0
|
65
|
+
|
66
|
+
# Only test rails main on ruby 3.1
|
67
|
+
- VERSION: ruby:3.0
|
68
|
+
FRAMEWORK: rails-main
|
69
|
+
- VERSION: ruby:2.7
|
70
|
+
FRAMEWORK: rails-main
|
71
|
+
- VERSION: ruby:2.6
|
72
|
+
FRAMEWORK: rails-main
|
73
|
+
- VERSION: ruby:2.5
|
74
|
+
FRAMEWORK: rails-main
|
75
|
+
- VERSION: ruby:2.4
|
76
|
+
FRAMEWORK: rails-main
|
77
|
+
- VERSION: jruby:9.2
|
78
|
+
FRAMEWORK: rails-main
|
79
|
+
- VERSION: elasticobservability/jruby:9.2-13-jdk
|
80
|
+
FRAMEWORK: rails-main
|
81
|
+
- VERSION: elasticobservability/jruby:9.2-11-jdk
|
82
|
+
FRAMEWORK: rails-main
|
83
|
+
- VERSION: elasticobservability/jruby:9.2-8-jdk
|
84
|
+
FRAMEWORK: rails-main
|
85
|
+
|
86
|
+
# Only test rails 7.0 on ruby >= 2.7
|
87
|
+
- VERSION: ruby:2.6
|
88
|
+
FRAMEWORK: rails-7.0
|
89
|
+
- VERSION: ruby:2.5
|
90
|
+
FRAMEWORK: rails-7.0
|
91
|
+
- VERSION: ruby:2.4
|
92
|
+
FRAMEWORK: rails-7.0
|
93
|
+
- VERSION: jruby:9.2
|
94
|
+
FRAMEWORK: rails-7.0
|
95
|
+
- VERSION: elasticobservability/jruby:9.2-13-jdk
|
96
|
+
FRAMEWORK: rails-7.0
|
97
|
+
- VERSION: elasticobservability/jruby:9.2-11-jdk
|
98
|
+
FRAMEWORK: rails-7.0
|
99
|
+
- VERSION: elasticobservability/jruby:9.2-8-jdk
|
100
|
+
FRAMEWORK: rails-7.0
|
101
|
+
|
102
|
+
# Only test sinatra main on ruby 2.7 and ruby 3.1
|
103
|
+
- VERSION: ruby:3.0
|
104
|
+
FRAMEWORK: sinatra-main
|
105
|
+
- VERSION: ruby:2.6
|
106
|
+
FRAMEWORK: sinatra-main
|
107
|
+
- VERSION: ruby:2.5
|
108
|
+
FRAMEWORK: sinatra-main
|
109
|
+
- VERSION: ruby:2.4
|
110
|
+
FRAMEWORK: sinatra-main
|
111
|
+
- VERSION: jruby:9.2
|
112
|
+
FRAMEWORK: sinatra-main
|
113
|
+
- VERSION: elasticobservability/jruby:9.2-13-jdk
|
114
|
+
FRAMEWORK: sinatra-main
|
115
|
+
- VERSION: elasticobservability/jruby:9.2-11-jdk
|
116
|
+
FRAMEWORK: sinatra-main
|
117
|
+
- VERSION: elasticobservability/jruby:9.2-8-jdk
|
118
|
+
FRAMEWORK: sinatra-main
|
119
|
+
|
120
|
+
# Only test grape master on ruby 2.7 and ruby 3.0
|
121
|
+
- VERSION: ruby:2.6
|
122
|
+
FRAMEWORK: grape-master
|
123
|
+
- VERSION: ruby:2.5
|
124
|
+
FRAMEWORK: grape-master
|
125
|
+
- VERSION: ruby:2.4
|
126
|
+
FRAMEWORK: grape-master
|
127
|
+
- VERSION: jruby:9.2
|
128
|
+
FRAMEWORK: grape-master
|
129
|
+
- VERSION: elasticobservability/jruby:9.2-13-jdk
|
130
|
+
FRAMEWORK: grape-master
|
131
|
+
- VERSION: elasticobservability/jruby:9.2-11-jdk
|
132
|
+
FRAMEWORK: grape-master
|
133
|
+
- VERSION: elasticobservability/jruby:9.2-8-jdk
|
134
|
+
FRAMEWORK: grape-master
|
135
|
+
|
136
|
+
# grape 1.5 doesn't support ruby 3.0
|
137
|
+
- VERSION: ruby:3.1
|
138
|
+
FRAMEWORK: grape-1.6
|
139
|
+
- VERSION: ruby:3.1
|
140
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-7.0
|
141
|
+
- VERSION: ruby:3.1
|
142
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-6.1
|
143
|
+
- VERSION: ruby:3.0
|
144
|
+
FRAMEWORK: grape-1.6
|
145
|
+
- VERSION: ruby:3.0
|
146
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-6.1
|
147
|
+
|
148
|
+
# only test ruby >= 3.0 with rails 6.0 and rails 6.1
|
149
|
+
- VERSION: ruby:3.1
|
150
|
+
FRAMEWORK: rails-5.2
|
151
|
+
- VERSION: ruby:3.1
|
152
|
+
FRAMEWORK: rails-5.1
|
153
|
+
- VERSION: ruby:3.0
|
154
|
+
FRAMEWORK: rails-5.2
|
155
|
+
- VERSION: ruby:3.0
|
156
|
+
FRAMEWORK: rails-5.1
|
157
|
+
|
158
|
+
# Unsupported
|
159
|
+
# Ruby 2.6
|
160
|
+
- VERSION: ruby:2.6
|
161
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-6.1
|
162
|
+
- VERSION: ruby:2.6
|
163
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-7.0
|
164
|
+
# Ruby 2.5
|
165
|
+
- VERSION: ruby:2.5
|
166
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-6.1
|
167
|
+
- VERSION: ruby:2.5
|
168
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-7.0
|
169
|
+
# Ruby 2.4
|
170
|
+
- VERSION: ruby:2.4
|
171
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-6.1
|
172
|
+
- VERSION: ruby:2.4
|
173
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-7.0
|
174
|
+
# JRuby 9.2
|
175
|
+
- VERSION: jruby:9.2
|
176
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-6.1
|
177
|
+
- VERSION: jruby:9.2
|
178
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-7.0
|
179
|
+
# JRuby 9.2-13-jdk
|
180
|
+
- VERSION: elasticobservability/jruby:9.2-13-jdk
|
181
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-6.1
|
182
|
+
- VERSION: elasticobservability/jruby:9.2-13-jdk
|
183
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-7.0
|
184
|
+
# JRuby 9.2-11-jdk
|
185
|
+
- VERSION: elasticobservability/jruby:9.2-11-jdk
|
186
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-6.1
|
187
|
+
- VERSION: elasticobservability/jruby:9.2-11-jdk
|
188
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-7.0
|
189
|
+
# JRuby 9.2-8-jdk
|
190
|
+
- VERSION: elasticobservability/jruby:9.2-8-jdk
|
191
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-6.1
|
192
|
+
- VERSION: elasticobservability/jruby:9.2-8-jdk
|
193
|
+
FRAMEWORK: grape-1.6,sinatra-2.2,rails-7.0
|
data/.ci/.ruby.yml
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
# Bash strict mode
|
4
|
+
set -eo pipefail
|
5
|
+
|
6
|
+
# Found current script directory
|
7
|
+
RELATIVE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
8
|
+
|
9
|
+
# Found project directory
|
10
|
+
BASE_PROJECT="$(dirname "$(dirname "${RELATIVE_DIR}")")"
|
11
|
+
|
12
|
+
## Buildkite specific configuration
|
13
|
+
if [ "$CI" == "true" ] ; then
|
14
|
+
# If HOME is not set then use the Buildkite workspace
|
15
|
+
# that's normally happening when running in the CI
|
16
|
+
# owned by Elastic.
|
17
|
+
if [ -z "$HOME" ] ; then
|
18
|
+
HOME=$BUILDKITE_BUILD_CHECKOUT_PATH
|
19
|
+
export HOME
|
20
|
+
fi
|
21
|
+
|
22
|
+
# required when running the benchmark
|
23
|
+
PATH=$PATH:$HOME/.local/bin
|
24
|
+
export PATH
|
25
|
+
|
26
|
+
echo 'Docker login is done in the Buildkite hooks'
|
27
|
+
fi
|
28
|
+
|
29
|
+
# It does not fail so it runs for every single version and then we report the error at the end.
|
30
|
+
set +e
|
31
|
+
status=0
|
32
|
+
|
33
|
+
for VERSION in "ruby:3.1" "ruby:3.0" "ruby:2.7" "ruby:2.6" "jruby:9.2" ; do
|
34
|
+
## Transform the versions like:
|
35
|
+
## jruby:9.1 to jruby-9.1
|
36
|
+
echo "--- Benchmark for :ruby: ${VERSION}"
|
37
|
+
OUTPUT_NAME=benchmark-$(echo "${VERSION//:/-}")
|
38
|
+
|
39
|
+
# TBC, maybe a timeout could help so it can run the other versions?
|
40
|
+
${BASE_PROJECT}/spec/scripts/benchmarks.sh "${VERSION}" "${OUTPUT_NAME}"
|
41
|
+
|
42
|
+
# Gather error if any
|
43
|
+
if [ $? -gt 0 ] ; then
|
44
|
+
status=1
|
45
|
+
fi
|
46
|
+
|
47
|
+
# Then we ship the data using the helper
|
48
|
+
sendBenchmark "${ES_USER_SECRET}" "${ES_PASS_SECRET}" "${ES_URL_SECRET}" "${BASE_PROJECT}/spec/${OUTPUT_NAME}.bulk"
|
49
|
+
done
|
50
|
+
|
51
|
+
# Report status
|
52
|
+
exit $status
|
data/.ci/snapshoty.yml
CHANGED
@@ -23,12 +23,11 @@ artifacts:
|
|
23
23
|
# Files pattern to match
|
24
24
|
files_pattern: 'elastic-apm-(?P<app_version>\d+\.\d+\.\d+)\.gem'
|
25
25
|
# File layout on GCS bucket
|
26
|
-
output_pattern: '{project}/{
|
26
|
+
output_pattern: '{project}/{github_branch_name}/elastic-apm-ruby-{app_version}-{github_sha_short}.gem'
|
27
27
|
# List of metadata processors to use.
|
28
28
|
metadata:
|
29
29
|
# Define static custom metadata
|
30
30
|
- name: 'custom'
|
31
31
|
data:
|
32
32
|
project: 'apm-agent-ruby'
|
33
|
-
|
34
|
-
- name: 'jenkins'
|
33
|
+
- name: 'github_actions'
|
@@ -0,0 +1,84 @@
|
|
1
|
+
name: update-gherkin-specs
|
2
|
+
pipelineid: update-gherkin-specs
|
3
|
+
|
4
|
+
scms:
|
5
|
+
default:
|
6
|
+
kind: github
|
7
|
+
spec:
|
8
|
+
user: '{{ requiredEnv "GIT_USER" }}'
|
9
|
+
email: '{{ requiredEnv "GIT_EMAIL" }}'
|
10
|
+
owner: "{{ .github.owner }}"
|
11
|
+
repository: "{{ .github.repository }}"
|
12
|
+
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
|
13
|
+
username: '{{ requiredEnv "GIT_USER" }}'
|
14
|
+
branch: "{{ .github.branch }}"
|
15
|
+
apm:
|
16
|
+
kind: github
|
17
|
+
spec:
|
18
|
+
user: '{{ requiredEnv "GIT_USER" }}'
|
19
|
+
email: '{{ requiredEnv "GIT_EMAIL" }}'
|
20
|
+
owner: "{{ .github.owner }}"
|
21
|
+
repository: "{{ .github.apm_repository }}"
|
22
|
+
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
|
23
|
+
username: '{{ requiredEnv "GIT_USER" }}'
|
24
|
+
branch: "{{ .github.branch }}"
|
25
|
+
|
26
|
+
sources:
|
27
|
+
sha:
|
28
|
+
kind: file
|
29
|
+
spec:
|
30
|
+
file: 'https://github.com/{{ .github.owner }}/{{ .github.apm_repository }}/commit/{{ .github.branch }}.patch'
|
31
|
+
matchpattern: "^From\\s([0-9a-f]{40})\\s"
|
32
|
+
transformers:
|
33
|
+
- findsubmatch:
|
34
|
+
pattern: "[0-9a-f]{40}"
|
35
|
+
pull_request:
|
36
|
+
kind: shell
|
37
|
+
dependson:
|
38
|
+
- sha
|
39
|
+
spec:
|
40
|
+
command: gh api /repos/{{ .github.owner }}/{{ .github.apm_repository }}/commits/{{ source "sha" }}/pulls --jq '.[].html_url'
|
41
|
+
environments:
|
42
|
+
- name: GITHUB_TOKEN
|
43
|
+
- name: PATH
|
44
|
+
agents-gherkin-specs-tarball:
|
45
|
+
kind: shell
|
46
|
+
scmid: apm
|
47
|
+
dependson:
|
48
|
+
- sha
|
49
|
+
spec:
|
50
|
+
command: tar cvzf {{ requiredEnv "GITHUB_WORKSPACE" }}/gherkin-specs.tgz .
|
51
|
+
environments:
|
52
|
+
- name: PATH
|
53
|
+
workdir: "{{ .specs.apm_gherkin_path }}"
|
54
|
+
|
55
|
+
actions:
|
56
|
+
pr:
|
57
|
+
kind: "github/pullrequest"
|
58
|
+
scmid: default
|
59
|
+
spec:
|
60
|
+
automerge: false
|
61
|
+
draft: false
|
62
|
+
labels:
|
63
|
+
- "automation"
|
64
|
+
description: |-
|
65
|
+
### What
|
66
|
+
APM agent Gherkin specs automatic sync
|
67
|
+
|
68
|
+
### Why
|
69
|
+
*Changeset*
|
70
|
+
* {{ source "pull_request" }}
|
71
|
+
* https://github.com/elastic/apm/commit/{{ source "sha" }}
|
72
|
+
title: '[Automation] Update Gherkin specs'
|
73
|
+
|
74
|
+
targets:
|
75
|
+
agent-gherkin-specs:
|
76
|
+
name: APM agent gherkin specs {{ source "sha" }}
|
77
|
+
scmid: default
|
78
|
+
disablesourceinput: true
|
79
|
+
kind: shell
|
80
|
+
spec:
|
81
|
+
# git diff helps to print what it changed, If it is empty, then updatecli report a success with no changes applied.
|
82
|
+
# See https://www.updatecli.io/docs/plugins/resource/shell/#_shell_target
|
83
|
+
command: 'tar -xzf {{ requiredEnv "GITHUB_WORKSPACE" }}/gherkin-specs.tgz && git --no-pager diff'
|
84
|
+
workdir: "{{ .apm_agent.gherkin_specs_path }}"
|
@@ -0,0 +1,84 @@
|
|
1
|
+
name: update-json-specs
|
2
|
+
pipelineid: update-json-specs
|
3
|
+
|
4
|
+
scms:
|
5
|
+
default:
|
6
|
+
kind: github
|
7
|
+
spec:
|
8
|
+
user: '{{ requiredEnv "GIT_USER" }}'
|
9
|
+
email: '{{ requiredEnv "GIT_EMAIL" }}'
|
10
|
+
owner: "{{ .github.owner }}"
|
11
|
+
repository: "{{ .github.repository }}"
|
12
|
+
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
|
13
|
+
username: '{{ requiredEnv "GIT_USER" }}'
|
14
|
+
branch: "{{ .github.branch }}"
|
15
|
+
apm:
|
16
|
+
kind: github
|
17
|
+
spec:
|
18
|
+
user: '{{ requiredEnv "GIT_USER" }}'
|
19
|
+
email: '{{ requiredEnv "GIT_EMAIL" }}'
|
20
|
+
owner: "{{ .github.owner }}"
|
21
|
+
repository: "{{ .github.apm_repository }}"
|
22
|
+
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
|
23
|
+
username: '{{ requiredEnv "GIT_USER" }}'
|
24
|
+
branch: "{{ .github.branch }}"
|
25
|
+
|
26
|
+
sources:
|
27
|
+
sha:
|
28
|
+
kind: file
|
29
|
+
spec:
|
30
|
+
file: 'https://github.com/{{ .github.owner }}/{{ .github.apm_repository }}/commit/{{ .github.branch }}.patch'
|
31
|
+
matchpattern: "^From\\s([0-9a-f]{40})\\s"
|
32
|
+
transformers:
|
33
|
+
- findsubmatch:
|
34
|
+
pattern: "[0-9a-f]{40}"
|
35
|
+
pull_request:
|
36
|
+
kind: shell
|
37
|
+
dependson:
|
38
|
+
- sha
|
39
|
+
spec:
|
40
|
+
command: gh api /repos/{{ .github.owner }}/{{ .github.apm_repository }}/commits/{{ source "sha" }}/pulls --jq '.[].html_url'
|
41
|
+
environments:
|
42
|
+
- name: GITHUB_TOKEN
|
43
|
+
- name: PATH
|
44
|
+
agents-json-specs-tarball:
|
45
|
+
kind: shell
|
46
|
+
scmid: apm
|
47
|
+
dependson:
|
48
|
+
- sha
|
49
|
+
spec:
|
50
|
+
command: tar cvzf {{ requiredEnv "GITHUB_WORKSPACE" }}/json-specs.tgz .
|
51
|
+
environments:
|
52
|
+
- name: PATH
|
53
|
+
workdir: "{{ .specs.apm_json_path }}"
|
54
|
+
|
55
|
+
actions:
|
56
|
+
pr:
|
57
|
+
kind: "github/pullrequest"
|
58
|
+
scmid: default
|
59
|
+
spec:
|
60
|
+
automerge: false
|
61
|
+
draft: false
|
62
|
+
labels:
|
63
|
+
- "automation"
|
64
|
+
description: |-
|
65
|
+
### What
|
66
|
+
APM agent specs automatic sync
|
67
|
+
|
68
|
+
### Why
|
69
|
+
*Changeset*
|
70
|
+
* {{ source "pull_request" }}
|
71
|
+
* https://github.com/{{ .github.owner }}/{{ .github.apm_repository }}/commit/{{ source "sha" }}
|
72
|
+
title: '[Automation] Update JSON specs'
|
73
|
+
|
74
|
+
targets:
|
75
|
+
agent-json-specs:
|
76
|
+
name: APM agent json specs {{ source "sha" }}
|
77
|
+
scmid: default
|
78
|
+
disablesourceinput: true
|
79
|
+
kind: shell
|
80
|
+
spec:
|
81
|
+
# git diff helps to print what it changed, If it is empty, then updatecli report a success with no changes applied.
|
82
|
+
# See https://www.updatecli.io/docs/plugins/resource/shell/#_shell_target
|
83
|
+
command: 'tar -xzf {{ requiredEnv "GITHUB_WORKSPACE" }}/json-specs.tgz && git --no-pager diff'
|
84
|
+
workdir: "{{ .apm_agent.json_specs_path }}"
|
@@ -0,0 +1,86 @@
|
|
1
|
+
name: update-specs
|
2
|
+
pipelineid: update-schema-specs
|
3
|
+
|
4
|
+
scms:
|
5
|
+
default:
|
6
|
+
kind: github
|
7
|
+
spec:
|
8
|
+
user: '{{ requiredEnv "GIT_USER" }}'
|
9
|
+
email: '{{ requiredEnv "GIT_EMAIL" }}'
|
10
|
+
owner: "{{ .github.owner }}"
|
11
|
+
repository: "{{ .github.repository }}"
|
12
|
+
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
|
13
|
+
username: '{{ requiredEnv "GIT_USER" }}'
|
14
|
+
branch: "{{ .github.branch }}"
|
15
|
+
|
16
|
+
apm-data:
|
17
|
+
kind: github
|
18
|
+
spec:
|
19
|
+
user: '{{ requiredEnv "GIT_USER" }}'
|
20
|
+
email: '{{ requiredEnv "GIT_EMAIL" }}'
|
21
|
+
owner: "{{ .github.owner }}"
|
22
|
+
repository: "{{ .github.apm_data_repository }}"
|
23
|
+
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
|
24
|
+
username: '{{ requiredEnv "GIT_USER" }}'
|
25
|
+
branch: "{{ .github.branch }}"
|
26
|
+
|
27
|
+
sources:
|
28
|
+
sha:
|
29
|
+
kind: file
|
30
|
+
spec:
|
31
|
+
file: 'https://github.com/{{ .github.owner }}/{{ .github.apm_data_repository }}/commit/{{ .github.branch }}.patch'
|
32
|
+
matchpattern: "^From\\s([0-9a-f]{40})\\s"
|
33
|
+
transformers:
|
34
|
+
- findsubmatch:
|
35
|
+
pattern: "[0-9a-f]{40}"
|
36
|
+
pull_request:
|
37
|
+
kind: shell
|
38
|
+
dependson:
|
39
|
+
- sha
|
40
|
+
spec:
|
41
|
+
command: gh api /repos/{{ .github.owner }}/{{ .github.apm_data_repository }}/commits/{{ source "sha" }}/pulls --jq '.[].html_url'
|
42
|
+
environments:
|
43
|
+
- name: GITHUB_TOKEN
|
44
|
+
- name: PATH
|
45
|
+
agent-specs-tarball:
|
46
|
+
kind: shell
|
47
|
+
scmid: apm-data
|
48
|
+
dependson:
|
49
|
+
- sha
|
50
|
+
spec:
|
51
|
+
command: tar cvzf {{ requiredEnv "GITHUB_WORKSPACE" }}/json-schema.tgz .
|
52
|
+
environments:
|
53
|
+
- name: PATH
|
54
|
+
workdir: "{{ .specs.apm_data_path }}"
|
55
|
+
|
56
|
+
actions:
|
57
|
+
pr:
|
58
|
+
kind: "github/pullrequest"
|
59
|
+
scmid: default
|
60
|
+
sourceid: sha
|
61
|
+
spec:
|
62
|
+
automerge: false
|
63
|
+
draft: false
|
64
|
+
labels:
|
65
|
+
- "automation"
|
66
|
+
description: |-
|
67
|
+
### What
|
68
|
+
APM agent json server schema automatic sync
|
69
|
+
|
70
|
+
### Why
|
71
|
+
*Changeset*
|
72
|
+
* {{ source "pull_request" }}
|
73
|
+
* https://github.com/{{ .github.owner }}/{{ .github.apm_data_repository }}/commit/{{ source "sha" }}
|
74
|
+
title: '[Automation] Update JSON server schema specs'
|
75
|
+
|
76
|
+
targets:
|
77
|
+
agent-json-schema:
|
78
|
+
name: APM agent json server schema {{ source "sha" }}
|
79
|
+
scmid: default
|
80
|
+
disablesourceinput: true
|
81
|
+
kind: shell
|
82
|
+
spec:
|
83
|
+
# git diff helps to print what it changed, If it is empty, then updatecli report a success with no changes applied.
|
84
|
+
# See https://www.updatecli.io/docs/plugins/resource/shell/#_shell_target
|
85
|
+
command: 'tar -xzf {{ requiredEnv "GITHUB_WORKSPACE" }}/json-schema.tgz && git --no-pager diff'
|
86
|
+
workdir: "{{ .apm_agent.server_schema_specs_path }}"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
github:
|
2
|
+
owner: "elastic"
|
3
|
+
repository: "apm-agent-ruby"
|
4
|
+
apm_repository: "apm"
|
5
|
+
apm_data_repository: "apm-data"
|
6
|
+
branch: "main"
|
7
|
+
specs:
|
8
|
+
apm_data_path: "input/elasticapm/docs/spec/v2"
|
9
|
+
apm_json_path: "tests/agents/json-specs"
|
10
|
+
apm_gherkin_path: "tests/agents/gherkin-specs"
|
11
|
+
apm_agent:
|
12
|
+
gherkin_specs_path: "features"
|
13
|
+
json_specs_path: "spec/fixtures"
|
14
|
+
server_schema_specs_path: "spec/fixtures"
|
data/.github/dependabot.yml
CHANGED
@@ -3,7 +3,9 @@ updates:
|
|
3
3
|
- package-ecosystem: bundler
|
4
4
|
directory: "/"
|
5
5
|
schedule:
|
6
|
-
interval:
|
6
|
+
interval: "weekly"
|
7
|
+
day: "sunday"
|
8
|
+
time: "22:00"
|
7
9
|
open-pull-requests-limit: 10
|
8
10
|
ignore:
|
9
11
|
- dependency-name: sucker_punch
|
@@ -14,3 +16,17 @@ updates:
|
|
14
16
|
- 1.8.10
|
15
17
|
- 1.8.8
|
16
18
|
- 1.8.9
|
19
|
+
|
20
|
+
# GitHub actions
|
21
|
+
- package-ecosystem: "github-actions"
|
22
|
+
directory: "/"
|
23
|
+
reviewers:
|
24
|
+
- "elastic/observablt-ci"
|
25
|
+
schedule:
|
26
|
+
interval: "weekly"
|
27
|
+
day: "sunday"
|
28
|
+
time: "22:00"
|
29
|
+
groups:
|
30
|
+
github-actions:
|
31
|
+
patterns:
|
32
|
+
- "*"
|
@@ -0,0 +1,58 @@
|
|
1
|
+
## CI/CD
|
2
|
+
|
3
|
+
There are 5 main stages that run on GitHub actions:
|
4
|
+
|
5
|
+
* Linting
|
6
|
+
* Test
|
7
|
+
* Test `main` versions
|
8
|
+
* Package
|
9
|
+
* Release
|
10
|
+
|
11
|
+
There are some other stages that run for every push on the main branches:
|
12
|
+
|
13
|
+
* [Microbenchmark](./microbenchmark.yml)
|
14
|
+
* [Snapshoty](./snapshoty.yml)
|
15
|
+
|
16
|
+
### Scenarios
|
17
|
+
|
18
|
+
* Compatibility matrix runs on branches, tags and PRs basis.
|
19
|
+
* Tests should be triggered on branch, tag and PR basis.
|
20
|
+
* Commits that are only affecting the docs files should not trigger any test or similar stages that are not required.
|
21
|
+
* Automated release in the CI gets triggered when a tag release is created.
|
22
|
+
* **This is not the case yet**, but if Github secrets are required then Pull Requests from forked repositories won't run any build accessing those secrets. If needed, then create a feature branch.
|
23
|
+
|
24
|
+
### Compatibility matrix
|
25
|
+
|
26
|
+
Ruby agent supports compatibility to different ruby versions and frameworks, those are defined in:
|
27
|
+
|
28
|
+
* [frameworks](../../.ci/.framework.yml) for all the PRs.
|
29
|
+
* [frameworks](../../.ci/.main_framework.yml) for all the PRs using the `main` branches.
|
30
|
+
* Ruby [versions](../../.ci/.ruby.yml) for all the `*nix` builds.
|
31
|
+
* [Exclude list](../../.ci/.exclude.yml) for the above entries.
|
32
|
+
|
33
|
+
### How to interact with the CI?
|
34
|
+
|
35
|
+
#### On a PR basis
|
36
|
+
|
37
|
+
Once a PR has been opened then there are two different ways you can trigger builds in the CI:
|
38
|
+
|
39
|
+
1. Commit based
|
40
|
+
1. UI based, any Elasticians can force a build through the GitHub UI
|
41
|
+
|
42
|
+
#### Branches
|
43
|
+
|
44
|
+
Every time there is a merge to main or any release branches the whole workflow will compile and test every entry in the compatibility matrix for Linux.
|
45
|
+
|
46
|
+
### Release process
|
47
|
+
|
48
|
+
This process has been fully automated and it gets triggered when a tag release has been created.
|
49
|
+
The tag release follows the naming convention: `v.<major>.<minor>.<patch>`, where `<major>`, `<minor>` and `<patch>`.
|
50
|
+
|
51
|
+
### OpenTelemetry
|
52
|
+
|
53
|
+
There is a GitHub workflow in charge to populate what the workflow run in terms of jobs and steps. Those details can be seen in [here](https://ela.st/oblt-ci-cd-stats) (**NOTE**: only available for Elasticians).
|
54
|
+
|
55
|
+
## Bump automation
|
56
|
+
|
57
|
+
[updatecli](https://www.updatecli.io/) is the tool we use to automatically update the specs
|
58
|
+
the [APM agents](./updatecli.yml) use.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
# This workflow sets the test / all status check to success in case it's a docs only PR and ci.yml is not triggered
|
3
|
+
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
|
4
|
+
name: ci # The name must be the same as in ci.yml
|
5
|
+
|
6
|
+
on:
|
7
|
+
pull_request:
|
8
|
+
paths-ignore: # This expression needs to match the paths ignored on ci.yml.
|
9
|
+
- '**'
|
10
|
+
- '!**/*.md'
|
11
|
+
- '!**/*.asciidoc'
|
12
|
+
|
13
|
+
permissions:
|
14
|
+
contents: read
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
all:
|
18
|
+
runs-on: ubuntu-latest
|
19
|
+
steps:
|
20
|
+
- run: 'echo "No build required"'
|