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
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/.rubocop.yml
CHANGED
@@ -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/
|
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
|
+
|
data/CHANGELOG.asciidoc
CHANGED
@@ -35,6 +35,99 @@ endif::[]
|
|
35
35
|
[[release-notes-3.x]]
|
36
36
|
=== Ruby Agent version 3.x
|
37
37
|
|
38
|
+
[[release-notes-3.9.0]]
|
39
|
+
==== 3.9.0 (2020-08-04)
|
40
|
+
|
41
|
+
[float]
|
42
|
+
===== Added
|
43
|
+
|
44
|
+
- Support for DynamoDB {pull}827[#827]
|
45
|
+
|
46
|
+
[float]
|
47
|
+
===== Fixed
|
48
|
+
|
49
|
+
- Fix Rails Engine views' paths being reported as absolute {pull}839[#839]
|
50
|
+
- Fix an issue when using Elasticsearch spy without a running agent {pull}830[#830]
|
51
|
+
|
52
|
+
[[release-notes-3.8.0]]
|
53
|
+
==== 3.8.0 (2020-06-18)
|
54
|
+
|
55
|
+
[float]
|
56
|
+
===== Added
|
57
|
+
|
58
|
+
- Add the option `capture_elasticsearch_queries` {pull}789[#789]
|
59
|
+
- Add option to skip patching Kernal#require {pull}812[#812]
|
60
|
+
- Add option `service_node_name` {pull}820[#820]
|
61
|
+
|
62
|
+
[float]
|
63
|
+
===== Fixed
|
64
|
+
|
65
|
+
- Allow underscores in hostnames in Net::HTTP spy {pull}804[#804]
|
66
|
+
- Don't change log level on logger object via remote config {pull}809[#809]
|
67
|
+
- Update and fix the Opentracing bridge {pull}791[#791]
|
68
|
+
|
69
|
+
[[release-notes-3.7.0]]
|
70
|
+
==== 3.7.0 (2020-05-14)
|
71
|
+
|
72
|
+
[float]
|
73
|
+
===== Changed
|
74
|
+
|
75
|
+
- Make config values dynamic so they can be changed via the remote config {pull}747[#747]
|
76
|
+
- Log the updated options from central config in addition to cumulative modifications {pull}758[#758]
|
77
|
+
|
78
|
+
[float]
|
79
|
+
===== Fixed
|
80
|
+
|
81
|
+
- Ensure that the log level is updated for the config's logger when value is changed {pull}755[#755]
|
82
|
+
- Set config `false` values to `false`, not `nil` {pull}761[#761]
|
83
|
+
- Ensure that the previously running agent's config is used in `ElasticAPM.restart` {pull}763[#763]
|
84
|
+
- Handle the Resque spy's payload class value being a String or Class and update docs {pull}768[#768]
|
85
|
+
- Add finalizer on ProxyPipe::Write so Zlib::GzipWriter is properly closed {pull}787[#787]
|
86
|
+
|
87
|
+
[float]
|
88
|
+
===== Added
|
89
|
+
|
90
|
+
- Add enabled config option, replacing active {pull}669[#669]
|
91
|
+
- Add recording config option {pull}765[#765]
|
92
|
+
- Add support for `SuckerPunch` {pull}775[#775]
|
93
|
+
- Support forking: Detect forking and restart agent tasks and background threads {pull}783[#783]
|
94
|
+
|
95
|
+
[[release-notes-3.6.0]]
|
96
|
+
==== 3.6.0 (2020-03-10)
|
97
|
+
|
98
|
+
[float]
|
99
|
+
===== Added
|
100
|
+
|
101
|
+
- Support for gRPC using the `grpc` gem (Experimental) {pull}669[#669]
|
102
|
+
- GraphQL support (experimental) {pull}721[#721]
|
103
|
+
- Add `span.context.destination.address` and `span.context.destination.port` when available. {pull}722[#722]
|
104
|
+
- Add support for Resque. {pull}729[#729]
|
105
|
+
|
106
|
+
[float]
|
107
|
+
===== Changed
|
108
|
+
|
109
|
+
- The new SQL parser is used by default {pull}730[#730]
|
110
|
+
|
111
|
+
[[release-notes-3.5.0]]
|
112
|
+
==== 3.5.0 (2020-02-12)
|
113
|
+
|
114
|
+
[float]
|
115
|
+
===== Added
|
116
|
+
|
117
|
+
- Pass along tracestate headers and add prefixless Traceparent header {pull}694[#694]
|
118
|
+
- Add sanitize_field_names to replace custom_key_filters {pull}708[#708]
|
119
|
+
- Add `rows_affected` to database related spans (Sequel only for now) {pull}668[#668]
|
120
|
+
|
121
|
+
[float]
|
122
|
+
===== Changed
|
123
|
+
|
124
|
+
- Rename disabled_instrumentations to disable_instrumentations {pull}695[#695]
|
125
|
+
|
126
|
+
[float]
|
127
|
+
===== Fixed
|
128
|
+
|
129
|
+
- Fix thread race condition in metrics collection (JRuby) {pull}669[#669]
|
130
|
+
|
38
131
|
[[release-notes-3.4.0]]
|
39
132
|
==== 3.4.0 (2020-01-10)
|
40
133
|
|
@@ -45,7 +138,7 @@ endif::[]
|
|
45
138
|
- Add more precise (experimental) SQL summarizer {pull}640[#640]
|
46
139
|
- Add support for Shoryuken (AWS SQS) {pull}674[#674]
|
47
140
|
- Add support for Sneakers (Experimental) {pull}676[#676]
|
48
|
-
- Add option `api_key` to specify an Api key to use with the apm server {pull}655[#655]
|
141
|
+
- Add option `api_key` (experimental) to specify an Api key to use with the apm server {pull}655[#655]
|
49
142
|
|
50
143
|
[float]
|
51
144
|
===== Changed
|
data/CONTRIBUTING.md
CHANGED
@@ -18,50 +18,6 @@ Talk about what you would like to do.
|
|
18
18
|
It may be that somebody is already working on it,
|
19
19
|
or that there are particular issues that you should know about before implementing the change.
|
20
20
|
|
21
|
-
### Submitting your changes
|
22
|
-
|
23
|
-
Generally, we require that you test any code you are adding or modifying.
|
24
|
-
Once your changes are ready to submit for review:
|
25
|
-
|
26
|
-
1. Sign the Contributor License Agreement
|
27
|
-
|
28
|
-
Please make sure you have signed our [Contributor License Agreement](https://www.elastic.co/contributor-agreement/).
|
29
|
-
We are not asking you to assign copyright to us,
|
30
|
-
but to give us the right to distribute your code without restriction.
|
31
|
-
We ask this of all contributors in order to assure our users of the origin and continuing existence of the code.
|
32
|
-
You only need to sign the CLA once.
|
33
|
-
|
34
|
-
2. Test your changes
|
35
|
-
|
36
|
-
Run the test suite to make sure that nothing is broken.
|
37
|
-
See [testing](#testing) for details.
|
38
|
-
|
39
|
-
3. Rebase your changes
|
40
|
-
|
41
|
-
Update your local repository with the most recent code from the main repo,
|
42
|
-
and rebase your branch on top of the latest master branch.
|
43
|
-
We prefer your initial changes to be squashed into a single commit.
|
44
|
-
Later,
|
45
|
-
if we ask you to make changes,
|
46
|
-
add them as separate commits.
|
47
|
-
This makes them easier to review.
|
48
|
-
As a final step before merging we will either ask you to squash all commits yourself or we'll do it for you.
|
49
|
-
|
50
|
-
4. Submit a pull request
|
51
|
-
|
52
|
-
Push your local changes to your forked copy of the repository and [submit a pull request](https://help.github.com/articles/using-pull-requests).
|
53
|
-
In the pull request,
|
54
|
-
choose a title which sums up the changes that you have made,
|
55
|
-
and in the body provide more details about what your changes do.
|
56
|
-
Also mention the number of the issue where discussion has taken place,
|
57
|
-
eg "Closes #123".
|
58
|
-
|
59
|
-
5. Be patient
|
60
|
-
|
61
|
-
We might not be able to review your code as fast as we would like to,
|
62
|
-
but we'll do our best to dedicate it the attention it deserves.
|
63
|
-
Your effort is much appreciated!
|
64
|
-
|
65
21
|
### Workflow
|
66
22
|
|
67
23
|
All feature development and most bug fixes hit the master branch first.
|
@@ -85,10 +41,12 @@ $ spec/scripts/spec.sh ruby:2.6 rails-5.2
|
|
85
41
|
To release a new version:
|
86
42
|
|
87
43
|
1. Update `VERSION` in `lib/elastic_apm/version.rb` according to the changes (major, minor, patch).
|
88
|
-
|
89
|
-
|
90
|
-
|
44
|
+
1. Update `CHANGELOG.md` to reflect the new version – change _Unreleased_ section to _Version (release date)_.
|
45
|
+
1. For Majors: Add a new row to the EOL table in `docs/upgrading.asciidoc`. The EOL date is the release date plus 18 months.
|
46
|
+
1. Make a new commit with the changes above, with a message in the style of `vX.X.X`.
|
47
|
+
1. Run `rake release`. This will...
|
91
48
|
1. Tag the current commit as new version.
|
92
49
|
2. Push the tag to GitHub.
|
93
50
|
3. Build the gem and upload to Rubygems (local user needs to be signed in and authorized.)
|
94
|
-
|
51
|
+
1. Run `rake release:update_branch`. This will...
|
52
|
+
1. Update `3.x` branch to be at released commit and push it to GitHub.
|
data/Gemfile
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
|
1
18
|
# frozen_string_literal: true
|
2
19
|
|
3
20
|
source 'https://rubygems.org'
|
@@ -17,30 +34,29 @@ gem 'timecop'
|
|
17
34
|
gem 'webmock'
|
18
35
|
|
19
36
|
# Integrations
|
37
|
+
gem 'aws-sdk-dynamodb', require: nil
|
20
38
|
gem 'aws-sdk-sqs', require: nil
|
21
39
|
gem 'elasticsearch', require: nil
|
22
40
|
gem 'fakeredis', require: nil
|
23
41
|
gem 'faraday', require: nil
|
42
|
+
gem 'graphql', require: nil
|
43
|
+
gem 'google-protobuf', '< 3.12' if !defined?(JRUBY_VERSION) && RUBY_VERSION < '2.5'
|
44
|
+
gem 'grpc' if !defined?(JRUBY_VERSION)
|
24
45
|
gem 'json-schema', require: nil
|
25
46
|
gem 'mongo', require: nil
|
26
47
|
gem 'opentracing', require: nil
|
27
48
|
gem 'rake', require: nil
|
49
|
+
gem 'resque', require: nil
|
28
50
|
gem 'sequel', require: nil
|
29
51
|
gem 'shoryuken', require: nil
|
30
52
|
gem 'sidekiq', require: nil
|
31
|
-
gem 'sneakers', '~> 2.12', require: nil
|
32
53
|
gem 'simplecov', require: false
|
33
54
|
gem 'simplecov-cobertura', require: false
|
55
|
+
gem 'sneakers', '~> 2.12', require: nil
|
56
|
+
gem 'sucker_punch', '~> 2.0', require: nil
|
34
57
|
gem 'yard', require: nil
|
35
58
|
gem 'yarjuf'
|
36
59
|
|
37
|
-
if RUBY_PLATFORM == 'java'
|
38
|
-
gem 'activerecord-jdbcsqlite3-adapter'
|
39
|
-
gem 'jdbc-sqlite3'
|
40
|
-
else
|
41
|
-
gem 'sqlite3'
|
42
|
-
end
|
43
|
-
|
44
60
|
## Install Framework
|
45
61
|
GITHUB_REPOS = {
|
46
62
|
'grape' => 'ruby-grape/grape',
|
@@ -59,7 +75,7 @@ end
|
|
59
75
|
frameworks_versions.each do |framework, version|
|
60
76
|
case version
|
61
77
|
when 'master'
|
62
|
-
gem framework, github: GITHUB_REPOS.fetch
|
78
|
+
gem framework, github: GITHUB_REPOS.fetch(framework)
|
63
79
|
when /.+/
|
64
80
|
gem framework, "~> #{version}.0"
|
65
81
|
else
|
@@ -73,6 +89,15 @@ if frameworks_versions.key?('rails')
|
|
73
89
|
end
|
74
90
|
end
|
75
91
|
|
92
|
+
if RUBY_PLATFORM == 'java'
|
93
|
+
gem 'activerecord-jdbcsqlite3-adapter'
|
94
|
+
gem 'jdbc-sqlite3'
|
95
|
+
elsif frameworks_versions['rails'] =~ /^(4|5)/
|
96
|
+
gem 'sqlite3', '~> 1.3.6'
|
97
|
+
else
|
98
|
+
gem 'sqlite3' # rubocop:disable Bundler/DuplicatedGem
|
99
|
+
end
|
100
|
+
|
76
101
|
group :bench do
|
77
102
|
gem 'ruby-prof', require: nil, platforms: %i[ruby]
|
78
103
|
gem 'stackprof', require: nil, platforms: %i[ruby]
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# elastic-apm
|
2
|
+
|
2
3
|
## Elastic APM agent for Ruby
|
3
4
|
|
4
5
|
[![Jenkins](https://apm-ci.elastic.co/buildStatus/icon?job=apm-agent-ruby/apm-agent-ruby-mbp/master)](https://apm-ci.elastic.co/job/apm-agent-ruby/job/apm-agent-ruby-mbp/job/master/) [![Gem](https://img.shields.io/gem/v/elastic-apm.svg)](https://rubygems.org/gems/elastic-apm)
|
@@ -11,21 +12,69 @@ The official Rubygem for [Elastic][] [APM][].
|
|
11
12
|
|
12
13
|
## Documentation
|
13
14
|
|
14
|
-
[Full documentation at elastic.co](https://www.elastic.co/guide/en/apm/agent/ruby/
|
15
|
+
[Full documentation at elastic.co](https://www.elastic.co/guide/en/apm/agent/ruby/current/index.html).
|
15
16
|
|
16
17
|
<ul>
|
17
|
-
<li
|
18
|
-
<
|
19
|
-
<
|
20
|
-
<li
|
21
|
-
<
|
22
|
-
|
23
|
-
<
|
24
|
-
<
|
25
|
-
</
|
26
|
-
</
|
27
|
-
|
28
|
-
<li
|
18
|
+
<li>
|
19
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/set-up.html">Set up the Agent</a>
|
20
|
+
<ul>
|
21
|
+
<li>
|
22
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/getting-started-rails.html">Getting started with Rails</a>
|
23
|
+
</li>
|
24
|
+
<li>
|
25
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/getting-started-rack.html">Getting started with Rack</a>
|
26
|
+
</li>
|
27
|
+
</ul>
|
28
|
+
</li>
|
29
|
+
<li>
|
30
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/supported-technologies.html">Supported technologies</a>
|
31
|
+
</li>
|
32
|
+
<li>
|
33
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/configuration.html">Configuration</a>
|
34
|
+
</li>
|
35
|
+
<li>
|
36
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/advanced.html">Advanced Topics</a>
|
37
|
+
<ul>
|
38
|
+
<li>
|
39
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/context.html">Adding additional context</a>
|
40
|
+
</li>
|
41
|
+
<li>
|
42
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/custom-instrumentation.html">Custom instrumentation</a>
|
43
|
+
</li>
|
44
|
+
</ul>
|
45
|
+
</li>
|
46
|
+
<li>
|
47
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/api.html">API reference</a>
|
48
|
+
</li>
|
49
|
+
<li>
|
50
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/metrics.html">Metrics</a>
|
51
|
+
</li>
|
52
|
+
<li>
|
53
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/opentracing.html">OpenTracing API</a>
|
54
|
+
</li>
|
55
|
+
<li>
|
56
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/log-correlation.html">Log correlation</a>
|
57
|
+
</li>
|
58
|
+
<li>
|
59
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/debugging.html">Troubleshooting</a>
|
60
|
+
</li>
|
61
|
+
<li class="collapsible">
|
62
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/release-notes.html">Release notes</a>
|
63
|
+
<ul>
|
64
|
+
<li>
|
65
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/release-notes-3.x.html">Ruby Agent version 3.x</a>
|
66
|
+
</li>
|
67
|
+
<li>
|
68
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/release-notes-2.x.html">Ruby Agent version 2.x</a>
|
69
|
+
</li>
|
70
|
+
<li>
|
71
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/release-notes-1.x.html">Ruby Agent version 1.x</a>
|
72
|
+
</li>
|
73
|
+
<li>
|
74
|
+
<a href="https://www.elastic.co/guide/en/apm/agent/ruby/current/release-notes-0.x.html">Ruby Agent version 0.x</a>
|
75
|
+
</li>
|
76
|
+
</ul>
|
77
|
+
</li>
|
29
78
|
</ul>
|
30
79
|
|
31
80
|
---
|
data/Rakefile
CHANGED
@@ -1,12 +1,34 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
|
1
18
|
# frozen_string_literal: true
|
2
19
|
|
3
20
|
require 'bundler/gem_tasks'
|
4
21
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
22
|
+
desc """Post release action:
|
23
|
+
Update `3.x` branch to be at released commit and push it to GitHub.
|
24
|
+
"""
|
25
|
+
namespace :release do
|
26
|
+
task :update_branch do
|
27
|
+
`git checkout 3.x &&
|
28
|
+
git rebase master &&
|
29
|
+
git push origin 3.x &&
|
30
|
+
git checkout master`
|
31
|
+
end
|
10
32
|
end
|
11
33
|
|
12
34
|
require 'rspec/core/rake_task'
|
@@ -17,3 +39,13 @@ YARD::Rake::YardocTask.new
|
|
17
39
|
task docs: :yard
|
18
40
|
|
19
41
|
task default: :spec
|
42
|
+
|
43
|
+
namespace :coverage do
|
44
|
+
desc "Collates all result sets generated by the different test runners"
|
45
|
+
task :report do
|
46
|
+
require 'simplecov'
|
47
|
+
require 'simplecov-cobertura'
|
48
|
+
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
|
49
|
+
SimpleCov.collate Dir["coverage/matrix_results/**/.resultset.json"]
|
50
|
+
end
|
51
|
+
end
|
data/bin/run-tests
CHANGED
@@ -8,7 +8,10 @@ runRspec(){
|
|
8
8
|
if [ -n "${case}" ]; then
|
9
9
|
bn="$(basename ${case} _spec.rb)/"
|
10
10
|
fi
|
11
|
-
bundle exec rspec
|
11
|
+
bundle exec rspec \
|
12
|
+
-f progress \
|
13
|
+
-r yarjuf -f JUnit -o spec/junit-reports/${bn}ruby-agent-junit.xml \
|
14
|
+
${case}
|
12
15
|
}
|
13
16
|
specific_spec=$1
|
14
17
|
|