elastic-apm 4.7.3 → 4.8.0

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.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.ci/.exclude.yml +21 -82
  3. data/.ci/.framework.yml +1 -4
  4. data/.ci/.ruby.yml +1 -1
  5. data/.ci/updatecli/values.d/apm-data-spec.yml +1 -0
  6. data/.ci/updatecli/values.d/apm-gherkin.yml +1 -0
  7. data/.ci/updatecli/values.d/apm-json-specs.yml +1 -0
  8. data/.ci/updatecli/values.d/scm.yml +10 -0
  9. data/.ci/updatecli/values.d/update-compose.yml +3 -0
  10. data/.github/PULL_REQUEST_TEMPLATE.md +2 -2
  11. data/.github/dependabot.yml +24 -19
  12. data/.github/workflows/README.md +1 -2
  13. data/.github/workflows/addToProject.yml +16 -2
  14. data/.github/workflows/ci.yml +6 -6
  15. data/.github/workflows/docs-build.yml +19 -0
  16. data/.github/workflows/docs-cleanup.yml +14 -0
  17. data/.github/workflows/github-commands-comment.yml +38 -0
  18. data/.github/workflows/microbenchmark.yml +7 -24
  19. data/.github/workflows/release.yml +39 -24
  20. data/.github/workflows/run-matrix.yml +21 -12
  21. data/.github/workflows/test-reporter.yml +4 -3
  22. data/.github/workflows/updatecli.yml +45 -13
  23. data/Gemfile +13 -0
  24. data/bin/dev +2 -2
  25. data/docs/docset.yml +9 -0
  26. data/docs/reference/advanced-topics.md +12 -0
  27. data/docs/reference/api-reference.md +422 -0
  28. data/docs/reference/configuration.md +734 -0
  29. data/docs/{context.asciidoc → reference/context.md} +21 -21
  30. data/docs/reference/custom-instrumentation.md +72 -0
  31. data/docs/{getting-started-rack.asciidoc → reference/getting-started-rack.md} +20 -29
  32. data/docs/reference/getting-started-rails.md +27 -0
  33. data/docs/reference/graphql.md +21 -0
  34. data/docs/reference/index.md +24 -0
  35. data/docs/{logs.asciidoc → reference/logs.md} +38 -56
  36. data/docs/reference/metrics.md +199 -0
  37. data/docs/reference/opentracing-api.md +70 -0
  38. data/docs/reference/performance-tuning.md +71 -0
  39. data/docs/reference/set-up-apm-ruby-agent.md +16 -0
  40. data/docs/reference/supported-technologies.md +128 -0
  41. data/docs/reference/toc.yml +22 -0
  42. data/docs/reference/upgrading.md +19 -0
  43. data/docs/release-notes/index.md +166 -0
  44. data/docs/release-notes/known-issues.md +24 -0
  45. data/docs/release-notes/toc.yml +3 -0
  46. data/lib/elastic_apm/context_builder.rb +5 -2
  47. data/lib/elastic_apm/spies/sidekiq.rb +2 -1
  48. data/lib/elastic_apm/stacktrace_builder.rb +3 -3
  49. data/lib/elastic_apm/version.rb +1 -1
  50. data/updatecli-compose.yaml +23 -0
  51. metadata +37 -36
  52. data/.ci/snapshoty.yml +0 -33
  53. data/.ci/updatecli/updatecli.d/update-gherkin-specs.yml +0 -84
  54. data/.ci/updatecli/updatecli.d/update-json-specs.yml +0 -84
  55. data/.ci/updatecli/updatecli.d/update-specs.yml +0 -86
  56. data/.ci/updatecli/values.yml +0 -14
  57. data/.github/workflows/coverage-reporter.yml +0 -34
  58. data/.github/workflows/opentelemetry.yml +0 -22
  59. data/.github/workflows/snapshoty.yml +0 -35
  60. data/CHANGELOG.asciidoc +0 -990
  61. data/docs/advanced.asciidoc +0 -14
  62. data/docs/api.asciidoc +0 -487
  63. data/docs/configuration.asciidoc +0 -889
  64. data/docs/custom-instrumentation.asciidoc +0 -80
  65. data/docs/debugging.asciidoc +0 -44
  66. data/docs/getting-started-rails.asciidoc +0 -30
  67. data/docs/graphql.asciidoc +0 -23
  68. data/docs/index.asciidoc +0 -38
  69. data/docs/introduction.asciidoc +0 -36
  70. data/docs/metrics.asciidoc +0 -235
  71. data/docs/opentracing.asciidoc +0 -94
  72. data/docs/performance-tuning.asciidoc +0 -106
  73. data/docs/redirects.asciidoc +0 -9
  74. data/docs/release-notes.asciidoc +0 -15
  75. data/docs/set-up.asciidoc +0 -19
  76. data/docs/supported-technologies.asciidoc +0 -157
  77. data/docs/upgrading.asciidoc +0 -18
  78. /data/docs/{images → reference/images}/dynamic-config.svg +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0fb7f8389ec374ccb57a8496ba24e365006ce44590d4ab064763133c8129cdf4
