instana 1.200.0.pre1 → 1.200.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: 97f4147730556687389966d4b2403b5f12087b2479926bb671683ff6056b2f10
4
- data.tar.gz: 64259bb574f226a81834402180083c4f04303a4d7db1cb6573645357dbb7b3aa
3
+ metadata.gz: 300da2a4ba4b62f11b6028d9c1482c896be48bf8e17d78f3053e0e54c9bbfa0d
4
+ data.tar.gz: 2956c4c1f541ed290aad66c937ef3700a8e5809062cb29c4badb24754fbcf2f1
5
5
  SHA512:
6
- metadata.gz: 74fdc725df175bf8dce646c438851298515f1a73caa57b7de679295c8f05eb2abef81629b183ef231358c919646ca7d85fc63d5103e91a74916e4b1fb0ab5493
7
- data.tar.gz: 9010fe9c2cdd2108bc2a7540bd1704981aaa81370c02847c83af8b177a4303a8ac23c1a990cab8fff141c32bc5a7621fda0c397e19338c4f50e166eece316dc6
6
+ metadata.gz: 8ac726cfb46337984d4a57e372b6a64dd39b8cbcfdd8b4c34bd03ab6a01013293526d52842709dee38b7dd657c27c8bf0634cc065bcc523b740bfa8377b601f5
7
+ data.tar.gz: 97c0442d0ce046cddef5b782d365b64d8b5b28501967541585b8859f45fe5266f95ac35a9a1ddd137c30818948515ae1f163cb565a5b6807273f01faccf26447
data/.rubocop.yml CHANGED
@@ -2,11 +2,14 @@ inherit_from: .rubocop_todo.yml
2
2
 
3
3
  require:
4
4
  - ./extras/license_header.rb
5
-
5
+
6
6
  # Remove when we remove .rubocop_todo.yml
7
7
  AllCops:
8
8
  NewCops: disable
9
9
 
10
+ Metrics/PerceivedComplexity:
11
+ Max: 20
12
+
10
13
  # Broken on 1.9
11
14
  Style/HashSyntax:
12
15
  Enabled: false
@@ -19,7 +22,13 @@ Style/NilComparison:
19
22
 
20
23
  Style/SoleNestedConditional:
21
24
  Enabled: false
22
-
25
+
23
26
  # Ruby 2.1 compatibility
24
27
  Style/SafeNavigation:
25
28
  Enabled: false
29
+
30
+ Style/SymbolProc:
31
+ Enabled: false
32
+
33
+ Style/MultilineBlockChain:
34
+ Enabled: false
@@ -5,7 +5,7 @@ module Instana
5
5
  module Activators
6
6
  class AwsDynamoDB < Activator
7
7
  def can_instrument?
8
- defined?(Aws::DynamoDB::Client)
8
+ defined?(::Aws::DynamoDB::Client) && ::Aws::DynamoDB::Client.respond_to?(:add_plugin)
9
9
  end
10
10
 
11
11
  def instrument
@@ -5,7 +5,7 @@ module Instana
5
5
  module Activators
6
6
  class AwsS3 < Activator
7
7
  def can_instrument?
8
- defined?(Aws::S3::Client)
8
+ defined?(::Aws::S3::Client) && ::Aws::S3::Client.respond_to?(:add_plugin)
9
9
  end
10
10
 
11
11
  def instrument
@@ -5,7 +5,7 @@ module Instana
5
5
  module Activators
6
6
  class AwsSdkSns < Activator
7
7
  def can_instrument?
8
- defined?(Aws::SNS::Client)
8
+ defined?(::Aws::SNS::Client) && ::Aws::SNS::Client.respond_to?(:add_plugin)
9
9
  end
10
10
 
11
11
  def instrument
@@ -5,7 +5,7 @@ module Instana
5
5
  module Activators
6
6
  class AwsSdkSqs < Activator
7
7
  def can_instrument?
