elastic-apm 3.8.0 → 3.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32d176ac5c22246df60ecc92f1baad37011a872af4e64f842b5a43c699a6ced3
4
- data.tar.gz: bf0505e728d8f1bd0bb941574a844a8990d14e13a94a7c9f2a6c2d0f9eb5d35b
3
+ metadata.gz: cb0d3e0244586e4fe0b9c89beacd267272c0d6b8467457fcce9fde228b22742e
4
+ data.tar.gz: e3279992b31d2826b6e53c8c66802c1641d30a8b8134671298280b370fa2f8e1
5
5
  SHA512:
6
- metadata.gz: d57b6bdbc7e78bea95e197d33f3eef4db7a35b23f9e450c636c3c1e3a5dd75ee8ee195709944ac51d6af7a3ab2451fd19d6139f0dedf9e86a4827732d5097f2a
7
- data.tar.gz: 924b9bbf782a0fa4e376137e9a44d10cc01be71455ca7614ab1374c70f0926d174eb1078b985cd60c1693e2e0ec1cdd8446502bd40007359262dcc31241250aa
6
+ metadata.gz: a81c23c3e427e727484854c89072c17704c11fbccca518169ae75a7aa8a45bc04966226044cebcd9c1d36fe7c986053e74e1c1b0456cc6cb23bcd0207204ef9d
7
+ data.tar.gz: de7d4efea50ee03db830ac3570cadc40277fd67ce630c4388f942cfbca005a8b0af72f81b0712eb38972aa7d38c01971fe4697888a75f55ffeba51b98fc51b6b
@@ -35,6 +35,20 @@ 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
+
38
52
  [[release-notes-3.8.0]]
39
53
  ==== 3.8.0 (2020-06-18)
40
54
 
data/Gemfile CHANGED
@@ -34,6 +34,7 @@ gem 'timecop'
34
34
  gem 'webmock'
35
35
 
36
36
  # Integrations
37
+ gem 'aws-sdk-dynamodb', require: nil
37
38
  gem 'aws-sdk-sqs', require: nil
38
39
  gem 'elasticsearch', require: nil
39
40
  gem 'fakeredis', require: nil
@@ -28,3 +28,17 @@ Things to consider:
28
28
  - Experiencing high load? The agent can spawn multiple instances of its Workers that pick off the queue by changing the option `pool_size` (default is `1`).
29
29
  - If you have high load you may also consider setting `transaction_sample_rate` to something smaller than `1.0`. This determines whether to include _spans_ for every _transaction_. If you have enough traffic, skipping some (probably) identical spans won't have a noticeable effect on your data.
30
30
 
31
+ [float]
32
+ [[disable-agent]]
33
+ === Disable the Agent
34
+
35
+ In the unlikely event the agent causes disruptions to a production application,
36
+ you can disable the agent while you troubleshoot.
37
+
38
+ If you have access to <<dynamic-configuration,dynamic configuration>>,
39
+ you can disable the recording of events by setting <<config-recording,`recording`>> to `false`.
40
+ When changed at runtime from a supported source, there's no need to restart your application.
41
+
42
+ If that doesn't work, or you don't have access to dynamic configuration, you can disable the agent by setting
43
+ <<config-enabled,`enabled`>> to `false`.
44
+ You'll need to restart your application for the changes to apply.
@@ -60,6 +60,7 @@ See <<getting-started-grape>>.
60
60
  We automatically instrument database actions using:
61
61
 
62
62
  - ActiveRecord (v4.2+)
63
+ - DynamoDB (v1.0+)
63
64
  - Elasticsearch (v0.9+)
64
65
  - Mongo (v2.1+)
65
66
  - Redis (v3.1+)
@@ -151,4 +152,4 @@ To instrument a server, add the `ElasticAPM::GRPC::ServerInterceptor`.
151
152
  [source,ruby]
152
153
  ----
153
154
  GRPC::RpcServer.new(interceptors: [ElasticAPM::GRPC::ServerInterceptor.new])
