elastic-apm 3.5.0 → 3.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/.ci/Jenkinsfile +286 -183
  3. data/.ci/docker/jruby/11-jdk/Dockerfile +40 -0
  4. data/.ci/docker/jruby/12-jdk/Dockerfile +40 -0
  5. data/.ci/docker/jruby/13-jdk/Dockerfile +40 -0
  6. data/.ci/docker/jruby/7-jdk/Dockerfile +40 -0
  7. data/.ci/docker/jruby/8-jdk/Dockerfile +40 -0
  8. data/.ci/docker/jruby/README.md +31 -0
  9. data/.ci/docker/jruby/run.sh +73 -0
  10. data/.ci/docker/jruby/test.sh +13 -0
  11. data/.ci/jobs/defaults.yml +1 -1
  12. data/.ci/packer_cache.sh +12 -10
  13. data/.gitignore +3 -1
  14. data/.rspec +0 -1
  15. data/.rubocop.yml +13 -1
  16. data/CHANGELOG.asciidoc +92 -0
  17. data/CONTRIBUTING.md +6 -4
  18. data/Gemfile +35 -9
  19. data/Rakefile +37 -5
  20. data/bin/run-tests +4 -1
  21. data/docker-compose.yml +7 -0
  22. data/docs/api.asciidoc +14 -2
  23. data/docs/configuration.asciidoc +122 -27
  24. data/docs/debugging.asciidoc +14 -0
  25. data/docs/getting-started-rails.asciidoc +2 -0
  26. data/docs/graphql.asciidoc +23 -0
  27. data/docs/images/dynamic-config.svg +1 -0
  28. data/docs/index.asciidoc +6 -1
  29. data/docs/introduction.asciidoc +2 -1
  30. data/docs/performance-tuning.asciidoc +106 -0
  31. data/docs/set-up.asciidoc +5 -2
  32. data/docs/supported-technologies.asciidoc +68 -1
  33. data/docs/upgrading.asciidoc +45 -0
  34. data/elastic-apm.gemspec +17 -0
  35. data/lib/elastic-apm.rb +17 -0
  36. data/lib/elastic_apm.rb +29 -0
  37. data/lib/elastic_apm/agent.rb +48 -2
  38. data/lib/elastic_apm/central_config.rb +27 -8
  39. data/lib/elastic_apm/central_config/cache_control.rb +17 -0
  40. data/lib/elastic_apm/child_durations.rb +17 -0
  41. data/lib/elastic_apm/config.rb +59 -3
  42. data/lib/elastic_apm/config/bytes.rb +17 -0
  43. data/lib/elastic_apm/config/duration.rb +17 -0
  44. data/lib/elastic_apm/config/options.rb +18 -1
  45. data/lib/elastic_apm/config/regexp_list.rb +17 -0
  46. data/lib/elastic_apm/config/wildcard_pattern_list.rb +28 -1
  47. data/lib/elastic_apm/context.rb +17 -0
  48. data/lib/elastic_apm/context/request.rb +17 -0
  49. data/lib/elastic_apm/context/request/socket.rb +17 -0
  50. data/lib/elastic_apm/context/request/url.rb +17 -0
  51. data/lib/elastic_apm/context/response.rb +17 -0
  52. data/lib/elastic_apm/context/user.rb +17 -0
  53. data/lib/elastic_apm/context_builder.rb +18 -1
  54. data/lib/elastic_apm/deprecations.rb +17 -0
  55. data/lib/elastic_apm/error.rb +17 -0
  56. data/lib/elastic_apm/error/exception.rb +17 -0
  57. data/lib/elastic_apm/error/log.rb +17 -0
  58. data/lib/elastic_apm/error_builder.rb +17 -0
  59. data/lib/elastic_apm/grape.rb +17 -0
  60. data/lib/elastic_apm/graphql.rb +91 -0
  61. data/lib/elastic_apm/grpc.rb +99 -0
  62. data/lib/elastic_apm/instrumenter.rb +29 -4
  63. data/lib/elastic_apm/internal_error.rb +17 -0
  64. data/lib/elastic_apm/logging.rb +17 -0
  65. data/lib/elastic_apm/metadata.rb +17 -0
  66. data/lib/elastic_apm/metadata/process_info.rb +17 -0
  67. data/lib/elastic_apm/metadata/service_info.rb +22 -2
  68. data/lib/elastic_apm/metadata/system_info.rb +22 -3
  69. data/lib/elastic_apm/metadata/system_info/container_info.rb +45 -4
  70. data/lib/elastic_apm/metrics.rb +33 -1
  71. data/lib/elastic_apm/metrics/breakdown_set.rb +17 -0
  72. data/lib/elastic_apm/metrics/cpu_mem_set.rb +17 -0
  73. data/lib/elastic_apm/metrics/metric.rb +17 -0
  74. data/lib/elastic_apm/metrics/set.rb +17 -0
  75. data/lib/elastic_apm/metrics/span_scoped_set.rb +17 -0
  76. data/lib/elastic_apm/metrics/transaction_set.rb +17 -0
  77. data/lib/elastic_apm/metrics/vm_set.rb +17 -0
  78. data/lib/elastic_apm/metricset.rb +17 -0
  79. data/lib/elastic_apm/middleware.rb +25 -2
  80. data/lib/elastic_apm/naively_hashable.rb +17 -0
  81. data/lib/elastic_apm/normalizers.rb +17 -0
  82. data/lib/elastic_apm/normalizers/grape.rb +17 -0
  83. data/lib/elastic_apm/normalizers/grape/endpoint_run.rb +18 -1
  84. data/lib/elastic_apm/normalizers/rails.rb +17 -0
  85. data/lib/elastic_apm/normalizers/rails/action_controller.rb +17 -0
  86. data/lib/elastic_apm/normalizers/rails/action_mailer.rb +17 -0
  87. data/lib/elastic_apm/normalizers/rails/action_view.rb +17 -0
  88. data/lib/elastic_apm/normalizers/rails/active_record.rb +17 -0
  89. data/lib/elastic_apm/opentracing.rb +64 -23
  90. data/lib/elastic_apm/rails.rb +17 -0
  91. data/lib/elastic_apm/railtie.rb +17 -0
  92. data/lib/elastic_apm/resque.rb +29 -0
  93. data/lib/elastic_apm/sinatra.rb +17 -0
  94. data/lib/elastic_apm/span.rb +20 -2
  95. data/lib/elastic_apm/span/context.rb +17 -0
  96. data/lib/elastic_apm/span/context/db.rb +17 -0
  97. data/lib/elastic_apm/span/context/destination.rb +37 -4
  98. data/lib/elastic_apm/span/context/http.rb +17 -0
  99. data/lib/elastic_apm/span_helpers.rb +17 -0
  100. data/lib/elastic_apm/spies.rb +33 -14
  101. data/lib/elastic_apm/spies/action_dispatch.rb +17 -0
  102. data/lib/elastic_apm/spies/delayed_job.rb +17 -0
  103. data/lib/elastic_apm/spies/dynamo_db.rb +58 -0
  104. data/lib/elastic_apm/spies/elasticsearch.rb +37 -2
  105. data/lib/elastic_apm/spies/faraday.rb +17 -0
  106. data/lib/elastic_apm/spies/http.rb +17 -0
  107. data/lib/elastic_apm/spies/json.rb +17 -0
  108. data/lib/elastic_apm/spies/mongo.rb +18 -1
  109. data/lib/elastic_apm/spies/net_http.rb +23 -2
  110. data/lib/elastic_apm/spies/rake.rb +17 -0
  111. data/lib/elastic_apm/spies/redis.rb +17 -0
  112. data/lib/elastic_apm/spies/resque.rb +53 -0
  113. data/lib/elastic_apm/spies/sequel.rb +18 -1
  114. data/lib/elastic_apm/spies/shoryuken.rb +17 -0
  115. data/lib/elastic_apm/spies/sidekiq.rb +17 -0
  116. data/lib/elastic_apm/spies/sinatra.rb +17 -0
  117. data/lib/elastic_apm/spies/sneakers.rb +17 -0
  118. data/lib/elastic_apm/spies/sucker_punch.rb +54 -0
  119. data/lib/elastic_apm/spies/tilt.rb +17 -0
  120. data/lib/elastic_apm/sql.rb +21 -4
  121. data/lib/elastic_apm/sql/signature.rb +17 -0
  122. data/lib/elastic_apm/sql/tokenizer.rb +17 -0
  123. data/lib/elastic_apm/sql/tokens.rb +17 -0
  124. data/lib/elastic_apm/sql_summarizer.rb +17 -0
  125. data/lib/elastic_apm/stacktrace.rb +17 -0
  126. data/lib/elastic_apm/stacktrace/frame.rb +17 -0
  127. data/lib/elastic_apm/stacktrace_builder.rb +23 -1
  128. data/lib/elastic_apm/subscriber.rb +17 -0
  129. data/lib/elastic_apm/trace_context.rb +51 -11
  130. data/lib/elastic_apm/trace_context/traceparent.rb +17 -0
  131. data/lib/elastic_apm/trace_context/tracestate.rb +17 -0
  132. data/lib/elastic_apm/transaction.rb +33 -5
  133. data/lib/elastic_apm/transport/base.rb +39 -23
  134. data/lib/elastic_apm/transport/connection.rb +17 -0
  135. data/lib/elastic_apm/transport/connection/http.rb +17 -0
  136. data/lib/elastic_apm/transport/connection/proxy_pipe.rb +22 -0
  137. data/lib/elastic_apm/transport/filters.rb +17 -0
  138. data/lib/elastic_apm/transport/filters/hash_sanitizer.rb +77 -0
  139. data/lib/elastic_apm/transport/filters/secrets_filter.rb +29 -56
  140. data/lib/elastic_apm/transport/headers.rb +17 -0
  141. data/lib/elastic_apm/transport/serializers.rb +17 -0
  142. data/lib/elastic_apm/transport/serializers/context_serializer.rb +17 -0
  143. data/lib/elastic_apm/transport/serializers/error_serializer.rb +17 -0
  144. data/lib/elastic_apm/transport/serializers/metadata_serializer.rb +44 -20
  145. data/lib/elastic_apm/transport/serializers/metricset_serializer.rb +17 -0
  146. data/lib/elastic_apm/transport/serializers/span_serializer.rb +20 -1
  147. data/lib/elastic_apm/transport/serializers/transaction_serializer.rb +17 -0
  148. data/lib/elastic_apm/transport/user_agent.rb +17 -0
  149. data/lib/elastic_apm/transport/worker.rb +21 -0
  150. data/lib/elastic_apm/util.rb +17 -0
  151. data/lib/elastic_apm/util/inflector.rb +17 -0
  152. data/lib/elastic_apm/util/lru_cache.rb +17 -0
  153. data/lib/elastic_apm/util/throttle.rb +17 -0
  154. data/lib/elastic_apm/version.rb +18 -1
  155. metadata +26 -12
  156. data/.ci/downstreamTests.groovy +0 -185
  157. data/.ci/prepare-git-context.sh +0 -27
  158. data/CHANGELOG.md +0 -1
  159. 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"
