elastic-apm 4.5.1 → 4.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.ci/.exclude.yml +193 -0
  3. data/.ci/{.jenkins_framework.yml → .framework.yml} +3 -2
  4. data/.ci/.main_framework.yml +4 -0
  5. data/.ci/.ruby.yml +10 -0
  6. data/.ci/docker/jruby/11-jdk/Dockerfile +8 -3
  7. data/.ci/docker/jruby/12-jdk/Dockerfile +5 -2
  8. data/.ci/docker/jruby/13-jdk/Dockerfile +5 -2
  9. data/.ci/docker/jruby/7-jdk/Dockerfile +6 -3
  10. data/.ci/docker/jruby/8-jdk/Dockerfile +8 -3
  11. data/.ci/docker/jruby/README.md +1 -1
  12. data/.ci/docker/jruby/run.sh +33 -9
  13. data/.ci/docker/jruby/test.sh +17 -2
  14. data/.ci/scripts/bench.sh +52 -0
  15. data/.ci/scripts/install-build-system.sh +5 -0
  16. data/.ci/snapshoty.yml +33 -0
  17. data/.ci/updatecli.d/update-gherkin-specs.yml +126 -0
  18. data/.ci/updatecli.d/update-json-specs.yml +130 -0
  19. data/.ci/updatecli.d/update-specs.yml +118 -0
  20. data/.github/dependabot.yml +17 -1
  21. data/.github/workflows/README.md +58 -0
  22. data/.github/workflows/ci-docs.yml +20 -0
  23. data/.github/workflows/ci.yml +70 -0
  24. data/.github/workflows/coverage-reporter.yml +34 -0
  25. data/.github/workflows/microbenchmark.yml +48 -0
  26. data/.github/workflows/opentelemetry.yml +27 -0
  27. data/.github/workflows/release.yml +71 -0
  28. data/.github/workflows/run-matrix.yml +56 -0
  29. data/.github/workflows/snapshoty.yml +35 -0
  30. data/.github/workflows/test-reporter.yml +24 -0
  31. data/.github/workflows/updatecli.yml +28 -0
  32. data/.pre-commit-config.yaml +0 -2
  33. data/CHANGELOG.asciidoc +73 -1
  34. data/CONTRIBUTING.md +1 -1
  35. data/Gemfile +28 -8
  36. data/README.md +1 -1
  37. data/Rakefile +2 -2
  38. data/bench/report.rb +1 -1
  39. data/bench/rubyprof.rb +1 -0
  40. data/bin/run-tests +10 -1
  41. data/docker-compose.yml +10 -1
  42. data/docs/configuration.asciidoc +12 -9
  43. data/docs/index.asciidoc +2 -2
  44. data/docs/{log-correlation.asciidoc → logs.asciidoc} +29 -2
  45. data/docs/opentracing.asciidoc +1 -1
  46. data/docs/redirects.asciidoc +9 -0
  47. data/elastic-apm.gemspec +3 -2
  48. data/lib/elastic_apm/central_config.rb +5 -0
  49. data/lib/elastic_apm/config/server_info.rb +50 -0
  50. data/lib/elastic_apm/config.rb +25 -4
  51. data/lib/elastic_apm/context_builder.rb +6 -3
  52. data/lib/elastic_apm/error.rb +2 -1
  53. data/lib/elastic_apm/error_builder.rb +1 -0
  54. data/lib/elastic_apm/instrumenter.rb +4 -2
  55. data/lib/elastic_apm/metadata/cloud_info.rb +9 -7
  56. data/lib/elastic_apm/metadata/system_info/container_info.rb +4 -3
  57. data/lib/elastic_apm/metadata/system_info.rb +1 -1
  58. data/lib/elastic_apm/metrics.rb +24 -20
  59. data/lib/elastic_apm/span/context/links.rb +32 -0
  60. data/lib/elastic_apm/span/context/service.rb +55 -0
  61. data/lib/elastic_apm/span/context.rb +19 -3
  62. data/lib/elastic_apm/span.rb +3 -0
  63. data/lib/elastic_apm/span_helpers.rb +8 -8
  64. data/lib/elastic_apm/spies/action_dispatch.rb +11 -3
  65. data/lib/elastic_apm/spies/faraday.rb +20 -4
  66. data/lib/elastic_apm/spies/racecar.rb +77 -0
  67. data/lib/elastic_apm/spies/redis.rb +1 -1
  68. data/lib/elastic_apm/spies/sequel.rb +9 -0
  69. data/lib/elastic_apm/spies/sqs.rb +1 -0
  70. data/lib/elastic_apm/trace_context/tracestate.rb +4 -2
  71. data/lib/elastic_apm/trace_context.rb +1 -1
  72. data/lib/elastic_apm/transport/connection/http.rb +9 -3
  73. data/lib/elastic_apm/transport/serializers/span_serializer.rb +25 -0
  74. data/lib/elastic_apm/version.rb +1 -1
  75. data/lib/elastic_apm.rb +1 -0
  76. metadata +46 -17
  77. data/.ci/.jenkins_exclude.yml +0 -134
  78. data/.ci/.jenkins_main_framework.yml +0 -4
  79. data/.ci/.jenkins_ruby.yml +0 -10
  80. data/.ci/Jenkinsfile +0 -441
  81. data/.ci/jobs/apm-agent-ruby-downstream.yml +0 -38
  82. data/.ci/jobs/apm-agent-ruby-linting-mbp.yml +0 -39
  83. data/.ci/jobs/apm-agent-ruby-mbp.yml +0 -43
  84. data/.ci/jobs/apm-agent-ruby.yml +0 -4
  85. data/.ci/jobs/defaults.yml +0 -24
  86. data/.ci/linting.groovy +0 -32
  87. data/.ci/packer_cache.sh +0 -16
  88. /data/.ci/{.jenkins_codecov.yml → .codecov.yml} +0 -0
