elastic-apm 4.6.2 → 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 (99) hide show
  1. checksums.yaml +4 -4
  2. data/.ci/.exclude.yml +132 -0
  3. data/.ci/{.jenkins_framework.yml → .framework.yml} +1 -4
  4. data/.ci/.ruby.yml +10 -0
  5. data/.ci/scripts/bench.sh +52 -0
  6. data/.ci/scripts/install-build-system.sh +5 -0
  7. data/.ci/updatecli/values.d/apm-data-spec.yml +1 -0
  8. data/.ci/updatecli/values.d/apm-gherkin.yml +1 -0
  9. data/.ci/updatecli/values.d/apm-json-specs.yml +1 -0
  10. data/.ci/updatecli/values.d/scm.yml +10 -0
  11. data/.ci/updatecli/values.d/update-compose.yml +3 -0
  12. data/.github/PULL_REQUEST_TEMPLATE.md +2 -2
  13. data/.github/dependabot.yml +35 -14
  14. data/.github/workflows/README.md +57 -0
  15. data/.github/workflows/addToProject.yml +19 -2
  16. data/.github/workflows/ci-docs.yml +20 -0
  17. data/.github/workflows/ci.yml +70 -0
  18. data/.github/workflows/docs-build.yml +19 -0
  19. data/.github/workflows/docs-cleanup.yml +14 -0
  20. data/.github/workflows/github-commands-comment.yml +38 -0
  21. data/.github/workflows/labeler.yml +5 -0
  22. data/.github/workflows/microbenchmark.yml +31 -0
  23. data/.github/workflows/release.yml +86 -0
  24. data/.github/workflows/run-matrix.yml +68 -0
  25. data/.github/workflows/test-reporter.yml +25 -0
  26. data/.github/workflows/updatecli.yml +61 -0
  27. data/.pre-commit-config.yaml +0 -2
  28. data/Gemfile +29 -3
  29. data/README.md +1 -1
  30. data/bench/rubyprof.rb +1 -0
  31. data/bin/dev +2 -2
  32. data/bin/run-tests +10 -1
  33. data/docker-compose.yml +4 -1
  34. data/docs/docset.yml +9 -0
  35. data/docs/reference/advanced-topics.md +12 -0
  36. data/docs/reference/api-reference.md +422 -0
  37. data/docs/reference/configuration.md +734 -0
  38. data/docs/{context.asciidoc → reference/context.md} +21 -21
  39. data/docs/reference/custom-instrumentation.md +72 -0
  40. data/docs/{getting-started-rack.asciidoc → reference/getting-started-rack.md} +20 -29
  41. data/docs/reference/getting-started-rails.md +27 -0
  42. data/docs/reference/graphql.md +21 -0
  43. data/docs/reference/index.md +24 -0
  44. data/docs/{log-correlation.asciidoc → reference/logs.md} +50 -41
  45. data/docs/reference/metrics.md +199 -0
  46. data/docs/reference/opentracing-api.md +70 -0
  47. data/docs/reference/performance-tuning.md +71 -0
  48. data/docs/reference/set-up-apm-ruby-agent.md +16 -0
  49. data/docs/reference/supported-technologies.md +128 -0
  50. data/docs/reference/toc.yml +22 -0
  51. data/docs/reference/upgrading.md +19 -0
  52. data/docs/release-notes/index.md +166 -0
  53. data/docs/release-notes/known-issues.md +24 -0
  54. data/docs/release-notes/toc.yml +3 -0
  55. data/lib/elastic_apm/context_builder.rb +15 -7
  56. data/lib/elastic_apm/metadata/cloud_info.rb +9 -7
  57. data/lib/elastic_apm/metrics.rb +24 -20
  58. data/lib/elastic_apm/span_helpers.rb +6 -6
  59. data/lib/elastic_apm/spies/action_dispatch.rb +11 -3
  60. data/lib/elastic_apm/spies/faraday.rb +8 -1
  61. data/lib/elastic_apm/spies/sidekiq.rb +2 -1
  62. data/lib/elastic_apm/stacktrace_builder.rb +3 -3
  63. data/lib/elastic_apm/version.rb +1 -1
  64. data/updatecli-compose.yaml +23 -0
  65. metadata +52 -44
  66. data/.ci/.jenkins_exclude.yml +0 -191
  67. data/.ci/.jenkins_ruby.yml +0 -10
  68. data/.ci/.jenkins_ruby_benchmarks.yml +0 -6
  69. data/.ci/Jenkinsfile +0 -450
  70. data/.ci/jobs/apm-agent-ruby-downstream.yml +0 -38
  71. data/.ci/jobs/apm-agent-ruby-linting-mbp.yml +0 -39
  72. data/.ci/jobs/apm-agent-ruby-mbp.yml +0 -43
  73. data/.ci/jobs/apm-agent-ruby.yml +0 -4
  74. data/.ci/jobs/defaults.yml +0 -24
  75. data/.ci/linting.groovy +0 -32
  76. data/.ci/packer_cache.sh +0 -16
  77. data/.ci/snapshoty.yml +0 -34
  78. data/.ci/update-specs.yml +0 -108
  79. data/.github/workflows/update-specs.yml +0 -30
  80. data/CHANGELOG.asciidoc +0 -951
  81. data/docs/advanced.asciidoc +0 -14
  82. data/docs/api.asciidoc +0 -487
  83. data/docs/configuration.asciidoc +0 -888
  84. data/docs/custom-instrumentation.asciidoc +0 -80
  85. data/docs/debugging.asciidoc +0 -44
  86. data/docs/getting-started-rails.asciidoc +0 -30
  87. data/docs/graphql.asciidoc +0 -23
  88. data/docs/index.asciidoc +0 -38
  89. data/docs/introduction.asciidoc +0 -36
  90. data/docs/metrics.asciidoc +0 -235
  91. data/docs/opentracing.asciidoc +0 -94
  92. data/docs/performance-tuning.asciidoc +0 -106
  93. data/docs/release-notes.asciidoc +0 -15
  94. data/docs/set-up.asciidoc +0 -19
  95. data/docs/supported-technologies.asciidoc +0 -157
  96. data/docs/upgrading.asciidoc +0 -18
  97. /data/.ci/{.jenkins_codecov.yml → .codecov.yml} +0 -0
  98. /data/.ci/{.jenkins_main_framework.yml → .main_framework.yml} +0 -0
  99. /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: f7c28585ab44cfdb7a4eb8c32b8dd60e1ecb10c091357c25a6b13f35a0fe2ffc