4
- data.tar.gz: 4010d4aeaea7c13d15cfd6a0fce757ab1d7477b5be7a72d350012a07a6b473a6
3
+ metadata.gz: 5ebd8a3592a4632b3f13811b920430b0052a67d80c921827ceb6639764c99de1
4
+ data.tar.gz: 485ec2dcb2f45d58fef2dbdb2acaa2cf515d33d0ce634bc44ef6f0f526e80f41
5
5
  SHA512:
6
- metadata.gz: 5e0a026ec99b9ccd90c2f17ce4929cc583dc331582a9ad5e64b71410c0099da6f8478d3306c72d8cd9031d8c728f86d663325fdafe16381dd15a0302317fd747
7
- data.tar.gz: 3df0f2d41ab038328f30ddbf7e88e2a3c0708004b64de06df165bfb073dde2bf37a546cf4b6a3c3f7c5971ff27698094cf48f480df96dff2c639b3b6986d47af
6
+ metadata.gz: d39a813a6c001fe599e397ec74b8a5037ad3b07c9c0710124046f58ffb96a06c18bbd0021672d6b00e55ef1317a008f354ddf5061eb58ba560ab1684bbb29a0b
7
+ data.tar.gz: e72c6f09511b8f2884e7f07d053c8ee4618fc18692e453e4afafd81d164f890fe2fd6c39b1f47097ae828d789c620c72c6448ca85a30746925be4be9ca24625e
data/.ci/.exclude.yml CHANGED
@@ -2,19 +2,15 @@ exclude:
2
2
  # Ruby 2.4
3
3
  # Only test on rails-4.2, sinatra-1.4
4
4
  - VERSION: ruby:2.4
5
- FRAMEWORK: rails-7.0
5
+ FRAMEWORK: rails-7.2
6
6
  - VERSION: ruby:2.4
7
7
  FRAMEWORK: rails-6.1
8
- - VERSION: ruby:2.4
9
- FRAMEWORK: rails-6.0
10
8
  - VERSION: ruby:2.4
11
9
  FRAMEWORK: rails-5.2
12
10
  - VERSION: ruby:2.4
13
11
  FRAMEWORK: sinatra-2.2
14
12
  - VERSION: ruby:2.4
15
13
  FRAMEWORK: grape-1.6
16
- - VERSION: ruby:2.4
17
- FRAMEWORK: grape-1.6,sinatra-2.2,rails-6.0
18
14
  - VERSION: ruby:2.4
19
15
  FRAMEWORK: rails-main
20
16
  - VERSION: ruby:2.4
@@ -24,9 +20,9 @@ exclude:
24
20
 
25
21
  # rails-4.2 exclusions
26
22
  # Only test on ruby 2.4
27
- - VERSION: ruby:3.1
23
+ - VERSION: ruby:3.4
28
24
  FRAMEWORK: rails-4.2
29
- - VERSION: ruby:3.0
25
+ - VERSION: ruby:3.1
30
26
  FRAMEWORK: rails-4.2
31
27
  - VERSION: ruby:2.7