154
- ----
155
+ ----
@@ -131,6 +131,7 @@ module ElasticAPM
131
131
  %w[
132
132
  action_dispatch
133
133
  delayed_job
134
+ dynamo_db
134
135
  elasticsearch
135
136
  faraday
136
137
  http
@@ -317,7 +318,7 @@ module ElasticAPM
317
318
  self.logger ||= ::Rails.logger
318
319
 
319
320
  self.__root_path = ::Rails.root.to_s
320
- self.__view_paths = app.config.paths['app/views'].existent
321
+ self.__view_paths = ::ActionController::Base.view_paths.map(&:to_s)
321
322
  end
322
323
 
323
324
  def rails_app_name(app)
@@ -0,0 +1,58 @@
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
+
18
+ # frozen_string_literal: true
19
+
20
+ module ElasticAPM
21
+ # @api private
22
+ module Spies
23
+ # @api private
24
+ class DynamoDBSpy
25
+ def self.without_net_http
26
+ return yield unless defined?(NetHTTPSpy)
27
+
28
+ ElasticAPM::Spies::NetHTTPSpy.disable_in do
29
+ yield
30
+ end
31
+ end
32
+
33
+ def install
34
+ ::Aws::DynamoDB::Client.class_eval do
35
+ # Alias all available operations
36
+ api.operation_names.each do |operation_name|
37
+ alias :"#{operation_name}_without_apm" :"#{operation_name}"
38
+
39
+ define_method(operation_name) do |params = {}, options = {}|
40
+ ElasticAPM.with_span(operation_name, 'db', subtype: 'dynamodb', action: operation_name) do
41
+ ElasticAPM::Spies::DynamoDBSpy.without_net_http do
42
+ original_method = method("#{operation_name}_without_apm")
43
+ original_method.call(params, options)
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+
52
+ register(
53
+ 'Aws::DynamoDB::Client',
54
+ 'aws-sdk-dynamodb',
55
+ DynamoDBSpy.new
56
+ )
57
+ end
58
+ end
@@ -35,6 +35,10 @@ module ElasticAPM
35
35
  alias perform_request_without_apm perform_request
36
36
 
37
37
  def perform_request(method, path, *args, &block)
38
+ unless ElasticAPM.current_transaction
39
+ return perform_request_without_apm(method, path, *args, &block)
40
+ end
41
+
38
42
  name = format(NAME_FORMAT, method, path)
39
43
  statement = []
40
44
 
@@ -18,5 +18,5 @@
18
18
  # frozen_string_literal: true
19
19
 
20
20
  module ElasticAPM
21
- VERSION = '3.8.0'
21
+ VERSION = '3.9.0'
22
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.8.0
4
+ version: 3.9.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-06-18 00:00:00.000000000 Z
11
+ date: 2020-08-04 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: []
@@ -185,6 +185,7 @@ files:
185
185
  - lib/elastic_apm/spies.rb
186
186
  - lib/elastic_apm/spies/action_dispatch.rb
187
187
  - lib/elastic_apm/spies/delayed_job.rb
188
+ - lib/elastic_apm/spies/dynamo_db.rb
188
189
  - lib/elastic_apm/spies/elasticsearch.rb
189
190
  - lib/elastic_apm/spies/faraday.rb
190
191
  - lib/elastic_apm/spies/http.rb
@@ -241,7 +242,7 @@ licenses:
241
242
  - Apache-2.0
242
243
  metadata:
243
244
  source_code_uri: https://github.com/elastic/apm-agent-ruby
244
- post_install_message:
245
+ post_install_message:
245
246
  rdoc_options: []
246
247
  require_paths:
247
248
  - lib
@@ -256,8 +257,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
257
  - !ruby/object:Gem::Version
257
258
  version: '0'
258
259
  requirements: []
259
- rubygems_version: 3.0.3
260
- signing_key:
260
+ rubygems_version: 3.1.2
261
+ signing_key:
261
262
  specification_version: 4
262
263
  summary: The official Elastic APM agent for Ruby
263
264
  test_files: []