4
- data.tar.gz: 3aad55a03f8c2a4d824ea09731be304e7712ee306dc4e585c5cc29ba11e25413
3
+ metadata.gz: 5ebd8a3592a4632b3f13811b920430b0052a67d80c921827ceb6639764c99de1
4
+ data.tar.gz: 485ec2dcb2f45d58fef2dbdb2acaa2cf515d33d0ce634bc44ef6f0f526e80f41
5
5
  SHA512:
6
- metadata.gz: eb6480a61567bd000e5325e12702c46882a42a9c452a60bd7af997b7138b076cd332d853f101b694af30d120bdd3b48f1b911feb6ecf12e94cdfc58ba096855c
7
- data.tar.gz: e626d4a1cb9370780d764385585fb4c4025d612a84b7ef36ae0525f6d6f6a83ddf7d5aa670ccf2610bf10f9e2c2d9a87f2f97818cc9e8de27153c3a85cd34875
6
+ metadata.gz: d39a813a6c001fe599e397ec74b8a5037ad3b07c9c0710124046f58ffb96a06c18bbd0021672d6b00e55ef1317a008f354ddf5061eb58ba560ab1684bbb29a0b
7
+ data.tar.gz: e72c6f09511b8f2884e7f07d053c8ee4618fc18692e453e4afafd81d164f890fe2fd6c39b1f47097ae828d789c620c72c6448ca85a30746925be4be9ca24625e
data/.ci/.exclude.yml ADDED
@@ -0,0 +1,132 @@
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.2
6
+ - VERSION: ruby:2.4
7
+ FRAMEWORK: rails-6.1
8
+ - VERSION: ruby:2.4
9
+ FRAMEWORK: rails-5.2
10
+ - VERSION: ruby:2.4
11
+ FRAMEWORK: sinatra-2.2
12
+ - VERSION: ruby:2.4
13
+ FRAMEWORK: grape-1.6
14
+ - VERSION: ruby:2.4
15
+ FRAMEWORK: rails-main
16
+ - VERSION: ruby:2.4
17
+ FRAMEWORK: sinatra-main
18
+ - VERSION: ruby:2.4
19
+ FRAMEWORK: grape-master
20
+
21
+ # rails-4.2 exclusions
22
+ # Only test on ruby 2.4
23
+ - VERSION: ruby:3.4
24
+ FRAMEWORK: rails-4.2
25
+ - VERSION: ruby:3.1
26
+ FRAMEWORK: rails-4.2
27
+ - VERSION: ruby:2.7
28
+ FRAMEWORK: rails-4.2
29
+ - VERSION: ruby:2.6
30
+ FRAMEWORK: rails-4.2
31
+ - VERSION: jruby:9.2
32
+ FRAMEWORK: rails-4.2
33
+ - VERSION: elasticobservability/jruby:9.2-13-jdk
34
+ FRAMEWORK: rails-4.2
35
+ - VERSION: elasticobservability/jruby:9.2-11-jdk
36
+ FRAMEWORK: rails-4.2
37
+ - VERSION: elasticobservability/jruby:9.2-8-jdk
38
+ FRAMEWORK: rails-4.2
39
+ # sinatra-1.4 exclusions
40
+ - VERSION: ruby:3.1
41
+ FRAMEWORK: sinatra-1.4
42
+ - VERSION: ruby:2.7
43
+ FRAMEWORK: sinatra-1.4
44
+ - VERSION: jruby:9.2
45
+ FRAMEWORK: sinatra-1.4
46
+ - VERSION: elasticobservability/jruby:9.2-13-jdk
47
+ FRAMEWORK: sinatra-1.4
48
+ - VERSION: elasticobservability/jruby:9.2-11-jdk
49
+ FRAMEWORK: sinatra-1.4
50
+ - VERSION: elasticobservability/jruby:9.2-8-jdk
51
+ FRAMEWORK: sinatra-1.4
52
+
53
+ # rails-6.1 and rails 7.0 exclusions
54
+ # Don't test on ruby 2.4
55
+ - VERSION: ruby:2.4
56
+ FRAMEWORK: rails-6.1
57
+ - VERSION: ruby:2.4
58
+ FRAMEWORK: rails-7.2
59
+
60
+ # Only test rails main on ruby 3.1
61
+ - VERSION: ruby:2.7
62
+ FRAMEWORK: rails-main
63
+ - VERSION: ruby:2.6
64
+ FRAMEWORK: rails-main
65
+ - VERSION: ruby:2.4
66
+ FRAMEWORK: rails-main
67
+ - VERSION: jruby:9.2
68
+ FRAMEWORK: rails-main
69
+ - VERSION: elasticobservability/jruby:9.2-13-jdk
70
+ FRAMEWORK: rails-main
71
+ - VERSION: elasticobservability/jruby:9.2-11-jdk
72
+ FRAMEWORK: rails-main
73
+ - VERSION: elasticobservability/jruby:9.2-8-jdk
74
+ FRAMEWORK: rails-main
75
+
76
+ # Only test rails 7.2 on ruby >= 3.1
77
+ - VERSION: ruby:2.7
78
+ FRAMEWORK: rails-7.2
79
+ - VERSION: ruby:2.6
80
+ FRAMEWORK: rails-7.2
81
+ - VERSION: ruby:2.4
82
+ FRAMEWORK: rails-7.2
83
+ - VERSION: jruby:9.2
84
+ FRAMEWORK: rails-7.2
85
+ - VERSION: elasticobservability/jruby:9.2-13-jdk
86
+ FRAMEWORK: rails-7.2
87
+ - VERSION: elasticobservability/jruby:9.2-11-jdk
88
+ FRAMEWORK: rails-7.2
89
+ - VERSION: elasticobservability/jruby:9.2-8-jdk
90
+ FRAMEWORK: rails-7.2
91
+
92
+ # Only test sinatra main on ruby 2.7 and ruby 3.1
93
+ - VERSION: ruby:2.6
94
+ FRAMEWORK: sinatra-main
95
+ - VERSION: ruby:2.4
96
+ FRAMEWORK: sinatra-main
97
+ - VERSION: jruby:9.2
98
+ FRAMEWORK: sinatra-main
99
+ - VERSION: elasticobservability/jruby:9.2-13-jdk
100
+ FRAMEWORK: sinatra-main
101
+ - VERSION: elasticobservability/jruby:9.2-11-jdk
102
+ FRAMEWORK: sinatra-main
103
+ - VERSION: elasticobservability/jruby:9.2-8-jdk
104
+ FRAMEWORK: sinatra-main
105
+
106
+ # Only test grape master on ruby 2.7 and ruby 3.1
107
+ - VERSION: ruby:2.6
108
+ FRAMEWORK: grape-master
109
+ - VERSION: ruby:2.4
110
+ FRAMEWORK: grape-master
111
+ - VERSION: jruby:9.2
112
+ FRAMEWORK: grape-master
113
+ - VERSION: elasticobservability/jruby:9.2-13-jdk
114
+ FRAMEWORK: grape-master
115
+ - VERSION: elasticobservability/jruby:9.2-11-jdk
116
+ FRAMEWORK: grape-master
117
+ - VERSION: elasticobservability/jruby:9.2-8-jdk
118
+ FRAMEWORK: grape-master
119
+
120
+ # grape 1.5 doesn't support ruby 3.1
121
+ - VERSION: ruby:3.1
122
+ FRAMEWORK: grape-1.6
123
+
124
+ # only test ruby >= 3.1 with rails 6.1 and rails 7.0
125
+ - VERSION: ruby:3.4
126
+ FRAMEWORK: rails-5.2
127
+ - VERSION: ruby:3.4
128
+ FRAMEWORK: rails-5.1
129
+ - VERSION: ruby:3.1
130
+ FRAMEWORK: rails-5.2
131
+ - VERSION: ruby:3.1
132
+ FRAMEWORK: rails-5.1
@@ -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 ADDED
@@ -0,0 +1,10 @@
1
+ VERSION:
2
+ - ruby:3.4
3
+ - ruby:3.1
4
+ - ruby:2.7
5
+ - ruby:2.6
6
+ - ruby:2.4
7
+ - jruby:9.2
8
+ - elasticobservability/jruby:9.2-13-jdk
9
+ - elasticobservability/jruby:9.2-11-jdk
10
+ - elasticobservability/jruby:9.2-8-jdk
@@ -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
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -euxo pipefail
4
+
5
+ gem install rake yard rspec
@@ -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,16 +1,37 @@
1
+ ---
1
2
  version: 2