32
28
  FRAMEWORK: rails-4.2
@@ -43,8 +39,6 @@ exclude:
43
39
  # sinatra-1.4 exclusions
44
40
  - VERSION: ruby:3.1
45
41
  FRAMEWORK: sinatra-1.4
46
- - VERSION: ruby:3.0
47
- FRAMEWORK: sinatra-1.4
48
42
  - VERSION: ruby:2.7
49
43
  FRAMEWORK: sinatra-1.4
50
44
  - VERSION: jruby:9.2
@@ -56,22 +50,18 @@ exclude:
56
50
  - VERSION: elasticobservability/jruby:9.2-8-jdk
57
51
  FRAMEWORK: sinatra-1.4
58
52
 
59
- # rails-6.0 and rails-6.1 exclusions
53
+ # rails-6.1 and rails 7.0 exclusions
60
54
  # Don't test on ruby 2.4
61
55
  - VERSION: ruby:2.4
62
56
  FRAMEWORK: rails-6.1
63
57
  - VERSION: ruby:2.4
64
- FRAMEWORK: rails-6.0
58
+ FRAMEWORK: rails-7.2
65
59
 
66
60
  # Only test rails main on ruby 3.1
67
- - VERSION: ruby:3.0
68
- FRAMEWORK: rails-main
69
61
  - VERSION: ruby:2.7
70
62
  FRAMEWORK: rails-main
71
63
  - VERSION: ruby:2.6
72
64
  FRAMEWORK: rails-main
73
- - VERSION: ruby:2.5
74
- FRAMEWORK: rails-main
75
65
  - VERSION: ruby:2.4
76
66
  FRAMEWORK: rails-main
77
67
  - VERSION: jruby:9.2
@@ -83,29 +73,25 @@ exclude:
83
73
  - VERSION: elasticobservability/jruby:9.2-8-jdk
84
74
  FRAMEWORK: rails-main
85
75
 
86
- # Only test rails 7.0 on ruby >= 2.7
76
+ # Only test rails 7.2 on ruby >= 3.1
77
+ - VERSION: ruby:2.7
78
+ FRAMEWORK: rails-7.2
87
79
  - VERSION: ruby:2.6
88
- FRAMEWORK: rails-7.0
89
- - VERSION: ruby:2.5
90
- FRAMEWORK: rails-7.0
80
+ FRAMEWORK: rails-7.2
91
81
  - VERSION: ruby:2.4
92
- FRAMEWORK: rails-7.0
82
+ FRAMEWORK: rails-7.2
93
83
  - VERSION: jruby:9.2
94
- FRAMEWORK: rails-7.0
84
+ FRAMEWORK: rails-7.2
95
85
  - VERSION: elasticobservability/jruby:9.2-13-jdk
96
- FRAMEWORK: rails-7.0
86
+ FRAMEWORK: rails-7.2
97
87
  - VERSION: elasticobservability/jruby:9.2-11-jdk
98
- FRAMEWORK: rails-7.0
88
+ FRAMEWORK: rails-7.2
99
89
  - VERSION: elasticobservability/jruby:9.2-8-jdk
100
- FRAMEWORK: rails-7.0
90
+ FRAMEWORK: rails-7.2
101
91
 
102
92
  # Only test sinatra main on ruby 2.7 and ruby 3.1
103
- - VERSION: ruby:3.0
104
- FRAMEWORK: sinatra-main
105
93
  - VERSION: ruby:2.6
106
94
  FRAMEWORK: sinatra-main
107
- - VERSION: ruby:2.5
108
- FRAMEWORK: sinatra-main
109
95
  - VERSION: ruby:2.4
110
96
  FRAMEWORK: sinatra-main
111
97
  - VERSION: jruby:9.2
@@ -117,11 +103,9 @@ exclude:
117
103
  - VERSION: elasticobservability/jruby:9.2-8-jdk
118
104
  FRAMEWORK: sinatra-main
119
105
 
120
- # Only test grape master on ruby 2.7 and ruby 3.0
106
+ # Only test grape master on ruby 2.7 and ruby 3.1
121
107
  - VERSION: ruby:2.6