@@ -17,7 +17,7 @@
17
17
  days-to-keep: '30'
18
18
  concurrent: true
19
19
  node: linux
20
- periodic-folder-trigger: 1d
20
+ periodic-folder-trigger: 1w
21
21
  prune-dead-branches: true
22
22
  publishers:
23
23
  - email:
@@ -2,13 +2,15 @@
2
2
 
3
3
  source /usr/local/bin/bash_standard_lib.sh
4
4
 
5
- grep "-" .ci/.jenkins_ruby.yml | grep -v 'observability-ci' | cut -d'-' -f2- | \
6
- while read -r version;
7
- do
8
- transformedName=${version/:/-}
9
- transformedVersion=$(echo "${version}" | cut -d":" -f2)
10
- imageName="apm-agent-ruby"
11
- registryImageName="docker.elastic.co/observability-ci/${imageName}:${transformedName}"
12
- (retry 2 docker pull "${registryImageName}")
13
- docker tag "${registryImageName}" "${imageName}:${transformedVersion}"
14
- done
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
data/.gitignore CHANGED
@@ -22,4 +22,6 @@ vendor/
22
22
  log/
23
23
 
24
24
  benchmark-*.error
25
- benchmark-*.raw
25
+ benchmark-*.raw
26
+
27
+ .ci/docker/jruby/output.log
data/.rspec CHANGED
@@ -1,3 +1,2 @@
1
1
  --color