2
3
  updates:
3
- - package-ecosystem: bundler
4
- directory: "/"
5
- schedule:
6
- interval: daily
7
- open-pull-requests-limit: 10
8
- ignore:
9
- - dependency-name: sucker_punch
10
- versions:
11
- - "> 2.0"
12
- - dependency-name: i18n
13
- versions:
14
- - 1.8.10
15
- - 1.8.8
16
- - 1.8.9
4
+
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)
23
+ - package-ecosystem: "github-actions"
24
+ directory: "/"
25
+ schedule:
26
+ interval: "weekly"
27
+ day: "sunday"
28
+ time: "22:00"
29
+ open-pull-requests-limit: 5
30
+ reviewers:
31
+ - "elastic/observablt-ci"
32
+ labels:
33
+ - dependencies
34
+ groups:
35
+ github-actions:
36
+ patterns:
37
+ - "*"
@@ -0,0 +1,57 @@
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
+
15
+ ### Scenarios
16
+
17
+ * Compatibility matrix runs on branches, tags and PRs basis.
18
+ * Tests should be triggered on branch, tag and PR basis.
19
+ * Commits that are only affecting the docs files should not trigger any test or similar stages that are not required.
20
+ * Automated release in the CI gets triggered when a tag release is created.
21
+ * **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.
22
+
23
+ ### Compatibility matrix
24
+
25
+ Ruby agent supports compatibility to different ruby versions and frameworks, those are defined in:
26
+
27
+ * [frameworks](../../.ci/.framework.yml) for all the PRs.
28
+ * [frameworks](../../.ci/.main_framework.yml) for all the PRs using the `main` branches.
29
+ * Ruby [versions](../../.ci/.ruby.yml) for all the `*nix` builds.
30
+ * [Exclude list](../../.ci/.exclude.yml) for the above entries.
31
+
32
+ ### How to interact with the CI?
33
+
34
+ #### On a PR basis
35
+
36
+ Once a PR has been opened then there are two different ways you can trigger builds in the CI:
37
+
38
+ 1. Commit based
39
+ 1. UI based, any Elasticians can force a build through the GitHub UI
40
+
41
+ #### Branches
42
+
43
+ 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.
44
+
45
+ ### Release process
46
+
47
+ This process has been fully automated and it gets triggered when a tag release has been created.
48
+ The tag release follows the naming convention: `v.<major>.<minor>.<patch>`, where `<major>`, `<minor>` and `<patch>`.
49
+
50
+ ### OpenTelemetry
51
+
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).
53
+
54
+ ## Bump automation
55
+
56
+ [updatecli](https://www.updatecli.io/) is the tool we use to automatically update the specs
57
+ the [APM agents](./updatecli.yml) use.
@@ -5,14 +5,27 @@ 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 }}
8
+
9
+ permissions:
10
+ contents: read
10
11
 