122
108
  FRAMEWORK: grape-master
123
- - VERSION: ruby:2.5
124
- FRAMEWORK: grape-master
125
109
  - VERSION: ruby:2.4
126
110
  FRAMEWORK: grape-master
127
111
  - VERSION: jruby:9.2
@@ -133,61 +117,16 @@ exclude:
133
117
  - VERSION: elasticobservability/jruby:9.2-8-jdk
134
118
  FRAMEWORK: grape-master
135
119
 
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
120
+ # grape 1.5 doesn't support ruby 3.1
141
121
  - VERSION: ruby:3.1
142
- FRAMEWORK: grape-1.6,sinatra-2.2,rails-6.1
143
- - VERSION: ruby:3.0
144
122
  FRAMEWORK: grape-1.6
145
- - VERSION: ruby:3.0
146
- FRAMEWORK: grape-1.6,sinatra-2.2,rails-6.1
147
123
 
148
- # only test ruby >= 3.0 with rails 6.0 and rails 6.1
149
- - VERSION: ruby:3.1
124
+ # only test ruby >= 3.1 with rails 6.1 and rails 7.0
125
+ - VERSION: ruby:3.4
150
126
  FRAMEWORK: rails-5.2
151
- - VERSION: ruby:3.1
127
+ - VERSION: ruby:3.4
152
128
  FRAMEWORK: rails-5.1
153
- - VERSION: ruby:3.0
129
+ - VERSION: ruby:3.1
154
130
  FRAMEWORK: rails-5.2
155
- - VERSION: ruby:3.0
131
+ - VERSION: ruby:3.1
156
132
  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/.framework.yml CHANGED
@@ -1,7 +1,6 @@
1
1
  FRAMEWORK:
2
- - rails-7.0
2
+ - rails-7.2
3
3
  - rails-6.1
4
- - rails-6.0
5
4
  - rails-5.2
6
5
  - rails-4.2
7
6
 
@@ -9,5 +8,3 @@ FRAMEWORK:
9
8
  - sinatra-1.4
10
9
 
11
10
  - grape-1.6
12
-
13
- - grape-1.6,sinatra-2.2,rails-6.1
data/.ci/.ruby.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  VERSION:
2
+ - ruby:3.4
2
3
  - ruby:3.1
3
- - ruby:3.0
4
4
  - ruby:2.7
5
5
  - ruby:2.6
6
6
  - ruby:2.4
@@ -0,0 +1 @@
1
+ apm_schema_specs_path: spec/fixtures
@@ -0,0 +1 @@
1
+ apm_gherkin_specs_path: features
@@ -0,0 +1 @@
1
+ apm_json_specs_path: spec/fixtures
@@ -0,0 +1,10 @@
1
+ scm:
2
+ enabled: true
3
+ owner: elastic
4
+ repository: apm-agent-ruby
5
+ branch: main
6
+ commitusingapi: true
7
+ # begin update-compose policy values
8
+ user: obltmachine
9
+ email: obltmachine@users.noreply.github.com
10
+ # end update-compose policy values
@@ -0,0 +1,3 @@
1
+ spec:
2
+ files:
3
+ - "updatecli-compose.yaml"
@@ -46,8 +46,8 @@ Update your local repository with the most recent code from the main repo, and r
46
46
  Run the test suite to make sure that nothing is broken. See https://github.com/elastic/apm-agent-ruby/blob/main/CONTRIBUTING.md#testing for details.
47
47
  -->
48
48
  - [ ] I have made corresponding changes to the documentation
49
- - [ ] I have updated [CHANGELOG.asciidoc](CHANGELOG.asciidoc)
50
- - [ ] I have updated [supported-technologies.asciidoc](docs/supported-technologies.asciidoc)
49
+ - [ ] I have updated [docs/release-notes/index.md](../docs/release-notes/index.md)
50
+ - [ ] I have updated [docs/reference/supported-technologies.md](../docs/reference/supported-technologies.md)
51
51
  - [ ] Added an API method or config option? Document in which version this will be introduced
