elastic-apm 3.4.0 → 3.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ci/.jenkins_exclude.yml +39 -20
- data/.ci/.jenkins_framework.yml +2 -2
- data/.ci/Jenkinsfile +286 -170
- data/.ci/docker/jruby/11-jdk/Dockerfile +40 -0
- data/.ci/docker/jruby/12-jdk/Dockerfile +40 -0
- data/.ci/docker/jruby/13-jdk/Dockerfile +40 -0
- data/.ci/docker/jruby/7-jdk/Dockerfile +40 -0
- data/.ci/docker/jruby/8-jdk/Dockerfile +40 -0
- data/.ci/docker/jruby/README.md +31 -0
- data/.ci/docker/jruby/run.sh +73 -0
- data/.ci/docker/jruby/test.sh +13 -0
- data/.ci/jobs/defaults.yml +1 -1
- data/.ci/packer_cache.sh +16 -0
- data/.github/ISSUE_TEMPLATE/Bug_report.md +13 -11
- data/.github/ISSUE_TEMPLATE/Feature_request.md +8 -8
- data/.github/PULL_REQUEST_TEMPLATE.md +51 -5
- data/.gitignore +5 -0
- data/.rspec +0 -1
- data/.rubocop.yml +13 -1
- data/CHANGELOG.asciidoc +94 -1
- data/CONTRIBUTING.md +6 -48
- data/Gemfile +34 -9
- data/README.md +62 -13
- data/Rakefile +37 -5
- data/bin/run-tests +4 -1
- data/docker-compose.yml +7 -0
- data/docs/api.asciidoc +15 -3
- data/docs/configuration.asciidoc +164 -32
- data/docs/debugging.asciidoc +14 -0
- data/docs/getting-started-rails.asciidoc +2 -0
- data/docs/graphql.asciidoc +23 -0
- data/docs/images/dynamic-config.svg +1 -0
- data/docs/index.asciidoc +6 -1
- data/docs/introduction.asciidoc +2 -1
- data/docs/performance-tuning.asciidoc +106 -0
- data/docs/set-up.asciidoc +5 -2
- data/docs/supported-technologies.asciidoc +68 -1
- data/docs/upgrading.asciidoc +45 -0
- data/elastic-apm.gemspec +17 -0
- data/lib/elastic-apm.rb +17 -0
- data/lib/elastic_apm.rb +29 -0
- data/lib/elastic_apm/agent.rb +49 -2
- data/lib/elastic_apm/central_config.rb +27 -8
- data/lib/elastic_apm/central_config/cache_control.rb +17 -0
- data/lib/elastic_apm/child_durations.rb +17 -0
- data/lib/elastic_apm/config.rb +82 -7
- data/lib/elastic_apm/config/bytes.rb +17 -0
- data/lib/elastic_apm/config/duration.rb +17 -0
- data/lib/elastic_apm/config/options.rb +18 -1
- data/lib/elastic_apm/config/regexp_list.rb +17 -0
- data/lib/elastic_apm/config/wildcard_pattern_list.rb +20 -1
- data/lib/elastic_apm/context.rb +17 -0
- data/lib/elastic_apm/context/request.rb +17 -0
- data/lib/elastic_apm/context/request/socket.rb +17 -0
- data/lib/elastic_apm/context/request/url.rb +17 -0
- data/lib/elastic_apm/context/response.rb +18 -1
- data/lib/elastic_apm/context/user.rb +17 -0
- data/lib/elastic_apm/context_builder.rb +17 -0
- data/lib/elastic_apm/deprecations.rb +17 -0
- data/lib/elastic_apm/error.rb +17 -0
- data/lib/elastic_apm/error/exception.rb +17 -0
- data/lib/elastic_apm/error/log.rb +17 -0
- data/lib/elastic_apm/error_builder.rb +17 -0
- data/lib/elastic_apm/grape.rb +17 -0
- data/lib/elastic_apm/graphql.rb +91 -0
- data/lib/elastic_apm/grpc.rb +99 -0
- data/lib/elastic_apm/instrumenter.rb +29 -4
- data/lib/elastic_apm/internal_error.rb +17 -0
- data/lib/elastic_apm/logging.rb +17 -0
- data/lib/elastic_apm/metadata.rb +17 -0
- data/lib/elastic_apm/metadata/process_info.rb +17 -0
- data/lib/elastic_apm/metadata/service_info.rb +22 -2
- data/lib/elastic_apm/metadata/system_info.rb +17 -0
- data/lib/elastic_apm/metadata/system_info/container_info.rb +17 -0
- data/lib/elastic_apm/metrics.rb +33 -1
- data/lib/elastic_apm/metrics/breakdown_set.rb +17 -0
- data/lib/elastic_apm/metrics/cpu_mem_set.rb +17 -0
- data/lib/elastic_apm/metrics/metric.rb +23 -4
- data/lib/elastic_apm/metrics/set.rb +17 -0
- data/lib/elastic_apm/metrics/span_scoped_set.rb +17 -0
- data/lib/elastic_apm/metrics/transaction_set.rb +17 -0
- data/lib/elastic_apm/metrics/vm_set.rb +17 -0
- data/lib/elastic_apm/metricset.rb +17 -0
- data/lib/elastic_apm/middleware.rb +20 -4
- data/lib/elastic_apm/naively_hashable.rb +17 -0
- data/lib/elastic_apm/normalizers.rb +17 -0
- data/lib/elastic_apm/normalizers/grape.rb +17 -0
- data/lib/elastic_apm/normalizers/grape/endpoint_run.rb +18 -1
- data/lib/elastic_apm/normalizers/rails.rb +17 -0
- data/lib/elastic_apm/normalizers/rails/action_controller.rb +17 -0
- data/lib/elastic_apm/normalizers/rails/action_mailer.rb +17 -0
- data/lib/elastic_apm/normalizers/rails/action_view.rb +17 -0
- data/lib/elastic_apm/normalizers/rails/active_record.rb +17 -0
- data/lib/elastic_apm/opentracing.rb +66 -24
- data/lib/elastic_apm/rails.rb +17 -0
- data/lib/elastic_apm/railtie.rb +17 -0
- data/lib/elastic_apm/resque.rb +29 -0
- data/lib/elastic_apm/sinatra.rb +17 -0
- data/lib/elastic_apm/span.rb +17 -0
- data/lib/elastic_apm/span/context.rb +17 -0
- data/lib/elastic_apm/span/context/db.rb +26 -2
- data/lib/elastic_apm/span/context/destination.rb +37 -4
- data/lib/elastic_apm/span/context/http.rb +17 -0
- data/lib/elastic_apm/span_helpers.rb +17 -0
- data/lib/elastic_apm/spies.rb +33 -14
- data/lib/elastic_apm/spies/action_dispatch.rb +17 -0
- data/lib/elastic_apm/spies/delayed_job.rb +17 -0
- data/lib/elastic_apm/spies/dynamo_db.rb +58 -0
- data/lib/elastic_apm/spies/elasticsearch.rb +37 -2
- data/lib/elastic_apm/spies/faraday.rb +18 -1
- data/lib/elastic_apm/spies/http.rb +19 -1
- data/lib/elastic_apm/spies/json.rb +17 -0
- data/lib/elastic_apm/spies/mongo.rb +18 -1
- data/lib/elastic_apm/spies/net_http.rb +25 -3
- data/lib/elastic_apm/spies/rake.rb +17 -0
- data/lib/elastic_apm/spies/redis.rb +17 -0
- data/lib/elastic_apm/spies/resque.rb +53 -0
- data/lib/elastic_apm/spies/sequel.rb +31 -4
- data/lib/elastic_apm/spies/shoryuken.rb +17 -0
- data/lib/elastic_apm/spies/sidekiq.rb +17 -0
- data/lib/elastic_apm/spies/sinatra.rb +17 -0
- data/lib/elastic_apm/spies/sneakers.rb +17 -0
- data/lib/elastic_apm/spies/sucker_punch.rb +54 -0
- data/lib/elastic_apm/spies/tilt.rb +17 -0
- data/lib/elastic_apm/sql.rb +21 -4
- data/lib/elastic_apm/sql/signature.rb +17 -0
- data/lib/elastic_apm/sql/tokenizer.rb +17 -0
- data/lib/elastic_apm/sql/tokens.rb +17 -0
- data/lib/elastic_apm/sql_summarizer.rb +17 -0
- data/lib/elastic_apm/stacktrace.rb +17 -0
- data/lib/elastic_apm/stacktrace/frame.rb +17 -0
- data/lib/elastic_apm/stacktrace_builder.rb +23 -1
- data/lib/elastic_apm/subscriber.rb +17 -0
- data/lib/elastic_apm/trace_context.rb +85 -49
- data/lib/elastic_apm/trace_context/traceparent.rb +113 -0
- data/lib/elastic_apm/trace_context/tracestate.rb +43 -0
- data/lib/elastic_apm/transaction.rb +33 -5
- data/lib/elastic_apm/transport/base.rb +39 -23
- data/lib/elastic_apm/transport/connection.rb +17 -0
- data/lib/elastic_apm/transport/connection/http.rb +17 -0
- data/lib/elastic_apm/transport/connection/proxy_pipe.rb +22 -0
- data/lib/elastic_apm/transport/filters.rb +17 -0
- data/lib/elastic_apm/transport/filters/hash_sanitizer.rb +77 -0
- data/lib/elastic_apm/transport/filters/secrets_filter.rb +29 -53
- data/lib/elastic_apm/transport/headers.rb +17 -0
- data/lib/elastic_apm/transport/serializers.rb +17 -0
- data/lib/elastic_apm/transport/serializers/context_serializer.rb +17 -0
- data/lib/elastic_apm/transport/serializers/error_serializer.rb +17 -0
- data/lib/elastic_apm/transport/serializers/metadata_serializer.rb +44 -20
- data/lib/elastic_apm/transport/serializers/metricset_serializer.rb +17 -0
- data/lib/elastic_apm/transport/serializers/span_serializer.rb +22 -2
- data/lib/elastic_apm/transport/serializers/transaction_serializer.rb +17 -0
- data/lib/elastic_apm/transport/user_agent.rb +17 -0
- data/lib/elastic_apm/transport/worker.rb +17 -0
- data/lib/elastic_apm/util.rb +17 -0
- data/lib/elastic_apm/util/inflector.rb +17 -0
- data/lib/elastic_apm/util/lru_cache.rb +17 -0
- data/lib/elastic_apm/util/throttle.rb +17 -0
- data/lib/elastic_apm/version.rb +18 -1
- metadata +29 -12
- data/.ci/downstreamTests.groovy +0 -185
- data/.ci/prepare-git-context.sh +0 -27
- data/CHANGELOG.md +0 -1
- data/codecov.yml +0 -32
@@ -0,0 +1,40 @@
|
|
1
|
+
FROM openjdk:11-jdk
|
2
|
+
|
3
|
+
RUN apt-get update \
|
4
|
+
&& apt-get install -y libc6-dev --no-install-recommends \
|
5
|
+
&& rm -rf /var/lib/apt/lists/*
|
6
|
+
|
7
|
+
ENV JRUBY_VERSION 9.2.10.0
|
8
|
+
ENV JRUBY_SHA256 9199707712c683c525252ccb1de5cb8e75f53b790c5b57a18f6367039ec79553
|
9
|
+
|
10
|
+
RUN mkdir -p /opt/jruby \
|
11
|
+
&& curl -fSL https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz -o /tmp/jruby.tar.gz \
|
12
|
+
&& echo "$JRUBY_SHA256 */tmp/jruby.tar.gz" | sha256sum -c - \
|
13
|
+
&& tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
|
14
|
+
&& update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
|
15
|
+
|
16
|
+
# set the jruby binaries in the path
|
17
|
+
ENV PATH /opt/jruby/bin:$PATH
|
18
|
+
|
19
|
+
# skip installing gem documentation
|
20
|
+
RUN mkdir -p /opt/jruby/etc \
|
21
|
+
&& { \
|
22
|
+
echo 'install: --no-document'; \
|
23
|
+
echo 'update: --no-document'; \
|
24
|
+
} >> /opt/jruby/etc/gemrc
|
25
|
+
|
26
|
+
# install bundler, gem requires bash to work
|
27
|
+
RUN gem install bundler rake net-telnet xmlrpc tzinfo-data
|
28
|
+
|
29
|
+
# install things globally, for great justice
|
30
|
+
# and don't create ".bundle" in all our apps
|
31
|
+
ENV GEM_HOME /usr/local/bundle
|
32
|
+
ENV BUNDLE_PATH="$GEM_HOME" \
|
33
|
+
BUNDLE_BIN="$GEM_HOME/bin" \
|
34
|
+
BUNDLE_SILENCE_ROOT_WARNING=1 \
|
35
|
+
BUNDLE_APP_CONFIG="$GEM_HOME"
|
36
|
+
ENV PATH $BUNDLE_BIN:$PATH
|
37
|
+
RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
|
38
|
+
&& chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
|
39
|
+
|
40
|
+
CMD [ "irb" ]
|
@@ -0,0 +1,40 @@
|
|
1
|
+
FROM adoptopenjdk:12-jdk-openj9
|
2
|
+
|
3
|
+
RUN apt-get update \
|
4
|
+
&& apt-get install -y libc6-dev git tcc netbase --no-install-recommends \
|
5
|
+
&& rm -rf /var/lib/apt/lists/*
|
6
|
+
|
7
|
+
ENV JRUBY_VERSION 9.2.10.0
|
8
|
+
ENV JRUBY_SHA256 9199707712c683c525252ccb1de5cb8e75f53b790c5b57a18f6367039ec79553
|
9
|
+
|
10
|
+
RUN mkdir -p /opt/jruby \
|
11
|
+
&& curl -fSL https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz -o /tmp/jruby.tar.gz \
|
12
|
+
&& echo "$JRUBY_SHA256 */tmp/jruby.tar.gz" | sha256sum -c - \
|
13
|
+
&& tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
|
14
|
+
&& update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
|
15
|
+
|
16
|
+
# set the jruby binaries in the path
|
17
|
+
ENV PATH /opt/jruby/bin:$PATH
|
18
|
+
|
19
|
+
# skip installing gem documentation
|
20
|
+
RUN mkdir -p /opt/jruby/etc \
|
21
|
+
&& { \
|
22
|
+
echo 'install: --no-document'; \
|
23
|
+
echo 'update: --no-document'; \
|
24
|
+
} >> /opt/jruby/etc/gemrc
|
25
|
+
|
26
|
+
# install bundler, gem requires bash to work
|
27
|
+
RUN gem install bundler rake net-telnet xmlrpc tzinfo-data
|
28
|
+
|
29
|
+
# install things globally, for great justice
|
30
|
+
# and don't create ".bundle" in all our apps
|
31
|
+
ENV GEM_HOME /usr/local/bundle
|
32
|
+
ENV BUNDLE_PATH="$GEM_HOME" \
|
33
|
+
BUNDLE_BIN="$GEM_HOME/bin" \
|
34
|
+
BUNDLE_SILENCE_ROOT_WARNING=1 \
|
35
|
+
BUNDLE_APP_CONFIG="$GEM_HOME"
|
36
|
+
ENV PATH $BUNDLE_BIN:$PATH
|
37
|
+
RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
|
38
|
+
&& chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
|
39
|
+
|
40
|
+
CMD [ "irb" ]
|
@@ -0,0 +1,40 @@
|
|
1
|
+
FROM openjdk:13-jdk-slim
|
2
|
+
|
3
|
+
RUN apt-get update \
|
4
|
+
&& apt-get install -y libc6-dev git tcc curl netbase --no-install-recommends \
|
5
|
+
&& rm -rf /var/lib/apt/lists/*
|
6
|
+
|
7
|
+
ENV JRUBY_VERSION 9.2.10.0
|
8
|
+
ENV JRUBY_SHA256 9199707712c683c525252ccb1de5cb8e75f53b790c5b57a18f6367039ec79553
|
9
|
+
|
10
|
+
RUN mkdir -p /opt/jruby \
|
11
|
+
&& curl -fSL https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz -o /tmp/jruby.tar.gz \
|
12
|
+
&& echo "$JRUBY_SHA256 */tmp/jruby.tar.gz" | sha256sum -c - \
|
13
|
+
&& tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
|
14
|
+
&& update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
|
15
|
+
|
16
|
+
# set the jruby binaries in the path
|
17
|
+
ENV PATH /opt/jruby/bin:$PATH
|
18
|
+
|
19
|
+
# skip installing gem documentation
|
20
|
+
RUN mkdir -p /opt/jruby/etc \
|
21
|
+
&& { \
|
22
|
+
echo 'install: --no-document'; \
|
23
|
+
echo 'update: --no-document'; \
|
24
|
+
} >> /opt/jruby/etc/gemrc
|
25
|
+
|
26
|
+
# install bundler, gem requires bash to work
|
27
|
+
RUN gem install bundler rake net-telnet xmlrpc tzinfo-data
|
28
|
+
|
29
|
+
# install things globally, for great justice
|
30
|
+
# and don't create ".bundle" in all our apps
|
31
|
+
ENV GEM_HOME /usr/local/bundle
|
32
|
+
ENV BUNDLE_PATH="$GEM_HOME" \
|
33
|
+
BUNDLE_BIN="$GEM_HOME/bin" \
|
34
|
+
BUNDLE_SILENCE_ROOT_WARNING=1 \
|
35
|
+
BUNDLE_APP_CONFIG="$GEM_HOME"
|
36
|
+
ENV PATH $BUNDLE_BIN:$PATH
|
37
|
+
RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
|
38
|
+
&& chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
|
39
|
+
|
40
|
+
CMD [ "irb" ]
|
@@ -0,0 +1,40 @@
|
|
1
|
+
FROM openjdk:7-jdk
|
2
|
+
|
3
|
+
RUN apt-get update \
|
4
|
+
&& apt-get install -y libc6-dev --no-install-recommends \
|
5
|
+
&& rm -rf /var/lib/apt/lists/*
|
6
|
+
|
7
|
+
ENV JRUBY_VERSION 9.1.17.0
|
8
|
+
ENV JRUBY_SHA256 6a22f7bf8fef1a52530a9c9781a9d374ad07bbbef0d3d8e2af0ff5cbead0dfd5
|
9
|
+
|
10
|
+
RUN mkdir -p /opt/jruby \
|
11
|
+
&& curl -fSL https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz -o /tmp/jruby.tar.gz \
|
12
|
+
&& echo "$JRUBY_SHA256 */tmp/jruby.tar.gz" | sha256sum -c - \
|
13
|
+
&& tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
|
14
|
+
&& update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
|
15
|
+
|
16
|
+
# set the jruby binaries in the path
|
17
|
+
ENV PATH /opt/jruby/bin:$PATH
|
18
|
+
|
19
|
+
# skip installing gem documentation
|
20
|
+
RUN mkdir -p /opt/jruby/etc \
|
21
|
+
&& { \
|
22
|
+
echo 'install: --no-document'; \
|
23
|
+
echo 'update: --no-document'; \
|
24
|
+
} >> /opt/jruby/etc/gemrc
|
25
|
+
|
26
|
+
# install bundler, gem requires bash to work
|
27
|
+
RUN gem install bundler rake net-telnet xmlrpc tzinfo-data
|
28
|
+
|
29
|
+
# install things globally, for great justice
|
30
|
+
# and don't create ".bundle" in all our apps
|
31
|
+
ENV GEM_HOME /usr/local/bundle
|
32
|
+
ENV BUNDLE_PATH="$GEM_HOME" \
|
33
|
+
BUNDLE_BIN="$GEM_HOME/bin" \
|
34
|
+
BUNDLE_SILENCE_ROOT_WARNING=1 \
|
35
|
+
BUNDLE_APP_CONFIG="$GEM_HOME"
|
36
|
+
ENV PATH $BUNDLE_BIN:$PATH
|
37
|
+
RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
|
38
|
+
&& chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
|
39
|
+
|
40
|
+
CMD [ "irb" ]
|
@@ -0,0 +1,40 @@
|
|
1
|
+
FROM openjdk:8-jdk
|
2
|
+
|
3
|
+
RUN apt-get update \
|
4
|
+
&& apt-get install -y libc6-dev --no-install-recommends \
|
5
|
+
&& rm -rf /var/lib/apt/lists/*
|
6
|
+
|
7
|
+
ENV JRUBY_VERSION 9.2.10.0
|
8
|
+
ENV JRUBY_SHA256 9199707712c683c525252ccb1de5cb8e75f53b790c5b57a18f6367039ec79553
|
9
|
+
|
10
|
+
RUN mkdir -p /opt/jruby \
|
11
|
+
&& curl -fSL https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz -o /tmp/jruby.tar.gz \
|
12
|
+
&& echo "$JRUBY_SHA256 */tmp/jruby.tar.gz" | sha256sum -c - \
|
13
|
+
&& tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
|
14
|
+
&& update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
|
15
|
+
|
16
|
+
# set the jruby binaries in the path
|
17
|
+
ENV PATH /opt/jruby/bin:$PATH
|
18
|
+
|
19
|
+
# skip installing gem documentation
|
20
|
+
RUN mkdir -p /opt/jruby/etc \
|
21
|
+
&& { \
|
22
|
+
echo 'install: --no-document'; \
|
23
|
+
echo 'update: --no-document'; \
|
24
|
+
} >> /opt/jruby/etc/gemrc
|
25
|
+
|
26
|
+
# install bundler, gem requires bash to work
|
27
|
+
RUN gem install bundler rake net-telnet xmlrpc tzinfo-data
|
28
|
+
|
29
|
+
# install things globally, for great justice
|
30
|
+
# and don't create ".bundle" in all our apps
|
31
|
+
ENV GEM_HOME /usr/local/bundle
|
32
|
+
ENV BUNDLE_PATH="$GEM_HOME" \
|
33
|
+
BUNDLE_BIN="$GEM_HOME/bin" \
|
34
|
+
BUNDLE_SILENCE_ROOT_WARNING=1 \
|
35
|
+
BUNDLE_APP_CONFIG="$GEM_HOME"
|
36
|
+
ENV PATH $BUNDLE_BIN:$PATH
|
37
|
+
RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
|
38
|
+
&& chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
|
39
|
+
|
40
|
+
CMD [ "irb" ]
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# JRuby docker images
|
2
|
+
|
3
|
+
Builds jruby docker images.
|
4
|
+
|
5
|
+
## Build
|
6
|
+
|
7
|
+
To build the images run
|
8
|
+
|
9
|
+
```bash
|
10
|
+
./run.sh --action build
|
11
|
+
```
|
12
|
+
|
13
|
+
You can set your own docker registry with the flag `--registry x.y.z/org`
|
14
|
+
|
15
|
+
You can exclude what images can be built with the flag `--exclude jdk-7`
|
16
|
+
|
17
|
+
## Test
|
18
|
+
|
19
|
+
To test the images run
|
20
|
+
|
21
|
+
```bash
|
22
|
+
./run.sh --action test
|
23
|
+
```
|
24
|
+
|
25
|
+
## Push
|
26
|
+
|
27
|
+
To push the images run
|
28
|
+
|
29
|
+
```bash
|
30
|
+
./run.sh --action push
|
31
|
+
```
|
@@ -0,0 +1,73 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
while (( "$#" )); do
|
4
|
+
case "$1" in
|
5
|
+
-r|--registry)
|
6
|
+
REGISTRY=$2
|
7
|
+
shift 2
|
8
|
+
;;
|
9
|
+
-e|--exclude)
|
10
|
+
EXCLUDE=$2
|
11
|
+
shift 2
|
12
|
+
;;
|
13
|
+
-a|--action)
|
14
|
+
ACTION=$2
|
15
|
+
shift 2
|
16
|
+
;;
|
17
|
+
--) # end argument parsing
|
18
|
+
shift
|
19
|
+
break
|
20
|
+
;;
|
21
|
+
-*|--*=) # unsupported flags
|
22
|
+
echo "Error: Unsupported flag $1" >&2
|
23
|
+
exit 1
|
24
|
+
;;
|
25
|
+
*) # preserve positional arguments
|
26
|
+
shift
|
27
|
+
;;
|
28
|
+
esac
|
29
|
+
done
|
30
|
+
|
31
|
+
|
32
|
+
if [ -n "$EXCLUDE" ] ; then
|
33
|
+
search=$(find . -path ./$EXCLUDE -prune -o -name 'Dockerfile' -print)
|
34
|
+
else
|
35
|
+
search=$(find . -name 'Dockerfile' -print)
|
36
|
+
fi
|
37
|
+
|
38
|
+
function report {
|
39
|
+
if [ $1 -eq 0 ] ; then
|
40
|
+
printf '\tImage %-60s %-10s\n' "${2}" "GENERATED"
|
41
|
+
else
|
42
|
+
printf '\tImage %-60s %-10s\n' "${2}" "FAILED"
|
43
|
+
fi
|
44
|
+
}
|
45
|
+
|
46
|
+
echo "${ACTION} docker images"
|
47
|
+
for i in ${search}; do
|
48
|
+
jdk_image=$(basename `dirname "$i"`)
|
49
|
+
jdk_version=$(echo "$jdk_image" | cut -d'-' -f1)
|
50
|
+
jruby=$(grep "JRUBY_VERSION" $i | cut -d" " -f 3)
|
51
|
+
if [ "${jdk_image}" == "onbuild" ] ; then
|
52
|
+
short=$(grep "FROM" "$i" | cut -d":" -f 2 | cut -d'-' -f1)
|
53
|
+
jdk_version=
|
54
|
+
else
|
55
|
+
short=$(echo "$jruby" | cut -d'.' -f1-2)
|
56
|
+
fi
|
57
|
+
|
58
|
+
if [ -n "${REGISTRY}" ] ; then
|
59
|
+
name="${REGISTRY}/jruby:${short}-${jdk_image}"
|
60
|
+
else
|
61
|
+
name="jruby:${short}-${jdk_image}"
|
62
|
+
fi
|
63
|
+
|
64
|
+
if [ "${ACTION}" == "build" ] ; then
|
65
|
+
docker build --tag "${name}" -< $i >> output.log 2>&1
|
66
|
+
report $? "${name}"
|
67
|
+
elif [ "${ACTION}" == "push" ] ; then
|
68
|
+
docker push "${name}" >> output.log 2>&1
|
69
|
+
report $? "${name}"
|
70
|
+
else
|
71
|
+
./test.sh "${name}" $jdk_version
|
72
|
+
fi
|
73
|
+
done
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
image=${1?image is required}
|
3
|
+
version=${2}
|
4
|
+
|
5
|
+
printf '\tTest %-30s %s\n' ${image}
|
6
|
+
|
7
|
+
if [ -n "$version" ] ; then
|
8
|
+
test_name="Test java -version '$version'"
|
9
|
+
docker run -t --rm $image java -version | grep -q "openjdk version \"$version\|1.$version" && printf '\t\t%-40s %s\n' "${test_name}" "PASSED" || printf '\t\t%-40s %s\n' "${test_name}" "FAILED"
|
10
|
+
fi
|
11
|
+
|
12
|
+
test_name="Test Hello World"
|
13
|
+
docker run -t --rm $image jruby -e "puts 'Hello World" | grep -q 'Hello World' && printf '\t\t%-40s %s\n' "${test_name}" "PASSED" || printf '\t\t%-40s %s\n' "${test_name}" "FAILED"
|
data/.ci/jobs/defaults.yml
CHANGED
data/.ci/packer_cache.sh
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
source /usr/local/bin/bash_standard_lib.sh
|
4
|
+
|
5
|
+
if [ -x "$(command -v docker)" ]; then
|
6
|
+
grep "-" .ci/.jenkins_ruby.yml | grep -v 'observability-ci' | cut -d'-' -f2- | \
|
7
|
+
while read -r version;
|
8
|
+
do
|
9
|
+
transformedName=${version/:/-}
|
10
|
+
transformedVersion=$(echo "${version}" | cut -d":" -f2)
|
11
|
+
imageName="apm-agent-ruby"
|
12
|
+
registryImageName="docker.elastic.co/observability-ci/${imageName}:${transformedName}"
|
13
|
+
(retry 2 docker pull "${registryImageName}")
|
14
|
+
docker tag "${registryImageName}" "${imageName}:${transformedVersion}"
|
15
|
+
done
|
16
|
+
fi
|
@@ -4,26 +4,28 @@ about: Create a report to help us improve
|
|
4
4
|
|
5
5
|
---
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
**To Reproduce**
|
7
|
+
## Describe the bug
|
10
8
|
|
9
|
+
## Steps to reproduce
|
10
|
+
<!--
|
11
11
|
1. ...
|
12
12
|
2. ...
|
13
13
|
3. ...
|
14
14
|
4. ...
|
15
|
+
-->
|
15
16
|
|
16
|
-
|
17
|
+
## Expected behavior
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
-
|
21
|
-
-
|
22
|
-
-
|
23
|
-
-
|
19
|
+
## Environment
|
20
|
+
<!-- Please complete the following information -->
|
21
|
+
- **OS**: <!-- [e.g. Linux] -->
|
22
|
+
- **Ruby version**:
|
23
|
+
- **Framework and version**: <!-- [e.g. Rails 6.0.1] -->
|
24
|
+
- **APM Server version**:
|
25
|
+
- **Agent version**:
|
24
26
|
|
25
27
|
|
26
|
-
|
28
|
+
## Additional context
|
27
29
|
|
28
30
|
Add any other context about the problem here.
|
29
31
|
|
@@ -4,14 +4,14 @@ about: Suggest an idea for this project
|
|
4
4
|
|
5
5
|
---
|
6
6
|
|
7
|
-
|
8
|
-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
7
|
+
## Is your feature request related to a problem? Please describe.
|
8
|
+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
9
9
|
|
10
|
-
|
11
|
-
A clear and concise description of what you want to happen.
|
10
|
+
## Describe the solution you'd like
|
11
|
+
<!-- A clear and concise description of what you want to happen. -->
|
12
12
|
|
13
|
-
|
14
|
-
A clear and concise description of any alternative solutions or features you've considered.
|
13
|
+
## Describe alternatives you've considered
|
14
|
+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
15
15
|
|
16
|
-
|
17
|
-
Add any other context or screenshots about the feature request here.
|
16
|
+
## Additional context
|
17
|
+
<!-- Add any other context or screenshots about the feature request here. -->
|
@@ -1,14 +1,60 @@
|
|
1
|
+
<!--
|
2
|
+
A few suggestions about filling out this PR
|
3
|
+
|
4
|
+
1. Use a descriptive title for the PR.
|
5
|
+
2. If this pull request is work in progress, create a draft PR instead of prefixing the title with WIP.
|
6
|
+
3. Please label this PR at least one of the following labels, depending on the scope of your change:
|
7
|
+
- feature request, which adds new behavior
|
8
|
+
- bug fix
|
9
|
+
- enhancement, which modifies existing behavior
|
10
|
+
- breaking change
|
11
|
+
4. Remove those recommended/optional sections if you don't need them. Only "What does this PR do", "Why is it important?" and "Checklist" are mandatory.
|
12
|
+
5. Generally, we require that you test any code you are adding or modifying.
|
13
|
+
Once your changes are ready to submit for review:
|
14
|
+
6. Submit the pull request: Push your local changes to your forked copy of the repository and submit a pull request (https://help.github.com/articles/using-pull-requests).
|
15
|
+
7. Please be patient. We might not be able to review your code as fast as we would like to, but we'll do our best to dedicate to it the attention it deserves. Your effort is much appreciated!
|
16
|
+
-->
|
17
|
+
|
1
18
|
## What does this pull request do?
|
2
19
|
|
3
|
-
<!--
|
4
|
-
|
20
|
+
<!--
|
21
|
+
Use this space to describe what the proposed code _does_, ie. what precisely will be done differently from this change.
|
5
22
|
-->
|
6
23
|
|
7
24
|
## Why is it important?
|
8
25
|
|
9
|
-
<!--
|
10
|
-
|
26
|
+
<!--
|
27
|
+
Optionally provide an explanation of why this is important.
|
28
|
+
-->
|
29
|
+
|
30
|
+
## Checklist
|
31
|
+
<!--
|
32
|
+
Add a checklist of things that are required to be reviewed in order to have the PR approved
|
33
|
+
|
34
|
+
List here all the items you have verified BEFORE sending this PR. Please DO NOT remove any item, striking through those that do not apply. (Just in case, strikethrough uses two tildes. ~~Scratch this.~~)
|
11
35
|
-->
|
12
36
|
|
37
|
+
- [ ] I have signed the [Contributor License Agreement](https://www.elastic.co/contributor-agreement/).
|
38
|
+
- [ ] My code follows the style guidelines of this project (See `.rubocop.yml`)
|
39
|
+
- [ ] I have rebased my changes on top of the latest master branch
|
40
|
+
<!--
|
41
|
+
Update your local repository with the most recent code from the main repo, and rebase your branch on top of the latest master branch. We prefer your initial changes to be squashed into a single commit. Later, if we ask you to make changes, add them as separate commits. This makes them easier to review.
|
42
|
+
-->
|
43
|
+
- [ ] I have added tests that prove my fix is effective or that my feature works
|
44
|
+
- [ ] New and existing [**unit** tests](https://github.com/elastic/apm-agent-ruby/blob/master/CONTRIBUTING.md#testing) pass locally with my changes
|
45
|
+
<!--
|
46
|
+
Run the test suite to make sure that nothing is broken. See https://github.com/elastic/apm-agent-ruby/blob/master/CONTRIBUTING.md#testing for details.
|
47
|
+
-->
|
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)
|
51
|
+
- [ ] Added an API method or config option? Document in which version this will be introduced
|
52
|
+
|
13
53
|
## Related issues
|
14
|
-
|
54
|
+
<!--
|
55
|
+
Link related issues below. Insert the issue link or reference after the word "Closes" if merging this should automatically close it.
|
56
|
+
- Closes #ISSUE_ID
|
57
|
+
- Relates #ISSUE_ID
|
58
|
+
- Requires #ISSUE_ID
|
59
|
+
- Superseds #ISSUE_ID
|
60
|
+
-->
|