2
- --require spec_helper
3
2
  --exclude-pattern spec/integration/**/*_spec.rb
@@ -4,6 +4,8 @@ AllCops:
4
4
  - 'elastic-apm.gemspec'
5
5
  - 'vendor/**/*'
6
6
  - 'bench/*'
7
+ - 'spec/support/helloworld_pb.rb'
8
+ - 'spec/support/helloworld_services_pb.rb'
7
9
 
8
10
  require:
9
11
  - rubocop-performance
@@ -96,5 +98,15 @@ Style/SpecialGlobalVars:
96
98
  Style/MissingRespondToMissing:
97
99
  Enabled: false
98
100
 
99
- Style/BracesAroundHashParameters:
101
+ Style/HashEachMethods:
102
+ Enabled: true
103
+
104
+ Style/HashTransformKeys:
105
+ Enabled: true
106
+
107
+ Style/HashTransformValues:
108
+ Enabled: true
109
+
110
+ Style/FrozenStringLiteralComment:
100
111
  Enabled: false
112
+
@@ -35,6 +35,98 @@ endif::[]
35
35
  [[release-notes-3.x]]
36
36
  === Ruby Agent version 3.x
37
37
 
38
+ [[release-notes-3.10.0]]
39
+ ==== 3.10.0 (2020-08-26)
40
+
41
+ [float]
42
+ ===== Added
43
+
44
+ - Config option `transaction_ignore_urls` to replace `ignore_url_patterns` {pull}844[#844]
45
+ - Prepend `(?-i)` to patterns to make them case-sensitive {pull}846[#846]
46
+
47
+ [float]
48
+ ===== Fixed
49
+
50
+ - Reverted {pull}839[#839]
51
+ - Improved Kubernetes pod ID detection {pull}859[#859]
52
+
53
+ [[release-notes-3.9.0]]
54
+ ==== 3.9.0 (2020-08-04)
55
+
56
+ [float]
57
+ ===== Fixed
58
+ - Scrub request body of illegal UTF-8 characters {pull}832[#832]
59
+
60
+ [float]
61
+ ===== Added
62
+
63
+ - Support for DynamoDB {pull}827[#827]
64
+
65
+ [float]
66
+ ===== Fixed
67
+
68
+ - Fix Rails Engine views' paths being reported as absolute {pull}839[#839]
69
+ - Fix an issue when using Elasticsearch spy without a running agent {pull}830[#830]
70
+
71
+ [[release-notes-3.8.0]]
72
+ ==== 3.8.0 (2020-06-18)
73
+
74
+ [float]
75
+ ===== Added
76
+
77
+ - Add the option `capture_elasticsearch_queries` {pull}789[#789]
78
+ - Add option to skip patching Kernal#require {pull}812[#812]
79
+ - Add option `service_node_name` {pull}820[#820]
80
+
81
+ [float]
82
+ ===== Fixed
83
+
84
+ - Allow underscores in hostnames in Net::HTTP spy {pull}804[#804]
85
+ - Don't change log level on logger object via remote config {pull}809[#809]
86
+ - Update and fix the Opentracing bridge {pull}791[#791]
87
+
88
+ [[release-notes-3.7.0]]
89
+ ==== 3.7.0 (2020-05-14)
90
+
91
+ [float]
92
+ ===== Changed
93
+
94
+ - Make config values dynamic so they can be changed via the remote config {pull}747[#747]
95
+ - Log the updated options from central config in addition to cumulative modifications {pull}758[#758]
96
+
97
+ [float]
98
+ ===== Fixed
99
+
100
+ - Ensure that the log level is updated for the config's logger when value is changed {pull}755[#755]
101
+ - Set config `false` values to `false`, not `nil` {pull}761[#761]
102
+ - Ensure that the previously running agent's config is used in `ElasticAPM.restart` {pull}763[#763]
103
+ - Handle the Resque spy's payload class value being a String or Class and update docs {pull}768[#768]
104
+ - Add finalizer on ProxyPipe::Write so Zlib::GzipWriter is properly closed {pull}787[#787]
105
+
106
+ [float]
107
+ ===== Added
108
+
109
+ - Add enabled config option, replacing active {pull}669[#669]
110
+ - Add recording config option {pull}765[#765]
111
+ - Add support for `SuckerPunch` {pull}775[#775]
112
+ - Support forking: Detect forking and restart agent tasks and background threads {pull}783[#783]
113
+
114
+ [[release-notes-3.6.0]]
115
+ ==== 3.6.0 (2020-03-10)
116
+
117
+ [float]
118
+ ===== Added
119
+
120
+ - Support for gRPC using the `grpc` gem (Experimental) {pull}669[#669]
121
+ - GraphQL support (experimental) {pull}721[#721]
122
+ - Add `span.context.destination.address` and `span.context.destination.port` when available. {pull}722[#722]
123
+ - Add support for Resque. {pull}729[#729]
124
+
125
+ [float]
126
+ ===== Changed
127
+
128
+ - The new SQL parser is used by default {pull}730[#730]
129
+
38
130
  [[release-notes-3.5.0]]
39
131
  ==== 3.5.0 (2020-02-12)
40
132