@@ -0,0 +1,126 @@
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
+ pull_request:
27
+ kind: shell
28
+ dependson:
29
+ - sha
30
+ spec:
31
+ command: gh api /repos/elastic/apm/commits/{{ source "sha" }}/pulls --jq '.[].html_url'
32
+ environments:
33
+ - name: GITHUB_TOKEN
34
+ - name: PATH
35
+ api_key.feature:
36
+ kind: file
37
+ spec:
38
+ file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/gherkin-specs/api_key.feature
39
+ azure_app_service_metadata.feature:
40
+ kind: file
41
+ spec:
42
+ file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/gherkin-specs/azure_app_service_metadata.feature
43
+ azure_functions_metadata.feature:
44
+ kind: file
45
+ spec:
46
+ file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/gherkin-specs/azure_functions_metadata.feature
47
+ otel_bridge.feature:
48
+ kind: file
49
+ spec:
50
+ file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/gherkin-specs/otel_bridge.feature
51
+ outcome.feature:
52
+ kind: file
53
+ spec:
54
+ file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/gherkin-specs/outcome.feature
55
+ user_agent.feature:
56
+ kind: file
57
+ spec:
58
+ file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/gherkin-specs/user_agent.feature
59
+
60
+ actions:
61
+ pr:
62
+ kind: "github/pullrequest"
63
+ scmid: default
64
+ title: '[Automation] Update Gherkin specs'
65
+ spec:
66
+ automerge: false
67
+ draft: false
68
+ labels:
69
+ - "automation"
70
+ description: |-
71
+ ### What
72
+ APM agent Gherkin specs automatic sync
73
+ ### Why
74
+ *Changeset*
75
+ * https://github.com/elastic/apm/commit/{{ source "sha" }}
76
+ * {{ source "pull_request" }}
77
+
78
+ targets:
79
+ api_key.feature:
80
+ name: api_key.feature
81
+ scmid: default
82
+ sourceid: api_key.feature
83
+ kind: file
84
+ spec:
85
+ file: features/api_key.feature
86
+ forcecreate: true
87
+ azure_app_service_metadata.feature:
88
+ name: azure_app_service_metadata.feature
89
+ scmid: default
90
+ sourceid: azure_app_service_metadata.feature
91
+ kind: file
92
+ spec:
93
+ file: features/azure_app_service_metadata.feature
94
+ forcecreate: true
95
+ azure_functions_metadata.feature:
96
+ name: azure_functions_metadata.feature
97
+ scmid: default
98
+ sourceid: azure_functions_metadata.feature
99
+ kind: file
100
+ spec:
101
+ file: features/azure_functions_metadata.feature
102
+ forcecreate: true
103
+ otel_bridge.feature:
104
+ name: otel_bridge.feature
105
+ scmid: default
106
+ sourceid: otel_bridge.feature
107
+ kind: file
108
+ spec:
109
+ file: features/otel_bridge.feature
110
+ forcecreate: true
111
+ outcome.feature:
112
+ name: outcome.feature
113
+ scmid: default
114
+ sourceid: outcome.feature
115
+ kind: file
116
+ spec:
117
+ file: features/outcome.feature
118
+ forcecreate: true
119
+ user_agent.feature:
120
+ name: user_agent.feature
121
+ scmid: default
122
+ sourceid: user_agent.feature
123
+ kind: file
124
+ spec:
125
+ file: features/user_agent.feature
126
+ forcecreate: true
@@ -0,0 +1,130 @@
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
+ pull_request:
27
+ kind: shell
28
+ dependson:
29
+ - sha
30
+ spec:
31
+ command: gh api /repos/elastic/apm/commits/{{ source "sha" }}/pulls --jq '.[].html_url'
32
+ environments:
33
+ - name: GITHUB_TOKEN
34
+ - name: PATH
35
+ container_metadata_discovery.json:
36
+ kind: file
37
+ spec:
38
+ file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/json-specs/container_metadata_discovery.json
39
+ service_resource_inference.json:
40
+ kind: file
41
+ spec:
42
+ file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/json-specs/service_resource_inference.json
43
+ span_types.json:
44
+ kind: file
45
+ spec:
46
+ file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/json-specs/span_types.json
47
+ sql_signature_examples.json:
48
+ kind: file
49
+ spec:
50
+ file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/json-specs/sql_signature_examples.json
51
+ sql_token_examples.json:
52
+ kind: file
53
+ spec:
54
+ file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/json-specs/sql_token_examples.json
55
+ w3c_distributed_tracing.json:
56
+ kind: file
57
+ spec:
58
+ file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/json-specs/w3c_distributed_tracing.json
59
+ wildcard_matcher_tests.json:
60
+ kind: file
61
+ spec:
62
+ file: https://raw.githubusercontent.com/elastic/apm/main/tests/agents/json-specs/wildcard_matcher_tests.json
63
+ actions:
64
+ pr:
65
+ kind: "github/pullrequest"
66
+ scmid: default
67
+ title: '[Automation] Update JSON specs'
68
+ spec:
69
+ automerge: false
70
+ draft: false
71
+ labels:
72
+ - "automation"
73
+ description: |-
74
+ ### What
75
+ APM agent specs automatic sync
76
+ ### Why
77
+ *Changeset*
78
+ * https://github.com/elastic/apm/commit/{{ source "sha" }}
79
+ * {{ source "pull_request" }}
80
+
81
+ targets:
82
+ container_metadata_discovery.json:
83
+ name: container_metadata_discovery.json
84
+ scmid: default
85
+ sourceid: container_metadata_discovery.json
86
+ kind: file
87
+ spec:
88
+ file: spec/fixtures/container_metadata_discovery.json
89
+ service_resource_inference.json:
90
+ name: service_resource_inference.json
91
+ scmid: default
92
+ sourceid: service_resource_inference.json
93
+ kind: file
94
+ spec:
95
+ file: spec/fixtures/service_resource_inference.json
96
+ span_types.json:
97
+ name: span_types.json
98
+ scmid: default
99
+ sourceid: span_types.json
100
+ kind: file
101
+ spec:
102
+ file: spec/fixtures/span_types.json
103
+ sql_signature_examples.json:
104
+ name: sql_signature_examples.json
105
+ scmid: default
106
+ sourceid: sql_signature_examples.json
107
+ kind: file
108
+ spec:
109
+ file: spec/fixtures/sql_signature_examples.json
110
+ sql_token_examples.json:
111
+ name: sql_token_examples.json
112
+ scmid: default
113
+ sourceid: sql_token_examples.json
114
+ kind: file
115
+ spec:
116
+ file: spec/fixtures/sql_token_examples.json
117
+ w3c_distributed_tracing.json:
118
+ name: w3c_distributed_tracing.json
119
+ scmid: default
120
+ sourceid: w3c_distributed_tracing.json
121
+ kind: file
122
+ spec:
123
+ file: spec/fixtures/w3c_distributed_tracing.json
124
+ wildcard_matcher_tests.json:
125
+ name: wildcard_matcher_tests.json
126
+ scmid: default
127
+ sourceid: wildcard_matcher_tests.json
128
+ kind: file
129
+ spec:
130
+ file: spec/fixtures/wildcard_matcher_tests.json
@@ -0,0 +1,118 @@
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
+ pull_request:
27
+ kind: shell
28
+ dependson:
29
+ - sha
30
+ spec:
31
+ command: gh api /repos/elastic/apm-data/commits/{{ source "sha" }}/pulls --jq '.[].html_url'
32
+ environments:
33
+ - name: GITHUB_TOKEN
34
+ - name: PATH
35
+ error.json:
36
+ kind: file
37
+ spec:
38
+ file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/error.json
39
+ metadata.json:
40
+ kind: file
41
+ spec:
42
+ file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/metadata.json
43
+ metricset.json:
44
+ kind: file
45
+ spec:
46
+ file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/metricset.json
47
+ span.json:
48
+ kind: file
49
+ spec:
50
+ file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/span.json
51
+ transaction.json:
52
+ kind: file
53
+ spec:
54
+ file: https://raw.githubusercontent.com/elastic/apm-data/main/input/elasticapm/docs/spec/v2/transaction.json
55
+
56
+
57
+
58
+
59
+
60
+ actions:
61
+ pr:
62
+ kind: "github/pullrequest"
63
+ scmid: default
64
+ sourceid: sha
65
+ spec:
66
+ automerge: false
67
+ draft: false
68
+ labels:
69
+ - "automation"
70
+ description: |-
71
+ ### What
72
+ APM agent json schema automatic sync
73
+ ### Why
74
+ *Changeset*
75
+ * https://github.com/elastic/apm-data/commit/{{ source "sha" }}
76
+ * {{ source "pull_request" }}
77
+
78
+ targets:
79
+ error.json:
80
+ name: error.json
81
+ scmid: default
82
+ sourceid: error.json
83
+ kind: file
84
+ spec:
85
+ file: spec/fixtures/error.json
86
+ forcecreate: true
87
+ metadata.json:
88
+ name: metadata.json
89
+ scmid: default
90
+ sourceid: metadata.json
91
+ kind: file
92
+ spec:
93
+ file: spec/fixtures/metadata.json
94
+ forcecreate: true
95
+ metricset.json:
96
+ name: metricset.json
97
+ scmid: default
98
+ sourceid: metricset.json
99
+ kind: file
100
+ spec:
101
+ file: spec/fixtures/metricset.json
102
+ forcecreate: true
103
+ span.json:
104
+ name: span.json
105
+ scmid: default
106
+ sourceid: span.json
107
+ kind: file
108
+ spec:
109
+ file: spec/fixtures/span.json
110
+ forcecreate: true
111
+ transaction.json:
112
+ name: transaction.json
113
+ scmid: default
114
+ sourceid: transaction.json
115
+ kind: file
116
+ spec:
117
+ file: spec/fixtures/transaction.json
118
+ forcecreate: true
@@ -3,7 +3,9 @@ updates:
3
3
  - package-ecosystem: bundler
4
4
  directory: "/"
5
5
  schedule:
6
- interval: daily
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"'
@@ -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 }}