elastic-apm 4.6.0 → 4.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ci/.exclude.yml +193 -0
- data/.ci/.main_framework.yml +4 -0
- data/.ci/.ruby.yml +10 -0
- data/.ci/docker/jruby/11-jdk/Dockerfile +8 -3
- data/.ci/docker/jruby/12-jdk/Dockerfile +5 -2
- data/.ci/docker/jruby/13-jdk/Dockerfile +5 -2
- data/.ci/docker/jruby/7-jdk/Dockerfile +6 -3
- data/.ci/docker/jruby/8-jdk/Dockerfile +8 -3
- data/.ci/docker/jruby/README.md +1 -1
- data/.ci/docker/jruby/run.sh +33 -9
- data/.ci/docker/jruby/test.sh +17 -2
- data/.ci/scripts/bench.sh +52 -0
- data/.ci/scripts/install-build-system.sh +5 -0
- data/.ci/snapshoty.yml +33 -0
- data/.ci/updatecli.d/update-gherkin-specs.yml +117 -0
- data/.ci/updatecli.d/update-json-specs.yml +121 -0
- data/.ci/updatecli.d/update-specs.yml +108 -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/microbenchmark.yml +48 -0
- data/.github/workflows/opentelemetry.yml +27 -0
- data/.github/workflows/release.yml +71 -0
- data/.github/workflows/run-matrix.yml +56 -0
- data/.github/workflows/snapshoty.yml +35 -0
- data/.github/workflows/test-reporter.yml +24 -0
- data/.github/workflows/updatecli.yml +28 -0
- data/.pre-commit-config.yaml +0 -2
- data/CHANGELOG.asciidoc +29 -1
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +8 -2
- data/README.md +1 -1
- data/Rakefile +2 -2
- data/bench/rubyprof.rb +1 -0
- data/bin/run-tests +10 -1
- data/docker-compose.yml +10 -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 +3 -3
- data/lib/elastic_apm/metrics.rb +24 -20
- data/lib/elastic_apm/span_helpers.rb +6 -6
- data/lib/elastic_apm/spies/faraday.rb +13 -4
- data/lib/elastic_apm/trace_context/tracestate.rb +3 -1
- data/lib/elastic_apm/transport/connection/http.rb +9 -3
- data/lib/elastic_apm/version.rb +1 -1
- metadata +25 -17
- data/.ci/.jenkins_exclude.yml +0 -191
- data/.ci/.jenkins_main_framework.yml +0 -4
- data/.ci/.jenkins_ruby.yml +0 -10
- data/.ci/.jenkins_ruby_benchmarks.yml +0 -6
- data/.ci/Jenkinsfile +0 -419
- 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/{.jenkins_codecov.yml → .codecov.yml} +0 -0
- /data/.ci/{.jenkins_framework.yml → .framework.yml} +0 -0
@@ -0,0 +1,117 @@
|
|
1
|
+
name: update-gherkin-specs
|
2
|
+
pipelineid: update-gherkin-specs
|
3
|
+
title: synchronize gherkin specs
|
4
|
+
|
5
|
+
scms:
|
6
|
+
default:
|
7
|
+
kind: github
|
8
|
+
spec:
|
9
|
+
user: '{{ requiredEnv "GIT_USER" }}'
|
10
|
+
email: '{{ requiredEnv "GIT_EMAIL" }}'
|
11
|
+
owner: elastic
|
12
|
+
repository: apm-agent-ruby
|
13
|
+
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
|
14
|
+
username: '{{ requiredEnv "GIT_USER" }}'
|
15
|
+
branch: main
|
16
|
+
|
17
|
+
sources:
|
18
|
+
sha:
|
19
|
+
kind: file
|
20
|
+
spec:
|
21
|
+
file: 'https://github.com/elastic/apm/commit/main.patch'
|
22
|
+
matchpattern: "^From\\s([0-9a-f]{40})\\s"
|
23
|
+
transformers:
|
24
|
+
- findsubmatch:
|
25
|
+
pattern: "[0-9a-f]{40}"
|
26
|
+
|
27
|
+
api_key.feature:
|
28
|
+
kind: file
|
29
|
+
spec:
|
30
|
+
file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/gherkin-specs/api_key.feature
|
31
|
+
azure_app_service_metadata.feature:
|
32
|
+
kind: file
|
33
|
+
spec:
|
34
|
+
file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/gherkin-specs/azure_app_service_metadata.feature
|
35
|
+
azure_functions_metadata.feature:
|
36
|
+
kind: file
|
37
|
+
spec:
|
38
|
+
file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/gherkin-specs/azure_functions_metadata.feature
|
39
|
+
otel_bridge.feature:
|
40
|
+
kind: file
|
41
|
+
spec:
|
42
|
+
file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/gherkin-specs/otel_bridge.feature
|
43
|
+
outcome.feature:
|
44
|
+
kind: file
|
45
|
+
spec:
|
46
|
+
file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/gherkin-specs/outcome.feature
|
47
|
+
user_agent.feature:
|
48
|
+
kind: file
|
49
|
+
spec:
|
50
|
+
file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/gherkin-specs/user_agent.feature
|
51
|
+
|
52
|
+
actions:
|
53
|
+
pr:
|
54
|
+
kind: "github/pullrequest"
|
55
|
+
scmid: default
|
56
|
+
title: '[Automation] Update Gherkin specs'
|
57
|
+
spec:
|
58
|
+
automerge: false
|
59
|
+
draft: false
|
60
|
+
labels:
|
61
|
+
- "automation"
|
62
|
+
description: |-
|
63
|
+
### What
|
64
|
+
APM agent Gherkin specs automatic sync
|
65
|
+
### Why
|
66
|
+
*Changeset*
|
67
|
+
* https://github.com/elastic/apm/commit/{{ source "sha" }}
|
68
|
+
|
69
|
+
targets:
|
70
|
+
api_key.feature:
|
71
|
+
name: api_key.feature
|
72
|
+
scmid: default
|
73
|
+
sourceid: api_key.feature
|
74
|
+
kind: file
|
75
|
+
spec:
|
76
|
+
file: features/api_key.feature
|
77
|
+
forcecreate: true
|
78
|
+
azure_app_service_metadata.feature:
|
79
|
+
name: azure_app_service_metadata.feature
|
80
|
+
scmid: default
|
81
|
+
sourceid: azure_app_service_metadata.feature
|
82
|
+
kind: file
|
83
|
+
spec:
|
84
|
+
file: features/azure_app_service_metadata.feature
|
85
|
+
forcecreate: true
|
86
|
+
azure_functions_metadata.feature:
|
87
|
+
name: azure_functions_metadata.feature
|
88
|
+
scmid: default
|
89
|
+
sourceid: azure_functions_metadata.feature
|
90
|
+
kind: file
|
91
|
+
spec:
|
92
|
+
file: features/azure_functions_metadata.feature
|
93
|
+
forcecreate: true
|
94
|
+
otel_bridge.feature:
|
95
|
+
name: otel_bridge.feature
|
96
|
+
scmid: default
|
97
|
+
sourceid: otel_bridge.feature
|
98
|
+
kind: file
|
99
|
+
spec:
|
100
|
+
file: features/otel_bridge.feature
|
101
|
+
forcecreate: true
|
102
|
+
outcome.feature:
|
103
|
+
name: outcome.feature
|
104
|
+
scmid: default
|
105
|
+
sourceid: outcome.feature
|
106
|
+
kind: file
|
107
|
+
spec:
|
108
|
+
file: features/outcome.feature
|
109
|
+
forcecreate: true
|
110
|
+
user_agent.feature:
|
111
|
+
name: user_agent.feature
|
112
|
+
scmid: default
|
113
|
+
sourceid: user_agent.feature
|
114
|
+
kind: file
|
115
|
+
spec:
|
116
|
+
file: features/user_agent.feature
|
117
|
+
forcecreate: true
|
@@ -0,0 +1,121 @@
|
|
1
|
+
name: update-json-specs
|
2
|
+
pipelineid: update-json-specs
|
3
|
+
title: synchronize json specs
|
4
|
+
|
5
|
+
scms:
|
6
|
+
default:
|
7
|
+
kind: github
|
8
|
+
spec:
|
9
|
+
user: '{{ requiredEnv "GIT_USER" }}'
|
10
|
+
email: '{{ requiredEnv "GIT_EMAIL" }}'
|
11
|
+
owner: elastic
|
12
|
+
repository: apm-agent-ruby
|
13
|
+
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
|
14
|
+
username: '{{ requiredEnv "GIT_USER" }}'
|
15
|
+
branch: main
|
16
|
+
|
17
|
+
sources:
|
18
|
+
sha:
|
19
|
+
kind: file
|
20
|
+
spec:
|
21
|
+
file: 'https://github.com/elastic/apm/commit/main.patch'
|
22
|
+
matchpattern: "^From\\s([0-9a-f]{40})\\s"
|
23
|
+
transformers:
|
24
|
+
- findsubmatch:
|
25
|
+
pattern: "[0-9a-f]{40}"
|
26
|
+
|
27
|
+
container_metadata_discovery.json:
|
28
|
+
kind: file
|
29
|
+
spec:
|
30
|
+
file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/json-specs/container_metadata_discovery.json
|
31
|
+
service_resource_inference.json:
|
32
|
+
kind: file
|
33
|
+
spec:
|
34
|
+
file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/json-specs/service_resource_inference.json
|
35
|
+
span_types.json:
|
36
|
+
kind: file
|
37
|
+
spec:
|
38
|
+
file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/json-specs/span_types.json
|
39
|
+
sql_signature_examples.json:
|
40
|
+
kind: file
|
41
|
+
spec:
|
42
|
+
file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/json-specs/sql_signature_examples.json
|
43
|
+
sql_token_examples.json:
|
44
|
+
kind: file
|
45
|
+
spec:
|
46
|
+
file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/json-specs/sql_token_examples.json
|
47
|
+
w3c_distributed_tracing.json:
|
48
|
+
kind: file
|
49
|
+
spec:
|
50
|
+
file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/json-specs/w3c_distributed_tracing.json
|
51
|
+
wildcard_matcher_tests.json:
|
52
|
+
kind: file
|
53
|
+
spec:
|
54
|
+
file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/json-specs/wildcard_matcher_tests.json
|
55
|
+
actions:
|
56
|
+
pr:
|
57
|
+
kind: "github/pullrequest"
|
58
|
+
scmid: default
|
59
|
+
title: '[Automation] Update JSON specs'
|
60
|
+
spec:
|
61
|
+
automerge: false
|
62
|
+
draft: false
|
63
|
+
labels:
|
64
|
+
- "automation"
|
65
|
+
description: |-
|
66
|
+
### What
|
67
|
+
APM agent specs automatic sync
|
68
|
+
### Why
|
69
|
+
*Changeset*
|
70
|
+
* https://github.com/elastic/apm/commit/{{ source "sha" }}
|
71
|
+
|
72
|
+
targets:
|
73
|
+
container_metadata_discovery.json:
|
74
|
+
name: container_metadata_discovery.json
|
75
|
+
scmid: default
|
76
|
+
sourceid: container_metadata_discovery.json
|
77
|
+
kind: file
|
78
|
+
spec:
|
79
|
+
file: spec/fixtures/container_metadata_discovery.json
|
80
|
+
service_resource_inference.json:
|
81
|
+
name: service_resource_inference.json
|
82
|
+
scmid: default
|
83
|
+
sourceid: service_resource_inference.json
|
84
|
+
kind: file
|
85
|
+
spec:
|
86
|
+
file: spec/fixtures/service_resource_inference.json
|
87
|
+
span_types.json:
|
88
|
+
name: span_types.json
|
89
|
+
scmid: default
|
90
|
+
sourceid: span_types.json
|
91
|
+
kind: file
|
92
|
+
spec:
|
93
|
+
file: spec/fixtures/span_types.json
|
94
|
+
sql_signature_examples.json:
|
95
|
+
name: sql_signature_examples.json
|
96
|
+
scmid: default
|
97
|
+
sourceid: sql_signature_examples.json
|
98
|
+
kind: file
|
99
|
+
spec:
|
100
|
+
file: spec/fixtures/sql_signature_examples.json
|
101
|
+
sql_token_examples.json:
|
102
|
+
name: sql_token_examples.json
|
103
|
+
scmid: default
|
104
|
+
sourceid: sql_token_examples.json
|
105
|
+
kind: file
|
106
|
+
spec:
|
107
|
+
file: spec/fixtures/sql_token_examples.json
|
108
|
+
w3c_distributed_tracing.json:
|
109
|
+
name: w3c_distributed_tracing.json
|
110
|
+
scmid: default
|
111
|
+
sourceid: w3c_distributed_tracing.json
|
112
|
+
kind: file
|
113
|
+
spec:
|
114
|
+
file: spec/fixtures/w3c_distributed_tracing.json
|
115
|
+
wildcard_matcher_tests.json:
|
116
|
+
name: wildcard_matcher_tests.json
|
117
|
+
scmid: default
|
118
|
+
sourceid: wildcard_matcher_tests.json
|
119
|
+
kind: file
|
120
|
+
spec:
|
121
|
+
file: spec/fixtures/wildcard_matcher_tests.json
|
@@ -0,0 +1,108 @@
|
|
1
|
+
name: update-specs
|
2
|
+
|
3
|
+
title: synchronize schema specs
|
4
|
+
|
5
|
+
scms:
|
6
|
+
default:
|
7
|
+
kind: github
|
8
|
+
spec:
|
9
|
+
user: '{{ requiredEnv "GIT_USER" }}'
|
10
|
+
email: '{{ requiredEnv "GIT_EMAIL" }}'
|
11
|
+
owner: elastic
|
12
|
+
repository: apm-agent-ruby
|
13
|
+
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
|
14
|
+
username: '{{ requiredEnv "GIT_USER" }}'
|
15
|
+
branch: main
|
16
|
+
|
17
|
+
sources:
|
18
|
+
sha:
|
19
|
+
kind: file
|
20
|
+
spec:
|
21
|
+
file: 'https://github.com/elastic/apm-data/commit/main.patch'
|
22
|
+
matchpattern: "^From\\s([0-9a-f]{40})\\s"
|
23
|
+
transformers:
|
24
|
+
- findsubmatch:
|
25
|
+
pattern: "[0-9a-f]{40}"
|
26
|
+
error.json:
|
27
|
+
kind: file
|
28
|
+
spec:
|
29
|
+
file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/error.json
|
30
|
+
metadata.json:
|
31
|
+
kind: file
|
32
|
+
spec:
|
33
|
+
file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/metadata.json
|
34
|
+
metricset.json:
|
35
|
+
kind: file
|
36
|
+
spec:
|
37
|
+
file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/metricset.json
|
38
|
+
span.json:
|
39
|
+
kind: file
|
40
|
+
spec:
|
41
|
+
file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/span.json
|
42
|
+
transaction.json:
|
43
|
+
kind: file
|
44
|
+
spec:
|
45
|
+
file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/transaction.json
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
actions:
|
52
|
+
pr:
|
53
|
+
kind: "github/pullrequest"
|
54
|
+
scmid: default
|
55
|
+
sourceid: sha
|
56
|
+
spec:
|
57
|
+
automerge: false
|
58
|
+
draft: false
|
59
|
+
labels:
|
60
|
+
- "automation"
|
61
|
+
description: |-
|
62
|
+
### What
|
63
|
+
APM agent json schema automatic sync
|
64
|
+
### Why
|
65
|
+
*Changeset*
|
66
|
+
* https://github.com/elastic/apm-data/commit/{{ source "sha" }}
|
67
|
+
|
68
|
+
targets:
|
69
|
+
error.json:
|
70
|
+
name: error.json
|
71
|
+
scmid: default
|
72
|
+
sourceid: error.json
|
73
|
+
kind: file
|
74
|
+
spec:
|
75
|
+
file: spec/fixtures/error.json
|
76
|
+
forcecreate: true
|
77
|
+
metadata.json:
|
78
|
+
name: metadata.json
|
79
|
+
scmid: default
|
80
|
+
sourceid: metadata.json
|
81
|
+
kind: file
|
82
|
+
spec:
|
83
|
+
file: spec/fixtures/metadata.json
|
84
|
+
forcecreate: true
|
85
|
+
metricset.json:
|
86
|
+
name: metricset.json
|
87
|
+
scmid: default
|
88
|
+
sourceid: metricset.json
|
89
|
+
kind: file
|
90
|
+
spec:
|
91
|
+
file: spec/fixtures/metricset.json
|
92
|
+
forcecreate: true
|
93
|
+
span.json:
|
94
|
+
name: span.json
|
95
|
+
scmid: default
|
96
|
+
sourceid: span.json
|
97
|
+
kind: file
|
98
|
+
spec:
|
99
|
+
file: spec/fixtures/span.json
|
100
|
+
forcecreate: true
|
101
|
+
transaction.json:
|
102
|
+
name: transaction.json
|
103
|
+
scmid: default
|
104
|
+
sourceid: transaction.json
|
105
|
+
kind: file
|
106
|
+
spec:
|
107
|
+
file: spec/fixtures/transaction.json
|
108
|
+
forcecreate: true
|
@@ -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"'
|
@@ -0,0 +1,70 @@
|
|
1
|
+
name: ci
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
paths-ignore:
|
6
|
+
- "**/*.asciidoc"
|
7
|
+
- "**/*.md"
|
8
|
+
push:
|
9
|
+
branches:
|
10
|
+
- main
|
11
|
+
paths-ignore:
|
12
|
+
- "**/*.asciidoc"
|
13
|
+
- "**/*.md"
|
14
|
+
|
15
|
+
permissions:
|
16
|
+
contents: read
|
17
|
+
|
18
|
+
jobs:
|
19
|
+
sanity-checks:
|
20
|
+
runs-on: ubuntu-latest
|
21
|
+
steps:
|
22
|
+
- uses: elastic/apm-pipeline-library/.github/actions/pre-commit@current
|
23
|
+
|
24
|
+
# Invokes the actual matrix workflow with the provided files.
|
25
|
+
matrix:
|
26
|
+
uses: ./.github/workflows/run-matrix.yml
|
27
|
+
with:
|
28
|
+
versionsFile: .ci/.ruby.yml
|
29
|
+
frameworksFile: .ci/.framework.yml
|
30
|
+
excludedFile: .ci/.exclude.yml
|
31
|
+
|
32
|
+
# Invokes the actual matrix workflow with the provided files.
|
33
|
+
# In this case it's for the main frameworks.
|
34
|
+
matrix-main-frameworks:
|
35
|
+
uses: ./.github/workflows/run-matrix.yml
|
36
|
+
with:
|
37
|
+
versionsFile: .ci/.ruby.yml
|
38
|
+
frameworksFile: .ci/.main_framework.yml
|
39
|
+
excludedFile: .ci/.exclude.yml
|
40
|
+
|
41
|
+
package:
|
42
|
+
runs-on: ubuntu-latest
|
43
|
+
steps:
|
44
|
+
- uses: actions/checkout@v3
|
45
|
+
- uses: ruby/setup-ruby@v1
|
46
|
+
with:
|
47
|
+
ruby-version: 2.6
|
48
|
+
- name: Install build system
|
49
|
+
run: .ci/scripts/install-build-system.sh
|
50
|
+
- name: Create gem
|
51
|
+
run: rake build
|
52
|
+
- uses: actions/upload-artifact@v3
|
53
|
+
with:
|
54
|
+
name: package
|
55
|
+
path: ./pkg/**/*
|
56
|
+
|
57
|
+
all:
|
58
|
+
if: always()
|
59
|
+
runs-on: ubuntu-latest
|
60
|
+
needs:
|
61
|
+
- sanity-checks
|
62
|
+
- matrix
|
63
|
+
- matrix-main-frameworks
|
64
|
+
- package
|
65
|
+
steps:
|
66
|
+
- id: check
|
67
|
+
uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current
|
68
|
+
with:
|
69
|
+
needs: ${{ toJSON(needs) }}
|
70
|
+
- run: ${{ steps.check.outputs.isSuccess }}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
---
|
2
|
+
## Workflow to process coverage report
|
3
|
+
## For now the coverage is not reported. This workflow is just here as preparation for
|
4
|
+
## https://github.com/elastic/observability-robots/issues/1546
|
5
|
+
name: coverage-reporter
|
6
|
+
on:
|
7
|
+
workflow_run:
|
8
|
+
workflows:
|
9
|
+
- test
|
10
|
+
types:
|
11
|
+
- completed
|
12
|
+
|
13
|
+
permissions:
|
14
|
+
contents: read
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
report:
|
18
|
+
runs-on: ubuntu-latest
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v3
|
21
|
+
- name: Download artifacts
|
22
|
+
run: >
|
23
|
+
gh run download ${{ github.event.workflow_run.id }}
|
24
|
+
--name coverage
|
25
|
+
--repo "${GITHUB_REPOSITORY}"
|
26
|
+
--dir coverage
|
27
|
+
env:
|
28
|
+
GH_TOKEN: ${{ github.token }}
|
29
|
+
- run: ls -l coverage/matrix_results
|
30
|
+
# - run: ./spec/scripts/coverage_converge.sh
|
31
|
+
# - uses: actions/upload-artifact@v3
|
32
|
+
# with:
|
33
|
+
# name: coverage-report
|
34
|
+
# path: coverage/coverage.xml
|
@@ -0,0 +1,48 @@
|
|
1
|
+
name: microbenchmark
|
2
|
+
|
3
|
+
on:
|
4
|
+
workflow_dispatch:
|
5
|
+
push:
|
6
|
+
branches:
|
7
|
+
- main
|
8
|
+
paths-ignore:
|
9
|
+
- '**.md'
|
10
|
+
- '**.asciidoc'
|
11
|
+
|
12
|
+
# limit the access of the generated GITHUB_TOKEN
|
13
|
+
permissions:
|
14
|
+
contents: read
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
microbenchmark:
|
18
|
+
runs-on: ubuntu-latest
|
19
|
+
# wait up to 1 hour
|
20
|
+
timeout-minutes: 60
|
21
|
+
steps:
|
22
|
+
- id: buildkite
|
23
|
+
name: Run buildkite pipeline
|
24
|
+
uses: elastic/apm-pipeline-library/.github/actions/buildkite@current
|
25
|
+
with:
|
26
|
+
vaultUrl: ${{ secrets.VAULT_ADDR }}
|
27
|
+
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
|
28
|
+
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
|
29
|
+
pipeline: apm-agent-microbenchmark
|
30
|
+
triggerMessage: "${{ github.repository }}@${{ github.ref_name }}"
|
31
|
+
waitFor: true
|
32
|
+
printBuildLogs: true
|
33
|
+
buildEnvVars: |
|
34
|
+
script=.ci/scripts/bench.sh
|
35
|
+
repo=apm-agent-ruby
|
36
|
+
sha=${{ github.sha }}
|
37
|
+
BRANCH_NAME=${{ github.ref_name }}
|
38
|
+
|
39
|
+
- if: ${{ failure() }}
|
40
|
+
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
|
41
|
+
with:
|
42
|
+
url: ${{ secrets.VAULT_ADDR }}
|
43
|
+
roleId: ${{ secrets.VAULT_ROLE_ID }}
|
44
|
+
secretId: ${{ secrets.VAULT_SECRET_ID }}
|
45
|
+
channel: "#apm-agent-ruby"
|
46
|
+
message: |
|
47
|
+
:ghost: [${{ github.repository }}] microbenchmark *${{ github.ref_name }}* failed to run in Buildkite.
|
48
|
+
Build: (<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>)
|
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
name: OpenTelemetry Export Trace
|
3
|
+
|
4
|
+
on:
|
5
|
+
workflow_run:
|
6
|
+
workflows:
|
7
|
+
- Auto Assign to Project(s)
|
8
|
+
- Issue Labeler
|
9
|
+
- ci
|
10
|
+
- coverage-reporter
|
11
|
+
- microbenchmark
|
12
|
+
- release
|
13
|
+
- run-matrix
|
14
|
+
- snapshoty
|
15
|
+
- test-reporter
|
16
|
+
- updatecli
|
17
|
+
types: [completed]
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
otel-export-trace:
|
21
|
+
runs-on: ubuntu-latest
|
22
|
+
steps:
|
23
|
+
- uses: elastic/apm-pipeline-library/.github/actions/opentelemetry@current
|
24
|
+
with:
|
25
|
+
vaultUrl: ${{ secrets.VAULT_ADDR }}
|
26
|
+
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
|
27
|
+
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
name: release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- "v[0-9]+*"
|
7
|
+
|
8
|
+
permissions:
|
9
|
+
contents: write
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
release:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v3
|
16
|
+
- uses: ruby/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: 2.6
|
19
|
+
- uses: hashicorp/vault-action@v2.4.2
|
20
|
+
with:
|
21
|
+
url: ${{ secrets.VAULT_ADDR }}
|
22
|
+
method: approle
|
23
|
+
roleId: ${{ secrets.VAULT_ROLE_ID }}
|
24
|
+
secretId: ${{ secrets.VAULT_SECRET_ID }}
|
25
|
+
secrets: |
|
26
|
+
secret/apm-team/ci/apm-agent-ruby-rubygems-release apiKey | API_KEY ;
|
27
|
+
- name: RubyGems login
|
28
|
+
run: |
|
29
|
+
RUBY_HOME="${HOME}/.gem"
|
30
|
+
RUBY_CREDENTIALS_FILE="${RUBY_HOME}/credentials"
|
31
|
+
mkdir -p "${RUBY_HOME}"
|
32
|
+
echo '---' > "${RUBY_CREDENTIALS_FILE}"
|
33
|
+
echo ":rubygems_api_key: ${API_KEY}" >> "${RUBY_CREDENTIALS_FILE}"
|
34
|
+
chmod 0600 "${RUBY_CREDENTIALS_FILE}"
|
35
|
+
- name: Install build system
|
36
|
+
run: .ci/scripts/install-build-system.sh
|
37
|
+
- run: rake release
|
38
|
+
update-branch:
|
39
|
+
needs:
|
40
|
+
- release
|
41
|
+
runs-on: ubuntu-latest
|
42
|
+
steps:
|
43
|
+
- uses: actions/checkout@v3
|
44
|
+
- uses: ruby/setup-ruby@v1
|
45
|
+
with:
|
46
|
+
ruby-version: 2.6
|
47
|
+
- name: Setup Git
|
48
|
+
uses: elastic/apm-pipeline-library/.github/actions/setup-git@current
|
49
|
+
- name: Install build system
|
50
|
+
run: .ci/scripts/install-build-system.sh
|
51
|
+
- run: rake release:update_branch
|
52
|
+
|
53
|
+
status:
|
54
|
+
if: always()
|
55
|
+
runs-on: ubuntu-latest
|
56
|
+
needs:
|
57
|
+
- release
|
58
|
+
- update-branch
|
59
|
+
steps:
|
60
|
+
- id: check
|
61
|
+
uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current
|
62
|
+
with:
|
63
|
+
needs: ${{ toJSON(needs) }}
|
64
|
+
- run: ${{ steps.check.outputs.isSuccess }}
|
65
|
+
- if: always()
|
66
|
+
uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current
|
67
|
+
with:
|
68
|
+
vaultUrl: ${{ secrets.VAULT_ADDR }}
|
69
|
+
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
|
70
|
+
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
|
71
|
+
slackChannel: "#apm-agent-ruby"
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
# Runs the tests based on the provided files in ci.yml
|
3
|
+
name: run-matrix
|
4
|
+
|
5
|
+
on:
|
6
|
+
workflow_call:
|
7
|
+
inputs:
|
8
|
+
versionsFile:
|
9
|
+
required: true
|
10
|
+
type: string
|
11
|
+
frameworksFile:
|
12
|
+
required: true
|
13
|
+
type: string
|
14
|
+
excludedFile:
|
15
|
+
required: true
|
16
|
+
type: string
|
17
|
+
|
18
|
+
jobs:
|
19
|
+
create-test-matrix:
|
20
|
+
runs-on: ubuntu-latest
|
21
|
+
outputs:
|
22
|
+
matrix: ${{ steps.generate.outputs.matrix }}
|
23
|
+
steps:
|
24
|
+
- uses: actions/checkout@v3
|
25
|
+
- id: generate
|
26
|
+
uses: elastic/apm-pipeline-library/.github/actions/version-framework@current
|
27
|
+
with:
|
28
|
+
versionsFile: ${{ inputs.versionsFile }}
|
29
|
+
frameworksFile: ${{ inputs.frameworksFile }}
|
30
|
+
excludedFile: ${{ inputs.excludedFile }}
|
31
|
+
test:
|
32
|
+
needs:
|
33
|
+
- create-test-matrix
|
34
|
+
runs-on: ubuntu-latest
|
35
|
+
strategy:
|
36
|
+
fail-fast: false
|
37
|
+
max-parallel: 20
|
38
|
+
matrix: ${{ fromJSON(needs.create-test-matrix.outputs.matrix) }}
|
39
|
+
steps:
|
40
|
+
- uses: actions/checkout@v3
|
41
|
+
- name: Run BDD tests
|
42
|
+
run: ./spec/scripts/features.sh ${{ matrix.version }}
|
43
|
+
- name: Run test
|
44
|
+
run: ./spec/scripts/spec.sh ${{ matrix.version }} ${{ matrix.framework }}
|
45
|
+
env:
|
46
|
+
JUNIT_PREFIX: ${{ matrix.version }}-${{ matrix.framework }}
|
47
|
+
- if: success() || failure()
|
48
|
+
uses: actions/upload-artifact@v3
|
49
|
+
with:
|
50
|
+
name: test-results
|
51
|
+
path: "**/spec/junit-reports/**/*ruby-agent-junit.xml"
|
52
|
+
- if: success() || failure()
|
53
|
+
uses: actions/upload-artifact@v3
|
54
|
+
with:
|
55
|
+
name: coverage
|
56
|
+
path: "coverage/"
|