11
12
  jobs:
12
13
  assign_one_project:
13
14
  runs-on: ubuntu-latest
14
15
  name: Assign milestoned to Project
15
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
+ }
16
29
  - name: Assign issues with milestones to project
17
30
  uses: elastic/assign-one-project-github-action@1.2.2
18
31
  if: github.event.issue && github.event.issue.milestone
@@ -20,6 +33,8 @@ jobs:
20
33
  project: 'https://github.com/orgs/elastic/projects/454'
21
34
  project_id: '5882982'
22
35
  column_name: 'Planned'
36
+ env:
37
+ MY_GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
23
38
  - name: Assign new pull requests to project
24
39
  uses: elastic/assign-one-project-github-action@1.2.2
25
40
  if: github.event.action == 'opened' && github.event.pull_request
@@ -27,3 +42,5 @@ jobs:
27
42
  project: 'https://github.com/orgs/elastic/projects/454'
28
43
  project_id: '5882982'
29
44
  column_name: 'In Progress'
45
+ env:
46
+ MY_GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
@@ -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/oblt-actions/pre-commit@v1
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@v4
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@v4
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/oblt-actions/check-dependent-jobs@v1
68
+ with:
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
+ })
@@ -5,6 +5,11 @@ on:
5
5
  pull_request_target:
6
6
  types: [opened]
7
7
 
8
+ permissions:
9
+ contents: read
10
+ issues: write
11
+ pull-requests: write
12
+
8
13
  jobs:
9
14
  triage:
10
15
  runs-on: ubuntu-latest
@@ -0,0 +1,31 @@
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
+ timeout-minutes: 5
20
+ steps:
21
+ - name: Run microbenchmark
22
+ uses: elastic/oblt-actions/buildkite/run@v1
23
+ with:
24
+ pipeline: "apm-agent-microbenchmark"
25
+ token: ${{ secrets.BUILDKITE_TOKEN }}
26
+ wait-for: false
27
+ env-vars: |
28
+ script=.ci/scripts/bench.sh
29
+ repo=apm-agent-ruby
30
+ sha=${{ github.sha }}
31
+ BRANCH_NAME=${{ github.ref_name }}