elastic-apm 4.7.3 → 4.9.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.
- checksums.yaml +4 -4
- data/.ci/.exclude.yml +27 -82
- data/.ci/.framework.yml +1 -4
- data/.ci/.ruby.yml +1 -1
- data/.ci/updatecli/values.d/apm-data-spec.yml +1 -0
- data/.ci/updatecli/values.d/apm-gherkin.yml +1 -0
- data/.ci/updatecli/values.d/apm-json-specs.yml +1 -0
- data/.ci/updatecli/values.d/scm.yml +10 -0
- data/.ci/updatecli/values.d/update-compose.yml +3 -0
- data/.github/CODEOWNERS +1 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +2 -2
- data/.github/dependabot.yml +22 -19
- data/.github/workflows/README.md +1 -2
- data/.github/workflows/addToProject.yml +43 -12
- data/.github/workflows/ci.yml +6 -6
- data/.github/workflows/docs-build.yml +16 -0
- data/.github/workflows/docs-deploy.yml +16 -0
- data/.github/workflows/docs-preview-cleanup.yml +12 -0
- data/.github/workflows/github-commands-comment.yml +18 -0
- data/.github/workflows/microbenchmark.yml +7 -24
- data/.github/workflows/release.yml +40 -24
- data/.github/workflows/run-matrix.yml +21 -12
- data/.github/workflows/test-reporter.yml +4 -3
- data/.github/workflows/updatecli.yml +45 -13
- data/Dockerfile +38 -12
- data/Gemfile +38 -3
- data/bin/dev +16 -4
- data/bin/run-bdd +2 -2
- data/docker-compose.yml +12 -5
- data/docs/docset.yml +11 -0
- data/docs/reference/advanced-topics.md +18 -0
- data/docs/reference/api-reference.md +428 -0
- data/docs/reference/configuration.md +751 -0
- data/docs/{context.asciidoc → reference/context.md} +27 -21
- data/docs/reference/custom-instrumentation.md +78 -0
- data/docs/{getting-started-rack.asciidoc → reference/getting-started-rack.md} +27 -30
- data/docs/reference/getting-started-rails.md +33 -0
- data/docs/reference/graphql.md +27 -0
- data/docs/reference/index.md +33 -0
- data/docs/{logs.asciidoc → reference/logs.md} +45 -57
- data/docs/reference/metrics.md +205 -0
- data/docs/reference/opentracing-api.md +76 -0
- data/docs/reference/performance-tuning.md +77 -0
- data/docs/reference/set-up-apm-ruby-agent.md +22 -0
- data/docs/reference/supported-technologies.md +134 -0
- data/docs/reference/toc.yml +24 -0
- data/docs/reference/upgrading.md +25 -0
- data/docs/release-notes/index.md +182 -0
- data/docs/release-notes/known-issues.md +29 -0
- data/docs/release-notes/toc.yml +3 -0
- data/elastic-apm.gemspec +2 -2
- data/lib/elastic_apm/central_config.rb +1 -1
- data/lib/elastic_apm/config/round_float_hash_value.rb +35 -0
- data/lib/elastic_apm/config.rb +2 -0
- data/lib/elastic_apm/context_builder.rb +5 -2
- data/lib/elastic_apm/instrumenter.rb +23 -3
- data/lib/elastic_apm/spies/http.rb +1 -1
- data/lib/elastic_apm/spies/sidekiq.rb +2 -1
- data/lib/elastic_apm/stacktrace_builder.rb +3 -3
- data/lib/elastic_apm/transaction.rb +11 -4
- data/lib/elastic_apm/version.rb +1 -1
- data/updatecli-compose.yaml +23 -0
- metadata +49 -37
- data/.ci/snapshoty.yml +0 -33
- data/.ci/updatecli/updatecli.d/update-gherkin-specs.yml +0 -84
- data/.ci/updatecli/updatecli.d/update-json-specs.yml +0 -84
- data/.ci/updatecli/updatecli.d/update-specs.yml +0 -86
- data/.ci/updatecli/values.yml +0 -14
- data/.github/workflows/coverage-reporter.yml +0 -34
- data/.github/workflows/opentelemetry.yml +0 -22
- data/.github/workflows/snapshoty.yml +0 -35
- data/CHANGELOG.asciidoc +0 -990
- data/SECURITY.md +0 -7
- data/docs/advanced.asciidoc +0 -14
- data/docs/api.asciidoc +0 -487
- data/docs/configuration.asciidoc +0 -889
- data/docs/custom-instrumentation.asciidoc +0 -80
- data/docs/debugging.asciidoc +0 -44
- data/docs/getting-started-rails.asciidoc +0 -30
- data/docs/graphql.asciidoc +0 -23
- data/docs/index.asciidoc +0 -38
- data/docs/introduction.asciidoc +0 -36
- data/docs/metrics.asciidoc +0 -235
- data/docs/opentracing.asciidoc +0 -94
- data/docs/performance-tuning.asciidoc +0 -106
- data/docs/redirects.asciidoc +0 -9
- data/docs/release-notes.asciidoc +0 -15
- data/docs/set-up.asciidoc +0 -19
- data/docs/supported-technologies.asciidoc +0 -157
- data/docs/upgrading.asciidoc +0 -18
- /data/docs/{images → reference/images}/dynamic-config.svg +0 -0
|
@@ -24,13 +24,13 @@ jobs:
|
|
|
24
24
|
outputs:
|
|
25
25
|
matrix: ${{ steps.generate.outputs.matrix }}
|
|
26
26
|
steps:
|
|
27
|
-
- uses: actions/checkout@
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
28
|
- id: generate
|
|
29
|
-
uses: elastic/
|
|
29
|
+
uses: elastic/oblt-actions/version-framework@v1
|
|
30
30
|
with:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
versions-file: ${{ inputs.versionsFile }}
|
|
32
|
+
frameworks-file: ${{ inputs.frameworksFile }}
|
|
33
|
+
excluded-file: ${{ inputs.excludedFile }}
|
|
34
34
|
test:
|
|
35
35
|
needs:
|
|
36
36
|
- create-test-matrix
|
|
@@ -40,20 +40,29 @@ jobs:
|
|
|
40
40
|
max-parallel: 20
|
|
41
41
|
matrix: ${{ fromJSON(needs.create-test-matrix.outputs.matrix) }}
|
|
42
42
|
steps:
|
|
43
|
-
- uses: actions/checkout@
|
|
43
|
+
- uses: actions/checkout@v4
|
|
44
44
|
- name: Run BDD tests
|
|
45
45
|
run: ./spec/scripts/features.sh ${{ matrix.version }}
|
|
46
46
|
- name: Run test
|
|
47
47
|
run: ./spec/scripts/spec.sh ${{ matrix.version }} ${{ matrix.framework }}
|
|
48
48
|
env:
|
|
49
49
|
JUNIT_PREFIX: ${{ matrix.version }}-${{ matrix.framework }}
|
|
50
|
+
|
|
50
51
|
- if: success() || failure()
|
|
51
|
-
|
|
52
|
+
id: normalize-junit
|
|
53
|
+
uses: actions/github-script@v7
|
|
52
54
|
with:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
result-encoding: string
|
|
56
|
+
script: |
|
|
57
|
+
function normalizeName(name) {
|
|
58
|
+
return name.replace(/["/:<>|*?\\]/g, '-')
|
|
59
|
+
}
|
|
60
|
+
const framework = normalizeName('${{ matrix.framework }}')
|
|
61
|
+
const version = normalizeName('${{ matrix.version }}')
|
|
62
|
+
return `${version}-${framework}`
|
|
55
63
|
- if: success() || failure()
|
|
56
|
-
|
|
64
|
+
name: Upload JUnit Test Results
|
|
65
|
+
uses: actions/upload-artifact@v4
|
|
57
66
|
with:
|
|
58
|
-
name:
|
|
59
|
-
path: "
|
|
67
|
+
name: test-results-${{ steps.normalize-junit.outputs.result }}
|
|
68
|
+
path: "**/spec/junit-reports/**/*ruby-agent-junit.xml"
|
|
@@ -10,15 +10,16 @@ on:
|
|
|
10
10
|
|
|
11
11
|
permissions:
|
|
12
12
|
contents: read
|
|
13
|
+
actions: read
|
|
13
14
|
checks: write
|
|
14
15
|
|
|
15
16
|
jobs:
|
|
16
17
|
report:
|
|
17
18
|
runs-on: ubuntu-latest
|
|
18
19
|
steps:
|
|
19
|
-
- uses: elastic/
|
|
20
|
+
- uses: elastic/oblt-actions/test-report@v1
|
|
20
21
|
with:
|
|
21
|
-
artifact: test-results
|
|
22
|
-
name:
|
|
22
|
+
artifact: /test-results(.*)/
|
|
23
|
+
name: 'Test Report $1'
|
|
23
24
|
path: "**/*ruby-agent-junit.xml"
|
|
24
25
|
reporter: java-junit
|
|
@@ -9,21 +9,53 @@ permissions:
|
|
|
9
9
|
contents: read
|
|
10
10
|
|
|
11
11
|
jobs:
|
|
12
|
-
|
|
12
|
+
compose:
|
|
13
13
|
runs-on: ubuntu-latest
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
packages: read
|
|
14
17
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
16
|
-
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Get token
|
|
21
|
+
id: get_token
|
|
22
|
+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
|
|
23
|
+
with:
|
|
24
|
+
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
|
|
25
|
+
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
|
|
26
|
+
permissions: >-
|
|
27
|
+
{
|
|
28
|
+
"contents": "write",
|
|
29
|
+
"pull_requests": "write"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
- uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
|
|
33
|
+
with:
|
|
34
|
+
registry: ghcr.io
|
|
35
|
+
username: ${{ github.actor }}
|
|
36
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
37
|
+
|
|
38
|
+
- uses: elastic/oblt-actions/updatecli/run@v1
|
|
39
|
+
with:
|
|
40
|
+
command: --experimental compose diff
|
|
41
|
+
# TODO: update to the latest version so the policies can work as expected.
|
|
42
|
+
# latest changes in the policies require to use the dependson feature.
|
|
43
|
+
version: "v0.88.0"
|
|
44
|
+
env:
|
|
45
|
+
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
|
|
46
|
+
|
|
47
|
+
- uses: elastic/oblt-actions/updatecli/run@v1
|
|
17
48
|
with:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
49
|
+
command: --experimental compose apply
|
|
50
|
+
# TODO: update to the latest version so the policies can work as expected.
|
|
51
|
+
# latest changes in the policies require to use the dependson feature.
|
|
52
|
+
version: "v0.88.0"
|
|
53
|
+
env:
|
|
54
|
+
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
|
|
55
|
+
|
|
23
56
|
- if: failure()
|
|
24
|
-
uses: elastic/
|
|
57
|
+
uses: elastic/oblt-actions/slack/send@v1
|
|
25
58
|
with:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
slackChannel: "#apm-agent-ruby"
|
|
59
|
+
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
|
|
60
|
+
channel-id: "#apm-agent-ruby"
|
|
61
|
+
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>"
|
data/Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
ARG RUBY_IMAGE
|
|
1
|
+
ARG RUBY_IMAGE=ruby:3.3
|
|
2
2
|
FROM ${RUBY_IMAGE}
|
|
3
3
|
|
|
4
4
|
ARG USER_ID_GROUP
|
|
@@ -9,10 +9,18 @@ ARG BUNDLER_VERSION
|
|
|
9
9
|
# For tzdata
|
|
10
10
|
# ENV DEBIAN_FRONTEND=noninteractive
|
|
11
11
|
|
|
12
|
-
RUN
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
RUN set -eux; \
|
|
13
|
+
apt-get update -qq || ( \
|
|
14
|
+
find /etc/apt -name '*.list' -type f -print0 | xargs -0 sed -i \
|
|
15
|
+
-e 's|deb.debian.org/debian|archive.debian.org/debian|g' \
|
|
16
|
+
-e 's|security.debian.org/debian-security|archive.debian.org/debian-security|g'; \
|
|
17
|
+
find /etc/apt -name '*.list' -type f -print0 | xargs -0 sed -i '/buster-updates/d'; \
|
|
18
|
+
printf 'Acquire::Check-Valid-Until "false";\n' > /etc/apt/apt.conf.d/99no-check-valid; \
|
|
19
|
+
apt-get -o Acquire::Check-Valid-Until=false update -qq \
|
|
20
|
+
); \
|
|
21
|
+
apt-get install -qq -y --no-install-recommends \
|
|
22
|
+
build-essential libpq-dev git netbase; \
|
|
23
|
+
rm -rf /var/lib/apt/lists/*
|
|
16
24
|
|
|
17
25
|
# Configure bundler and PATH
|
|
18
26
|
ENV LANG=C.UTF-8
|
|
@@ -29,15 +37,33 @@ ENV FRAMEWORKS $FRAMEWORKS
|
|
|
29
37
|
RUN mkdir -p $VENDOR_PATH \
|
|
30
38
|
&& chown -R $USER_ID_GROUP $VENDOR_PATH
|
|
31
39
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
# Upgrade RubyGems with a Ruby-version-compatible strategy and install Bundler.
|
|
41
|
+
RUN set -eux; \
|
|
42
|
+
if ruby -e 'require "rubygems"; exit(Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.2") ? 0 : 1)'; then \
|
|
43
|
+
gem update --system 3.2.3; \
|
|
44
|
+
else \
|
|
45
|
+
gem update --system; \
|
|
46
|
+
fi; \
|
|
47
|
+
if ruby -e 'require "rubygems"; exit(Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.5") ? 0 : 1)'; then \
|
|
48
|
+
gem install bundler:1.17.3; \
|
|
49
|
+
else \
|
|
50
|
+
gem install bundler:$BUNDLER_VERSION; \
|
|
51
|
+
fi
|
|
37
52
|
|
|
38
|
-
# Use unpatched, system version for more speed over less security
|
|
39
|
-
|
|
53
|
+
# Use unpatched, system version for more speed over less security.
|
|
54
|
+
# Pin Nokogiri by Ruby compatibility to support old CI targets (e.g. Ruby 2.4).
|
|
55
|
+
RUN set -eux; \
|
|
56
|
+
if ruby -e 'require "rubygems"; exit(Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.5") ? 0 : 1)'; then \
|
|
57
|
+
gem install nokogiri -v 1.10.10 -- --use-system-libraries; \
|
|
58
|
+
elif ruby -e 'require "rubygems"; exit(Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.2") ? 0 : 1)'; then \
|
|
59
|
+
gem install nokogiri -v 1.12.5 -- --use-system-libraries; \
|
|
60
|
+
else \
|
|
61
|
+
gem install nokogiri -- --use-system-libraries; \
|
|
62
|
+
fi
|
|
40
63
|
# Rake is required to build http-parser on some jruby images
|
|
41
64
|
RUN gem install rake
|
|
42
65
|
|
|
66
|
+
RUN chown -R $USER_ID_GROUP $VENDOR_PATH
|
|
67
|
+
USER $USER_ID_GROUP
|
|
68
|
+
|
|
43
69
|
WORKDIR /app
|
data/Gemfile
CHANGED
|
@@ -59,7 +59,6 @@ gem 'rake', '>= 13.0', require: nil
|
|
|
59
59
|
gem 'racecar', require: nil if !defined?(JRUBY_VERSION)
|
|
60
60
|
gem 'resque', require: nil
|
|
61
61
|
gem 'sequel', require: nil
|
|
62
|
-
gem 'shoryuken', require: nil
|
|
63
62
|
gem 'sidekiq', require: nil
|
|
64
63
|
gem 'simplecov', require: false
|
|
65
64
|
gem 'simplecov-cobertura', require: false
|
|
@@ -91,6 +90,14 @@ frameworks_versions.each do |framework, version|
|
|
|
91
90
|
gem 'net-smtp', require: false
|
|
92
91
|
end
|
|
93
92
|
|
|
93
|
+
if framework =='rails' && RUBY_VERSION < '3.2' && !defined?(JRUBY_VERSION) && version >= '5.2'
|
|
94
|
+
gem 'i18n', '1.14.8'
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if framework =='rails' && RUBY_VERSION >= '3.4' && ['4.2', '5.2', '6.1'].include?(version)
|
|
98
|
+
gem 'mutex_m'
|
|
99
|
+
end
|
|
100
|
+
|
|
94
101
|
case version
|
|
95
102
|
when 'master' # grape
|
|
96
103
|
gem framework, github: GITHUB_REPOS.fetch(framework)
|
|
@@ -103,12 +110,36 @@ frameworks_versions.each do |framework, version|
|
|
|
103
110
|
end
|
|
104
111
|
end
|
|
105
112
|
|
|
113
|
+
# Handle Rack::Auth::Digest being removed in rack 3.1, grape requires it.
|
|
114
|
+
# Sinatra 2.x depends on rack 2.x, so use a compatible rack line when both are present.
|
|
115
|
+
if frameworks_versions.key?('grape')
|
|
116
|
+
sinatra_version = frameworks_versions['sinatra']
|
|
117
|
+
if sinatra_version&.start_with?('2.')
|
|
118
|
+
gem 'rack', '~> 2.2.0'
|
|
119
|
+
else
|
|
120
|
+
gem 'rack', '~> 3.0.0'
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
106
124
|
if frameworks_versions.key?('rails')
|
|
107
|
-
|
|
108
|
-
|
|
125
|
+
rails_version = frameworks_versions['rails']
|
|
126
|
+
unless /^(main|6)/.match?(rails_version)
|
|
127
|
+
if rails_version.start_with?('4.') || rails_version.start_with?('5.')
|
|
128
|
+
gem 'delayed_job', '~> 4.1.13', require: nil
|
|
129
|
+
else
|
|
130
|
+
gem 'delayed_job', require: nil
|
|
131
|
+
end
|
|
109
132
|
end
|
|
110
133
|
end
|
|
111
134
|
|
|
135
|
+
# Shoryuken 7.x references ActiveJob::QueueAdapters::AbstractAdapter, which
|
|
136
|
+
# is missing in the Ruby 3.4 + Rails 6.1 matrix target.
|
|
137
|
+
if frameworks_versions['rails'] == '6.1' && RUBY_VERSION >= '3.4'
|
|
138
|
+
gem 'shoryuken', '< 7.0', require: nil
|
|
139
|
+
else
|
|
140
|
+
gem 'shoryuken', require: nil
|
|
141
|
+
end
|
|
142
|
+
|
|
112
143
|
if RUBY_PLATFORM == 'java'
|
|
113
144
|
# See issue #6547 in the JRuby repo. It is fixed in JRuby 9.3
|
|
114
145
|
gem 'i18n', '< 1.8.8' if JRUBY_VERSION < '9.3'
|
|
@@ -125,8 +156,12 @@ if RUBY_PLATFORM == 'java'
|
|
|
125
156
|
end
|
|
126
157
|
elsif frameworks_versions['rails'] =~ /^(4|5)/
|
|
127
158
|
gem 'sqlite3', '~> 1.3.6'
|
|
159
|
+
elsif frameworks_versions['rails'] =~ /^(6|7)/
|
|
160
|
+
gem 'sqlite3', '~> 1.4'
|
|
128
161
|
elsif RUBY_VERSION < '2.7'
|
|
129
162
|
gem 'sqlite3', '~> 1.4.4'
|
|
163
|
+
elsif RUBY_VERSION < '3.0'
|
|
164
|
+
gem 'sqlite3', '~> 1.3.6'
|
|
130
165
|
else
|
|
131
166
|
gem 'sqlite3'
|
|
132
167
|
end
|
data/bin/dev
CHANGED
|
@@ -26,21 +26,33 @@ end.parse!
|
|
|
26
26
|
USER_ID_GROUP = %w[u g].map { |f| `id -#{f}`.chomp }.join(':')
|
|
27
27
|
|
|
28
28
|
RUBY_IMAGE = options.fetch(:image, 'ruby:latest')
|
|
29
|
-
|
|
29
|
+
default_frameworks = if RUBY_IMAGE.include?('jruby')
|
|
30
|
+
'rails-6.1,sinatra-2.2,grape-1.6'
|
|
31
|
+
else
|
|
32
|
+
'rails,sinatra,grape'
|
|
33
|
+
end
|
|
34
|
+
FRAMEWORKS = options.fetch(:frameworks, default_frameworks)
|
|
30
35
|
|
|
31
36
|
IMAGE_PATH_SAFE = RUBY_IMAGE.tr(':', '_')
|
|
32
37
|
IMAGE_NAME = "apm-agent-ruby:#{IMAGE_PATH_SAFE}"
|
|
33
38
|
VENDOR_PATH = "/vendor/#{IMAGE_PATH_SAFE}"
|
|
39
|
+
legacy_ruby_image = RUBY_IMAGE.match?(/^ruby:(2\.[0-9]+|1\.[0-9]+)/)
|
|
40
|
+
DOCKER_PLATFORM = if RUBY_IMAGE.include?('jruby') || legacy_ruby_image
|
|
41
|
+
'linux/amd64'
|
|
42
|
+
end
|
|
34
43
|
|
|
35
44
|
def run(cmd)
|
|
36
|
-
"IMAGE_NAME=#{IMAGE_NAME}
|
|
45
|
+
env = ["IMAGE_NAME=#{IMAGE_NAME}"]
|
|
46
|
+
env << "DOCKER_DEFAULT_PLATFORM=#{DOCKER_PLATFORM}" if DOCKER_PLATFORM
|
|
47
|
+
|
|
48
|
+
"#{env.join(' ')} #{cmd}".tap do |str|
|
|
37
49
|
puts str
|
|
38
50
|
system str
|
|
39
51
|
end
|
|
40
52
|
end
|
|
41
53
|
|
|
42
54
|
unless options[:skip_build]
|
|
43
|
-
run 'docker
|
|
55
|
+
run 'docker compose build ' \
|
|
44
56
|
" --build-arg RUBY_IMAGE=#{RUBY_IMAGE}" \
|
|
45
57
|
" --build-arg USER_ID_GROUP=#{USER_ID_GROUP}" \
|
|
46
58
|
" --build-arg FRAMEWORKS=#{FRAMEWORKS}" \
|
|
@@ -48,7 +60,7 @@ unless options[:skip_build]
|
|
|
48
60
|
exit $?.exitstatus unless $?.success?
|
|
49
61
|
end
|
|
50
62
|
|
|
51
|
-
run 'docker
|
|
63
|
+
run 'docker compose run' \
|
|
52
64
|
" -u #{USER_ID_GROUP}" \
|
|
53
65
|
' --rm' \
|
|
54
66
|
" specs #{ARGV.join}"
|
data/bin/run-bdd
CHANGED
|
@@ -9,9 +9,9 @@ if [[ $specific_feature = '' ]]; then
|
|
|
9
9
|
echo 'Running all features'
|
|
10
10
|
|
|
11
11
|
echo "========================================"
|
|
12
|
-
cucumber
|
|
12
|
+
bundle exec cucumber
|
|
13
13
|
else
|
|
14
14
|
echo "Running only $specific_feature"
|
|
15
15
|
|
|
16
|
-
cucumber $specific_feature
|
|
16
|
+
bundle exec cucumber $specific_feature
|
|
17
17
|
fi
|
data/docker-compose.yml
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
---
|
|
2
|
-
version: '3.4'
|
|
3
2
|
|
|
4
3
|
services:
|
|
5
4
|
mongodb:
|
|
@@ -14,10 +13,18 @@ services:
|
|
|
14
13
|
context: .
|
|
15
14
|
args:
|
|
16
15
|
BUNDLER_VERSION: '2.2.21'
|
|
16
|
+
RUBY_IMAGE: ${RUBY_IMAGE:-ruby:3.3}
|
|
17
|
+
USER_ID_GROUP: ${USER_ID_GROUP:-1000:1000}
|
|
18
|
+
FRAMEWORKS: ${FRAMEWORKS:-rails,sinatra,grape}
|
|
19
|
+
VENDOR_PATH: ${VENDOR_PATH:-/vendor/ruby_3.3}
|
|
17
20
|
image: '$IMAGE_NAME'
|
|
18
21
|
environment:
|
|
19
22
|
HOME: '/tmp'
|
|
20
23
|
MONGODB_URL: 'mongodb:27017'
|
|
24
|
+
USER_ID: ${USER_ID:-1000}
|
|
25
|
+
LOCAL_USER_ID: ${LOCAL_USER_ID:-1000}
|
|
26
|
+
LOCAL_GROUP_ID: ${LOCAL_GROUP_ID:-1000}
|
|
27
|
+
RUBY_VERSION: ${RUBY_VERSION:-3.3}
|
|
21
28
|
entrypoint:
|
|
22
29
|
'spec/entrypoint.sh'
|
|
23
30
|
tty: true
|
|
@@ -28,17 +35,17 @@ services:
|
|
|
28
35
|
- /tmp:exec,mode=1777
|
|
29
36
|
depends_on:
|
|
30
37
|
- mongodb
|
|
31
|
-
user: ${USER_ID}
|
|
38
|
+
user: ${USER_ID:-1000}
|
|
32
39
|
security_opt:
|
|
33
40
|
- no-new-privileges
|
|
34
41
|
|
|
35
42
|
ruby_rspec:
|
|
36
|
-
image: apm-agent-ruby:${RUBY_VERSION}
|
|
43
|
+
image: apm-agent-ruby:${RUBY_VERSION:-3.3}
|
|
37
44
|
environment:
|
|
38
45
|
APP_PATH: /opt/app
|
|
39
46
|
FRAMEWORK: rails
|
|
40
|
-
LOCAL_USER_ID: ${LOCAL_USER_ID}
|
|
41
|
-
LOCAL_GROUP_ID: ${LOCAL_GROUP_ID}
|
|
47
|
+
LOCAL_USER_ID: ${LOCAL_USER_ID:-1000}
|
|
48
|
+
LOCAL_GROUP_ID: ${LOCAL_GROUP_ID:-1000}
|
|
42
49
|
MONGODB_URL: 'mongodb:27017'
|
|
43
50
|
security_opt:
|
|
44
51
|
- no-new-privileges
|
data/docs/docset.yml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
mapped_pages:
|
|
3
|
+
- https://www.elastic.co/guide/en/apm/agent/ruby/current/advanced.html
|
|
4
|
+
applies_to:
|
|
5
|
+
stack:
|
|
6
|
+
serverless:
|
|
7
|
+
observability:
|
|
8
|
+
product:
|
|
9
|
+
apm_agent_ruby: ga
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Advanced topics [advanced]
|
|
13
|
+
|
|
14
|
+
* [Adding additional context](/reference/context.md)
|
|
15
|
+
* [Custom instrumentation](/reference/custom-instrumentation.md)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|