8
- defined?(Aws::SQS::Client)
8
+ defined?(::Aws::SQS::Client) && ::Aws::SQS::Client.respond_to?(:add_plugin)
9
9
  end
10
10
 
11
11
  def instrument
@@ -5,7 +5,7 @@ module Instana
5
5
  module Activators
6
6
  class Redis < Activator
7
7
  def can_instrument?
8
- defined?(::Redis) && ::Instana.config[:redis][:enabled]
8
+ defined?(::Redis) && defined?(::Redis::Client) && ::Instana.config[:redis][:enabled]
9
9
  end
10
10
 
11
11
  def instrument
@@ -5,7 +5,7 @@ module Instana
5
5
  module Activators
6
6
  class SidekiqClient < Activator
7
7
  def can_instrument?
8
- defined?(::Sidekiq) && ::Instana.config[:'sidekiq-client'][:enabled]
8
+ defined?(::Sidekiq) && ::Sidekiq.respond_to?(:configure_client) && ::Instana.config[:'sidekiq-client'][:enabled]
9
9
  end
10
10
 
11
11
  def instrument
@@ -5,7 +5,7 @@ module Instana
5
5
  module Activators
6
6
  class SidekiqWorker < Activator
7
7
  def can_instrument?
8
- defined?(::Sidekiq) && ::Instana.config[:'sidekiq-worker'][:enabled]
8
+ defined?(::Sidekiq) && ::Sidekiq.respond_to?(:configure_server) && ::Instana.config[:'sidekiq-worker'][:enabled]
9
9
  end
10
10
 
11
11
  def instrument
@@ -49,7 +49,7 @@ module Instana
49
49
  {
50
50
  e: discovery_value['pid'],
51
51
  h: discovery_value['agentUuid']
52
- }.compact
52
+ }.reject { |_, v| v.nil? }
53
53
  end
54
54
 
55
55
  # @return [Array] extra headers to include in the trace
@@ -98,7 +98,7 @@ module Instana
98
98
  @logger.error(e.message)
99
99
  nil
100
100
  end
101
- end.compact
101
+ end.reject { |_, v| v.nil? }
102
102
  end
103
103
 
104
104
  def host_name
@@ -37,7 +37,7 @@ module Instana
37
37
  _, name = parameters.pop
38
38
  "{#{name}}"
39
39
  end
40
- end.compact
40
+ end.reject { |v| v.nil? }
41
41
  end
42
42
  end
43
43
  end
@@ -10,7 +10,7 @@ module Instana
10
10
  op: format_operation(context.operation_name),
11
11
  bucket: bucket_name_from(context),
12
12
  key: key_from_context(context)
13
- }.compact
13
+ }.reject { |_, v| v.nil? }
14
14
 
15
15
  ::Instana.tracer.trace(:s3, {s3: s3_tags}) { @handler.call(context) }
16
16
  end
@@ -11,7 +11,7 @@ module Instana
11
11
  target: context.params[:target_arn],
12
12
  phone: context.params[:phone_number],
13
13
  subject: context.params[:subject]
14
- }.compact
14
+ }.reject { |_, v| v.nil? }
15
15
 
16
16
  if context.operation_name == :publish
17
17
  ::Instana.tracer.trace(:sns, {sns: sns_tags}) { @handler.call(context) }
@@ -13,7 +13,7 @@ module Instana
13
13
  return @handler.call(context)
14
14
  end
15
15
 
16
- span_tags = tags_for(context.operation_name, context.params).compact
16
+ span_tags = tags_for(context.operation_name, context.params).reject { |_, v| v.nil? }
17
17
 
18
18
  ::Instana.tracer.trace(:sqs, {sqs: span_tags}) do |span|
19
19
  case context.operation_name
@@ -74,7 +74,7 @@ module Instana
74
74
  host: host_with_port,
75
75
  header: extra_header_tags,
76
76
  params: request_params
77
- }.compact
77
+ }.reject { |_, v| v.nil? }
78
78
  end
79
79
 