52
52
 
53
53
  ## Related issues
@@ -1,31 +1,36 @@
1
+ ---
1
2
  version: 2
2
3
  updates:
3
- - package-ecosystem: bundler
4
- directory: "/"
5
- schedule:
6
- interval: "weekly"
7
- day: "sunday"
8
- time: "22:00"
9
- open-pull-requests-limit: 10
10
- ignore:
11
- - dependency-name: sucker_punch
12
- versions:
13
- - "> 2.0"
14
- - dependency-name: i18n
15
- versions:
16
- - 1.8.10
17
- - 1.8.8
18
- - 1.8.9
19
4
 
20
- # GitHub actions
5
+ - package-ecosystem: bundler
6
+ directory: "/"
7
+ schedule:
8
+ interval: "weekly"
9
+ day: "sunday"
10
+ time: "22:00"
11
+ open-pull-requests-limit: 5
12
+ ignore:
13
+ - dependency-name: sucker_punch
14
+ versions:
15
+ - "> 2.0"
16
+ - dependency-name: i18n
17
+ versions:
18
+ - 1.8.10
19
+ - 1.8.8
20
+ - 1.8.9
21
+
22
+ # Maintain dependencies for GitHub Actions (/.github/workflows)
21
23
  - package-ecosystem: "github-actions"
22
24
  directory: "/"
23
- reviewers:
24
- - "elastic/observablt-ci"
25
25
  schedule:
26
26
  interval: "weekly"
27
27
  day: "sunday"
28
28
  time: "22:00"
29
+ open-pull-requests-limit: 5
30
+ reviewers:
31
+ - "elastic/observablt-ci"
32
+ labels:
33
+ - dependencies
29
34
  groups:
30
35
  github-actions:
31
36
  patterns:
@@ -11,7 +11,6 @@ There are 5 main stages that run on GitHub actions:
11
11
  There are some other stages that run for every push on the main branches:
12
12
 
13
13
  * [Microbenchmark](./microbenchmark.yml)
14
- * [Snapshoty](./snapshoty.yml)
15
14
 
16
15
  ### Scenarios
17
16
 
@@ -50,7 +49,7 @@ The tag release follows the naming convention: `v.<major>.<minor>.<patch>`, wher
50
49
 
51
50
  ### OpenTelemetry
52
51
 
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).
52
+ Every workflow and its logs are exported to OpenTelemetry traces/logs/metrics. Those details can be seen [here](https://ela.st/oblt-ci-cd-stats) (**NOTE**: only available for Elasticians).
54
53
 
55
54
  ## Bump automation
56
55
 
@@ -5,8 +5,6 @@ on:
5
5
  types: [opened, edited, milestoned]
6
6
  pull_request_target:
7
7
  types: [opened, edited, milestoned]
8
- env:
9
- MY_GITHUB_TOKEN: ${{ secrets.APM_TECH_USER_TOKEN }}
10
8
 
11
9
  permissions:
12
10
  contents: read
@@ -16,6 +14,18 @@ jobs:
16
14
  runs-on: ubuntu-latest
17
15
  name: Assign milestoned to Project
18
16
  steps:
17
+ - name: Get token
18
+ id: get_token
19
+ uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
20
+ with:
21
+ app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
22
+ private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
23
+ permissions: >-
24
+ {
25
+ "issues": "read",
26
+ "organization_projects": "write",
27
+ "pull_requests": "read"
28
+ }
19
29
  - name: Assign issues with milestones to project
20
30
  uses: elastic/assign-one-project-github-action@1.2.2
21
31
  if: github.event.issue && github.event.issue.milestone
@@ -23,6 +33,8 @@ jobs:
23
33
  project: 'https://github.com/orgs/elastic/projects/454'
24
34
  project_id: '5882982'
25
35
  column_name: 'Planned'
36
+ env:
37
+ MY_GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
26
38
  - name: Assign new pull requests to project
27
39
  uses: elastic/assign-one-project-github-action@1.2.2
28
40
  if: github.event.action == 'opened' && github.event.pull_request
@@ -30,3 +42,5 @@ jobs:
30
42
  project: 'https://github.com/orgs/elastic/projects/454'
31
43
  project_id: '5882982'
32
44
  column_name: 'In Progress'
45
+ env:
46
+ MY_GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
@@ -19,7 +19,7 @@ jobs:
19
19
  sanity-checks:
20
20
  runs-on: ubuntu-latest
21
21
  steps:
22
- - uses: elastic/apm-pipeline-library/.github/actions/pre-commit@current
22
+ - uses: elastic/oblt-actions/pre-commit@v1
23
23
 
24
24
  # Invokes the actual matrix workflow with the provided files.
25
25
  matrix:
@@ -41,7 +41,7 @@ jobs:
41
41
  package:
42
42
  runs-on: ubuntu-latest
43
43
  steps:
44
- - uses: actions/checkout@v3
44
+ - uses: actions/checkout@v4
45
45
  - uses: ruby/setup-ruby@v1
46
46
  with:
47
47
  ruby-version: 2.6
@@ -49,7 +49,7 @@ jobs:
49
49
  run: .ci/scripts/install-build-system.sh
50
50
  - name: Create gem
51
51
  run: rake build
52
- - uses: actions/upload-artifact@v3
52
+ - uses: actions/upload-artifact@v4
53
53
  with:
54
54
  name: package
55
55
  path: ./pkg/**/*
@@ -64,7 +64,7 @@ jobs:
64
64
  - package
65
65
  steps:
66
66
  - id: check
67
- uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current
67
+ uses: elastic/oblt-actions/check-dependent-jobs@v1
68
68
  with:
69
- needs: ${{ toJSON(needs) }}
70
- - run: ${{ steps.check.outputs.isSuccess }}
69
+ jobs: ${{ toJSON(needs) }}
70
+ - run: ${{ steps.check.outputs.is-success }}
@@ -0,0 +1,19 @@
1
+ name: docs-build
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request_target: ~
8
+ merge_group: ~
9
+
10
+ jobs:
11
+ docs-preview:
12
+ uses: elastic/docs-builder/.github/workflows/preview-build.yml@main
13
+ with:
14
+ path-pattern: docs/**
15
+ permissions:
16
+ deployments: write
17
+ id-token: write
18
+ contents: read
19
+ pull-requests: read
@@ -0,0 +1,14 @@
1
+ name: docs-cleanup
2
+
3
+ on:
4
+ pull_request_target:
5
+ types:
6
+ - closed
7
+
8
+ jobs:
9
+ docs-preview:
10
+ uses: elastic/docs-builder/.github/workflows/preview-cleanup.yml@main
11
+ permissions:
12
+ contents: none
13
+ id-token: write
14
+ deployments: write
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: github-commands-comment
3
+
4
+ on:
5
+ pull_request_target:
6
+ types:
7
+ - opened
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ comment:
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ issues: write
17
+ pull-requests: write
18
+ steps:
19
+ - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
20
+ with:
21
+ script: |
22
+ const body = `
23
+ ### :robot: GitHub comments
24
+
25
+ <details><summary>Expand to view the GitHub comments</summary>
26
+ <p>
27
+
28
+ Just comment with:
29
+ - `run` `docs-build` : Re-trigger the docs validation. (use unformatted text in the comment!)
30
+ </p>
31
+ </details>
32
+ `.replace(/ +/g, '')
33
+ github.rest.issues.createComment({
34
+ issue_number: context.issue.number,
35
+ owner: context.repo.owner,
36
+ repo: context.repo.repo,
37
+ body: body
38
+ })
@@ -16,33 +16,16 @@ permissions:
16
16
  jobs:
17
17
  microbenchmark:
18
18
  runs-on: ubuntu-latest
19
- # wait up to 1 hour
20
- timeout-minutes: 60
19
+ timeout-minutes: 5
21
20
  steps:
22
- - id: buildkite
23
- name: Run buildkite pipeline
24
- uses: elastic/apm-pipeline-library/.github/actions/buildkite@current
21
+ - name: Run microbenchmark
22
+ uses: elastic/oblt-actions/buildkite/run@v1
25
23
  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: |
24
+ pipeline: "apm-agent-microbenchmark"
25
+ token: ${{ secrets.BUILDKITE_TOKEN }}
26
+ wait-for: false
27
+ env-vars: |
34
28
  script=.ci/scripts/bench.sh
35
29
  repo=apm-agent-ruby
36
30
  sha=${{ github.sha }}
37
31
  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>)
@@ -4,51 +4,67 @@ on:
4
4
  push:
5
5
  tags:
6
6
  - "v[0-9]+*"
7
+ branches:
8
+ - main
7
9
 
8
10
  permissions:
9
- contents: write
11
+ contents: read
10
12
 
11
13
  jobs:
12
14
  release:
13
15
  runs-on: ubuntu-latest
16
+ permissions:
17
+ attestations: write
18
+ contents: write
19
+ id-token: write
14
20
  steps:
15
- - uses: actions/checkout@v3
21
+ - uses: actions/checkout@v4
16
22
  - uses: ruby/setup-ruby@v1
17
23
  with:
18
24
  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
25
  - name: RubyGems login
28
26
  run: |
29
27
  RUBY_HOME="${HOME}/.gem"
30
28
  RUBY_CREDENTIALS_FILE="${RUBY_HOME}/credentials"
31
29
  mkdir -p "${RUBY_HOME}"
32
30
  echo '---' > "${RUBY_CREDENTIALS_FILE}"
33
- echo ":rubygems_api_key: ${API_KEY}" >> "${RUBY_CREDENTIALS_FILE}"
31
+ echo ":rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" >> "${RUBY_CREDENTIALS_FILE}"
34
32
  chmod 0600 "${RUBY_CREDENTIALS_FILE}"
33
+
35
34
  - name: Install build system
36
35
  run: .ci/scripts/install-build-system.sh
37
- - run: rake release
36
+
37
+ - name: rake release (only for tags)
38
+ run: rake release
39
+ if: startsWith(github.ref, 'refs/tags')
40
+
41
+ - name: rake build
42
+ run: rake build
43
+ if: ${{ ! startsWith(github.ref, 'refs/tags') }}
44
+
45
+ - name: generate build provenance
46
+ uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0
47
+ with:
48
+ subject-path: "${{ github.workspace }}/pkg/*.gem"
49
+
38
50
  update-branch:
39
51
  needs:
40
52
  - release
41
53
  runs-on: ubuntu-latest
54
+ permissions:
55
+ contents: write
42
56
  steps:
43
- - uses: actions/checkout@v3
57
+ - uses: actions/checkout@v4
44
58
  - uses: ruby/setup-ruby@v1
45
59
  with:
46
60
  ruby-version: 2.6
47
61
  - name: Setup Git
48
- uses: elastic/apm-pipeline-library/.github/actions/setup-git@current
62
+ uses: elastic/oblt-actions/git/setup@v1
49
63
  - name: Install build system
50
64
  run: .ci/scripts/install-build-system.sh
51
- - run: rake release:update_branch
65
+ - name: rake release:update_branch (only for tags)
66
+ run: rake release:update_branch
67
+ if: startsWith(github.ref, 'refs/tags')
52
68
 
53
69
  status:
54
70
  if: always()
@@ -58,14 +74,13 @@ jobs:
58
74
  - update-branch
59
75
  steps:
60
76
  - id: check
61
- uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current
77
+ uses: elastic/oblt-actions/check-dependent-jobs@v1
62
78
  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
79
+ jobs: ${{ toJSON(needs) }}
80
+ - run: ${{ steps.check.outputs.is-success }}
81
+ - if: ${{ always() && startsWith(github.ref, 'refs/tags') }}
82
+ uses: elastic/oblt-actions/slack/notify-result@v1
67
83
  with:
68
- vaultUrl: ${{ secrets.VAULT_ADDR }}
69
- vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
70
- vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
71
- slackChannel: "#apm-agent-ruby"
84
+ bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
85
+ channel-id: "#apm-agent-ruby"
86
+ message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>"