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.
- checksums.yaml +4 -4
- data/.ci/Jenkinsfile +286 -183
- 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 +12 -10
- data/.gitignore +3 -1
- data/.rspec +0 -1
- data/.rubocop.yml +13 -1
- data/CHANGELOG.asciidoc +92 -0
- data/CONTRIBUTING.md +6 -4
- data/Gemfile +35 -9
- data/Rakefile +37 -5
- data/bin/run-tests +4 -1
- data/docker-compose.yml +7 -0
- data/docs/api.asciidoc +14 -2
- data/docs/configuration.asciidoc +122 -27
- 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 +48 -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 +59 -3
- 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 +28 -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 +17 -0
- data/lib/elastic_apm/context/user.rb +17 -0
- data/lib/elastic_apm/context_builder.rb +18 -1
- 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 +22 -3
- data/lib/elastic_apm/metadata/system_info/container_info.rb +45 -4
- 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 +17 -0
- 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 +25 -2
- 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 +64 -23
- 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 +20 -2
- data/lib/elastic_apm/span/context.rb +17 -0
- data/lib/elastic_apm/span/context/db.rb +17 -0
- 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 +17 -0
- data/lib/elastic_apm/spies/http.rb +17 -0
- 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 +23 -2
- 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 +18 -1
- 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 +51 -11
- data/lib/elastic_apm/trace_context/traceparent.rb +17 -0
- data/lib/elastic_apm/trace_context/tracestate.rb +17 -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 -56
- 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 +20 -1
- 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 +21 -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 +26 -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
@@ -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
|
module ElasticAPM
|
@@ -77,7 +94,9 @@ module ElasticAPM
|
|
77
94
|
name: keyword_field(destination.name),
|
78
95
|
resource: keyword_field(destination.resource),
|
79
96
|
type: keyword_field(destination.type)
|
80
|
-
}
|
97
|
+
},
|
98
|
+
address: keyword_field(destination.address),
|
99
|
+
port: destination.port
|
81
100
|
}
|
82
101
|
end
|
83
102
|
end
|
@@ -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
|
module ElasticAPM
|
@@ -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
|
module ElasticAPM
|
@@ -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
|
module ElasticAPM
|
@@ -60,6 +77,10 @@ module ElasticAPM
|
|
60
77
|
private
|
61
78
|
|
62
79
|
def serialize_and_filter(resource)
|
80
|
+
if resource.respond_to?(:prepare_for_serialization!)
|
81
|
+
resource.prepare_for_serialization!
|
82
|
+
end
|
83
|
+
|
63
84
|
serialized = serializers.serialize(resource)
|
64
85
|
|
65
86
|
# if a filter returns nil, it means skip the event
|
data/lib/elastic_apm/util.rb
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
|
module ElasticAPM
|
@@ -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
|
module ElasticAPM
|
@@ -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
|
module ElasticAPM
|
@@ -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
|
module ElasticAPM
|
data/lib/elastic_apm/version.rb
CHANGED
@@ -1,5 +1,22 @@
|
|
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
|
module ElasticAPM
|
4
|
-
VERSION = '3.
|
21
|
+
VERSION = '3.10.0'
|
5
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic-apm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikkel Malmberg
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '3.0'
|
41
|
-
description:
|
41
|
+
description:
|
42
42
|
email:
|
43
43
|
- mikkel@elastic.co
|
44
44
|
executables: []
|
@@ -51,7 +51,14 @@ files:
|
|
51
51
|
- ".ci/.jenkins_master_framework.yml"
|
52
52
|
- ".ci/.jenkins_ruby.yml"
|
53
53
|
- ".ci/Jenkinsfile"
|
54
|
-
- ".ci/
|
54
|
+
- ".ci/docker/jruby/11-jdk/Dockerfile"
|
55
|
+
- ".ci/docker/jruby/12-jdk/Dockerfile"
|
56
|
+
- ".ci/docker/jruby/13-jdk/Dockerfile"
|
57
|
+
- ".ci/docker/jruby/7-jdk/Dockerfile"
|
58
|
+
- ".ci/docker/jruby/8-jdk/Dockerfile"
|
59
|
+
- ".ci/docker/jruby/README.md"
|
60
|
+
- ".ci/docker/jruby/run.sh"
|
61
|
+
- ".ci/docker/jruby/test.sh"
|
55
62
|
- ".ci/jobs/apm-agent-ruby-downstream.yml"
|
56
63
|
- ".ci/jobs/apm-agent-ruby-linting-mbp.yml"
|
57
64
|
- ".ci/jobs/apm-agent-ruby-mbp.yml"
|
@@ -59,7 +66,6 @@ files:
|
|
59
66
|
- ".ci/jobs/defaults.yml"
|
60
67
|
- ".ci/linting.groovy"
|
61
68
|
- ".ci/packer_cache.sh"
|
62
|
-
- ".ci/prepare-git-context.sh"
|
63
69
|
- ".github/ISSUE_TEMPLATE/Bug_report.md"
|
64
70
|
- ".github/ISSUE_TEMPLATE/Feature_request.md"
|
65
71
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
@@ -68,7 +74,6 @@ files:
|
|
68
74
|
- ".rspec"
|
69
75
|
- ".rubocop.yml"
|
70
76
|
- CHANGELOG.asciidoc
|
71
|
-
- CHANGELOG.md
|
72
77
|
- CODE_OF_CONDUCT.md
|
73
78
|
- CONTRIBUTING.md
|
74
79
|
- Dockerfile
|
@@ -90,7 +95,6 @@ files:
|
|
90
95
|
- bin/run-tests
|
91
96
|
- bin/setup
|
92
97
|
- bin/with_framework
|
93
|
-
- codecov.yml
|
94
98
|
- docker-compose.yml
|
95
99
|
- docs/advanced.asciidoc
|
96
100
|
- docs/api.asciidoc
|
@@ -100,14 +104,18 @@ files:
|
|
100
104
|
- docs/debugging.asciidoc
|
101
105
|
- docs/getting-started-rack.asciidoc
|
102
106
|
- docs/getting-started-rails.asciidoc
|
107
|
+
- docs/graphql.asciidoc
|
108
|
+
- docs/images/dynamic-config.svg
|
103
109
|
- docs/index.asciidoc
|
104
110
|
- docs/introduction.asciidoc
|
105
111
|
- docs/log-correlation.asciidoc
|
106
112
|
- docs/metrics.asciidoc
|
107
113
|
- docs/opentracing.asciidoc
|
114
|
+
- docs/performance-tuning.asciidoc
|
108
115
|
- docs/release-notes.asciidoc
|
109
116
|
- docs/set-up.asciidoc
|
110
117
|
- docs/supported-technologies.asciidoc
|
118
|
+
- docs/upgrading.asciidoc
|
111
119
|
- elastic-apm.gemspec
|
112
120
|
- lib/elastic-apm.rb
|
113
121
|
- lib/elastic_apm.rb
|
@@ -134,6 +142,8 @@ files:
|
|
134
142
|
- lib/elastic_apm/error/log.rb
|
135
143
|
- lib/elastic_apm/error_builder.rb
|
136
144
|
- lib/elastic_apm/grape.rb
|
145
|
+
- lib/elastic_apm/graphql.rb
|
146
|
+
- lib/elastic_apm/grpc.rb
|
137
147
|
- lib/elastic_apm/instrumenter.rb
|
138
148
|
- lib/elastic_apm/internal_error.rb
|
139
149
|
- lib/elastic_apm/logging.rb
|
@@ -164,6 +174,7 @@ files:
|
|
164
174
|
- lib/elastic_apm/opentracing.rb
|
165
175
|
- lib/elastic_apm/rails.rb
|
166
176
|
- lib/elastic_apm/railtie.rb
|
177
|
+
- lib/elastic_apm/resque.rb
|
167
178
|
- lib/elastic_apm/sinatra.rb
|
168
179
|
- lib/elastic_apm/span.rb
|
169
180
|
- lib/elastic_apm/span/context.rb
|
@@ -174,6 +185,7 @@ files:
|
|
174
185
|
- lib/elastic_apm/spies.rb
|
175
186
|
- lib/elastic_apm/spies/action_dispatch.rb
|
176
187
|
- lib/elastic_apm/spies/delayed_job.rb
|
188
|
+
- lib/elastic_apm/spies/dynamo_db.rb
|
177
189
|
- lib/elastic_apm/spies/elasticsearch.rb
|
178
190
|
- lib/elastic_apm/spies/faraday.rb
|
179
191
|
- lib/elastic_apm/spies/http.rb
|
@@ -182,11 +194,13 @@ files:
|
|
182
194
|
- lib/elastic_apm/spies/net_http.rb
|
183
195
|
- lib/elastic_apm/spies/rake.rb
|
184
196
|
- lib/elastic_apm/spies/redis.rb
|
197
|
+
- lib/elastic_apm/spies/resque.rb
|
185
198
|
- lib/elastic_apm/spies/sequel.rb
|
186
199
|
- lib/elastic_apm/spies/shoryuken.rb
|
187
200
|
- lib/elastic_apm/spies/sidekiq.rb
|
188
201
|
- lib/elastic_apm/spies/sinatra.rb
|
189
202
|
- lib/elastic_apm/spies/sneakers.rb
|
203
|
+
- lib/elastic_apm/spies/sucker_punch.rb
|
190
204
|
- lib/elastic_apm/spies/tilt.rb
|
191
205
|
- lib/elastic_apm/sql.rb
|
192
206
|
- lib/elastic_apm/sql/signature.rb
|
@@ -206,6 +220,7 @@ files:
|
|
206
220
|
- lib/elastic_apm/transport/connection/http.rb
|
207
221
|
- lib/elastic_apm/transport/connection/proxy_pipe.rb
|
208
222
|
- lib/elastic_apm/transport/filters.rb
|
223
|
+
- lib/elastic_apm/transport/filters/hash_sanitizer.rb
|
209
224
|
- lib/elastic_apm/transport/filters/secrets_filter.rb
|
210
225
|
- lib/elastic_apm/transport/headers.rb
|
211
226
|
- lib/elastic_apm/transport/serializers.rb
|
@@ -222,13 +237,12 @@ files:
|
|
222
237
|
- lib/elastic_apm/util/lru_cache.rb
|
223
238
|
- lib/elastic_apm/util/throttle.rb
|
224
239
|
- lib/elastic_apm/version.rb
|
225
|
-
- vendor/.gitkeep
|
226
240
|
homepage: https://github.com/elastic/apm-agent-ruby
|
227
241
|
licenses:
|
228
242
|
- Apache-2.0
|
229
243
|
metadata:
|
230
244
|
source_code_uri: https://github.com/elastic/apm-agent-ruby
|
231
|
-
post_install_message:
|
245
|
+
post_install_message:
|
232
246
|
rdoc_options: []
|
233
247
|
require_paths:
|
234
248
|
- lib
|
@@ -243,8 +257,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
257
|
- !ruby/object:Gem::Version
|
244
258
|
version: '0'
|
245
259
|
requirements: []
|
246
|
-
rubygems_version: 3.
|
247
|
-
signing_key:
|
260
|
+
rubygems_version: 3.1.2
|
261
|
+
signing_key:
|
248
262
|
specification_version: 4
|
249
263
|
summary: The official Elastic APM agent for Ruby
|
250
264
|
test_files: []
|
data/.ci/downstreamTests.groovy
DELETED
@@ -1,185 +0,0 @@
|
|
1
|
-
#!/usr/bin/env groovy
|
2
|
-
@Library('apm@current') _
|
3
|
-
|
4
|
-
import co.elastic.matrix.*
|
5
|
-
import groovy.transform.Field
|
6
|
-
|
7
|
-
/**
|
8
|
-
This is the parallel tasks generator,
|
9
|
-
it is need as field to store the results of the tests.
|
10
|
-
*/
|
11
|
-
@Field def rubyTasksGen
|
12
|
-
|
13
|
-
pipeline {
|
14
|
-
agent { label 'linux && immutable' }
|
15
|
-
environment {
|
16
|
-
REPO="git@github.com:elastic/apm-agent-ruby.git"
|
17
|
-
BASE_DIR="src/github.com/elastic/apm-agent-ruby"
|
18
|
-
PIPELINE_LOG_LEVEL='INFO'
|
19
|
-
NOTIFY_TO = credentials('notify-to')
|
20
|
-
JOB_GCS_BUCKET = credentials('gcs-bucket')
|
21
|
-
JOB_GIT_CREDENTIALS = "f6c7695a-671e-4f4f-a331-acdce44ff9ba"
|
22
|
-
DOCKER_REGISTRY = 'docker.elastic.co'
|
23
|
-
DOCKER_SECRET = 'secret/apm-team/ci/docker-registry/prod'
|
24
|
-
CODECOV_SECRET = 'secret/apm-team/ci/apm-agent-ruby-codecov'
|
25
|
-
}
|
26
|
-
options {
|
27
|
-
timeout(time: 2, unit: 'HOURS')
|
28
|
-
buildDiscarder(logRotator(numToKeepStr: '300', artifactNumToKeepStr: '20', daysToKeepStr: '30'))
|
29
|
-
timestamps()
|
30
|
-
ansiColor('xterm')
|
31
|
-
disableResume()
|
32
|
-
durabilityHint('PERFORMANCE_OPTIMIZED')
|
33
|
-
rateLimitBuilds(throttle: [count: 60, durationName: 'hour', userBoost: true])
|
34
|
-
quietPeriod(10)
|
35
|
-
}
|
36
|
-
parameters {
|
37
|
-
string(name: 'RUBY_VERSION', defaultValue: "ruby:2.6", description: "Ruby version to test")
|
38
|
-
string(name: 'BRANCH_SPECIFIER', defaultValue: "master", description: "Git branch/tag to use")
|
39
|
-
}
|
40
|
-
stages {
|
41
|
-
/**
|
42
|
-
Checkout the code and stash it, to use it on other stages.
|
43
|
-
*/
|
44
|
-
stage('Checkout') {
|
45
|
-
options { skipDefaultCheckout() }
|
46
|
-
steps {
|
47
|
-
deleteDir()
|
48
|
-
gitCheckout(basedir: "${BASE_DIR}",
|
49
|
-
branch: "${params.BRANCH_SPECIFIER}",
|
50
|
-
repo: "${REPO}",
|
51
|
-
credentialsId: "${JOB_GIT_CREDENTIALS}")
|
52
|
-
stash allowEmpty: true, name: 'source', useDefaultExcludes: false
|
53
|
-
}
|
54
|
-
}
|
55
|
-
stage('Test') {
|
56
|
-
options { skipDefaultCheckout() }
|
57
|
-
steps {
|
58
|
-
runTests('.ci/.jenkins_framework.yml')
|
59
|
-
}
|
60
|
-
}
|
61
|
-
stage('Master Test') {
|
62
|
-
options { skipDefaultCheckout() }
|
63
|
-
steps {
|
64
|
-
catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE', message: "The tests for the master framework have failed. Let's warn instead.") {
|
65
|
-
runTests('.ci/.jenkins_master_framework.yml')
|
66
|
-
}
|
67
|
-
}
|
68
|
-
}
|
69
|
-
}
|
70
|
-
post {
|
71
|
-
cleanup {
|
72
|
-
script{
|
73
|
-
if(rubyTasksGen?.results){
|
74
|
-
writeJSON(file: 'results.json', json: toJSON(rubyTasksGen.results), pretty: 2)
|
75
|
-
def mapResults = ["Ruby": rubyTasksGen.results]
|
76
|
-
def processor = new ResultsProcessor()
|
77
|
-
processor.processResults(mapResults)
|
78
|
-
archiveArtifacts allowEmptyArchive: true, artifacts: 'results.json,results.html', defaultExcludes: false
|
79
|
-
catchError(buildResult: 'SUCCESS') {
|
80
|
-
def datafile = readFile(file: "results.json")
|
81
|
-
def json = getVaultSecret(secret: 'secret/apm-team/ci/jenkins-stats-cloud')
|
82
|
-
sendDataToElasticsearch(es: json.data.url, data: datafile, restCall: '/jenkins-builds-ruby-test-results/_doc/')
|
83
|
-
}
|
84
|
-
}
|
85
|
-
}
|
86
|
-
notifyBuildResult()
|
87
|
-
}
|
88
|
-
}
|
89
|
-
}
|
90
|
-
|
91
|
-
/**
|
92
|
-
Parallel task generator for the integration tests.
|
93
|
-
*/
|
94
|
-
class RubyParallelTaskGenerator extends DefaultParallelTaskGenerator {
|
95
|
-
|
96
|
-
public RubyParallelTaskGenerator(Map params){
|
97
|
-
super(params)
|
98
|
-
}
|
99
|
-
|
100
|
-
/**
|
101
|
-
build a clousure that launch and agent and execute the corresponding test script,
|
102
|
-
then store the results.
|
103
|
-
*/
|
104
|
-
public Closure generateStep(x, y){
|
105
|
-
return {
|
106
|
-
steps.sleep steps.randomNumber(min:10, max: 30)
|
107
|
-
steps.node('linux && immutable'){
|
108
|
-
// Label is transformed to avoid using the internal docker registry in the x coordinate
|
109
|
-
// TODO: def label = "${tag}:${x?.drop(x?.lastIndexOf('/')+1)}#${y}"
|
110
|
-
def label = "${tag}:${x}#${y}"
|
111
|
-
try {
|
112
|
-
steps.runScript(label: label, ruby: x, framework: y)
|
113
|
-
saveResult(x, y, 1)
|
114
|
-
} catch(e){
|
115
|
-
saveResult(x, y, 0)
|
116
|
-
steps.error("${label} tests failed : ${e.toString()}\n")
|
117
|
-
} finally {
|
118
|
-
steps.junit(allowEmptyResults: true,
|
119
|
-
keepLongStdio: true,
|
120
|
-
testResults: "**/spec/junit-reports/**/ruby-agent-junit.xml")
|
121
|
-
if (steps.isCodecovEnabled(x, y)) {
|
122
|
-
steps.codecov(repo: "${steps.env.REPO}", basedir: "${steps.env.BASE_DIR}",
|
123
|
-
secret: "${steps.env.CODECOV_SECRET}")
|
124
|
-
}
|
125
|
-
}
|
126
|
-
}
|
127
|
-
}
|
128
|
-
}
|
129
|
-
}
|
130
|
-
|
131
|
-
/**
|
132
|
-
Run tests for a Ruby version and framework version.
|
133
|
-
*/
|
134
|
-
def runScript(Map params = [:]){
|
135
|
-
def label = params.label
|
136
|
-
def ruby = params.ruby
|
137
|
-
def framework = params.framework
|
138
|
-
log(level: 'INFO', text: "${label}")
|
139
|
-
env.HOME = "${env.WORKSPACE}"
|
140
|
-
env.PATH = "${env.PATH}:${env.WORKSPACE}/bin"
|
141
|
-
deleteDir()
|
142
|
-
unstash 'source'
|
143
|
-
dir("${BASE_DIR}"){
|
144
|
-
retry(2){
|
145
|
-
sleep randomNumber(min:10, max: 30)
|
146
|
-
dockerLogin(secret: "${DOCKER_SECRET}", registry: "${DOCKER_REGISTRY}")
|
147
|
-
sh("./spec/scripts/spec.sh ${ruby} ${framework}")
|
148
|
-
}
|
149
|
-
}
|
150
|
-
}
|
151
|
-
|
152
|
-
/**
|
153
|
-
* Whether the given ruby version and framework are in charge of sending the
|
154
|
-
* codecov results. It does require the workspace.
|
155
|
-
*/
|
156
|
-
def isCodecovEnabled(ruby, framework){
|
157
|
-
dir(BASE_DIR){
|
158
|
-
def codecovVersions = readYaml(file: '.ci/.jenkins_codecov.yml')
|
159
|
-
return codecovVersions['ENABLED'].any { it.trim() == "${ruby?.trim()}#${framework?.trim()}" }
|
160
|
-
}
|
161
|
-
}
|
162
|
-
|
163
|
-
/**
|
164
|
-
Run all the tests for the given ruby version and file with the frameworks to test
|
165
|
-
*/
|
166
|
-
def runTests(frameworkFile) {
|
167
|
-
deleteDir()
|
168
|
-
unstash "source"
|
169
|
-
dir("${BASE_DIR}"){
|
170
|
-
script {
|
171
|
-
rubyTasksGen = new RubyParallelTaskGenerator(
|
172
|
-
xVersions: [ "${params.RUBY_VERSION}" ],
|
173
|
-
xKey: 'RUBY_VERSION',
|
174
|
-
yKey: 'FRAMEWORK',
|
175
|
-
yFile: frameworkFile,
|
176
|
-
exclusionFile: '.ci/.jenkins_exclude.yml',
|
177
|
-
tag: 'Ruby',
|
178
|
-
name: 'Ruby',
|
179
|
-
steps: this
|
180
|
-
)
|
181
|
-
def mapPatallelTasks = rubyTasksGen.generateParallelTests()
|
182
|
-
parallel(mapPatallelTasks)
|
183
|
-
}
|
184
|
-
}
|
185
|
-
}
|