80
80
  def correlation_data
@@ -123,7 +123,7 @@ module Instana
123
123
  external_trace_id: external_trace_id,
124
124
  external_state: @env['HTTP_TRACESTATE'],
125
125
  from_w3: false
126
- }.compact
126
+ }.reject { |_, v| v.nil? }
127
127
  end
128
128
 
129
129
  def context_from_trace_parent
@@ -150,7 +150,7 @@ module Instana
150
150
  trace_id: state[:t],
151
151
  span_id: state[:p],
152
152
  from_w3: false
153
- }.compact
153
+ }.reject { |_, v| v.nil? }
154
154
  end
155
155
 
156
156
  def parse_trace_state
@@ -179,7 +179,7 @@ module Instana
179
179
  {
180
180
  type: data['correlationType'],
181
181
  id: data['correlationId']
182
- }.compact
182
+ }.reject { |_, v| v.nil? }
183
183
  end
184
184
  end
185
185
  end
@@ -15,7 +15,7 @@ module Instana
15
15
  kvs = {
16
16
  http: req.request_tags,
17
17
  service: ENV['INSTANA_SERVICE_NAME']
18
- }.compact
18
+ }.reject { |_, v| v.nil? }
19
19
 
20
20
  current_span = ::Instana.tracer.log_start_or_continue(:rack, {}, req.incoming_context)
21
21
 
@@ -29,7 +29,7 @@ module Instana
29
29
  trace_id: trace_id,
30
30
  span_id: span_id,
31
31
  level: level
32
- }.compact
32
+ }.reject { |_, v| v.nil? }
33
33
  end
34
34
 
35
35
  def try(attributes, *args)
@@ -56,7 +56,7 @@ module Instana
56
56
  blkio: blkio_stats(metrics),
57
57
  cpu: cpu_stats(metrics),
58
58
  network: network_stats(metrics)
59
- }.compact
59
+ }.reject { |_, v| v.nil? }
60
60
  end
61
61
 
62
62
  def memory_stats(metrics)
@@ -31,7 +31,7 @@ module Instana
31
31
  pullStoppedAt: task_metadata['PullStoppedAt'],
32
32
  instanaZone: instana_zone,
33
33
  tags: instana_tags
34
- }.compact
34
+ }.reject { |_, v| v.nil? }
35
35
  end
36
36
 
37
37
  def snapshot
@@ -27,7 +27,7 @@ module Instana
27
27
  port: ENV['PORT'],
28
28
  numericProjectId: lookup('/computeMetadata/v1/project/numeric-project-id'),
29
29
  projectId: lookup('/computeMetadata/v1/project/project-id')
30
- }.compact
30
+ }.reject { |_, v| v.nil? }
31
31
  end
32
32
 
33
33
  def snapshot
@@ -47,7 +47,7 @@ module Instana
47
47
  state.unshift("in=#{trace_id_header};#{span_id_header}")
48
48
  end
49
49
 
50
- state.compact.join(',')
50
+ state.reject { |v| v.nil? }.join(',')
51
51
  end
52
52
 
53
53
  def to_hash
@@ -2,6 +2,6 @@
2
2
  # (c) Copyright Instana Inc. 2016
3
3
 
4
4
  module Instana
5
- VERSION = "1.200.0.pre1"
5
+ VERSION = "1.200.0"
6
6
  VERSION_FULL = "instana-#{VERSION}"
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instana
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.200.0.pre1
4
+ version: 1.200.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Giacomo Lombardo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-07 00:00:00.000000000 Z
11
+ date: 2021-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -357,9 +357,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
357
357
  version: '2.1'
358
358
  required_rubygems_version: !ruby/object:Gem::Requirement
359
359
  requirements:
360
- - - ">"
360
+ - - ">="
361
361
  - !ruby/object:Gem::Version
362
- version: 1.3.1
362
+ version: '0'
363
363
  requirements: []
364
364
  rubygems_version: 3.1.6
365
365
  signing_key: