datadog-lambda 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c19e8514981117ae88bdaa4d17f7a3a5db19595d39336100ac581e0cf330be1d
4
- data.tar.gz: 5d2c0ef21fb1fb0d33759f0b3430daebe88100e4f626b20f6dd9512739c6b62c
3
+ metadata.gz: a8e991dcdf4df850e5a9a56fe9f402f94fd1a1c4d9e5558cf9d1eff868331472
4
+ data.tar.gz: 7e5d7ea704e3ee327496b9568e10ec620e77e48ad56eddf4059b59b16b7fcbd3
5
5
  SHA512:
6
- metadata.gz: 6cab42dc833290ea7742def1dda6e4bb4a89ebb7f90240e053cdbcd8f8a338fbaaa98069dc48fdc6d823fb087a90c946c097bd012014e31b84629995f296fe0a
7
- data.tar.gz: 4092f19c6b544307e2a82492fd13ce2241d2e0820df2b81da53a6adbd4ec3da0aa9b6d04a56c528b822f93df36e8122985d1a5c0584773d867c3f787feb46eba
6
+ metadata.gz: '081dccfc9c8e566e63d9a29f8cc28d8db0f66f8b5bdd0137bcadf618e277be28408225c5d874400db1cd20173e5623f95619c82bea703ea7c9f2adb6cef2f0a5'
7
+ data.tar.gz: 60ea065a6e8237182ff24872904c7ebb97262604763cbeea8977f7648e375f6304aab816bc1f2ad25ea7d298ee5dcfd280e5abfef8af09e6c1634c1055e12609
@@ -14,6 +14,7 @@ require 'datadog/lambda/utils/logger'
14
14
  require 'datadog/lambda/trace/patch_http'
15
15
  require 'json'
16
16
  require 'time'
17
+ require 'datadog/lambda/version'
17
18
 
18
19
  module Datadog
19
20
  # Instruments AWS Lambda functions with Datadog distributed tracing and
@@ -112,8 +113,14 @@ module Datadog
112
113
  memorysize: context.memory_limit_in_mb,
113
114
  cold_start: @is_cold_start,
114
115
  runtime: "Ruby #{RUBY_VERSION}",
115
- resource: context.function_name
116
+ resource: context.function_name,
117
+ datadog_lambda: Datadog::Lambda::VERSION::STRING.to_sym
116
118
  }
119
+ begin
120
+ tags[:dd_trace] = Gem.loaded_specs['ddtrace'].version
121
+ rescue StandardError
122
+ Datadog::Utils.logger.debug 'dd-trace unavailable'
123
+ end
117
124
  # If we have an alias...
118
125
  unless function_alias.nil?
119
126
  # If the alis version is $Latest, drop the $ for ddog tag convention.
@@ -30,7 +30,6 @@ module Datadog
30
30
  # NetExtensions contains patches which add tracing context to http calls
31
31
  module NetExtensions
32
32
  def request(req, body = nil, &block)
33
- logger = Datadog::Utils.logger
34
33
  begin
35
34
  context = Datadog::Trace.current_trace_context(
36
35
  Datadog::Trace.trace_context
@@ -39,7 +38,7 @@ module Datadog
39
38
  req = add_ctx_to_req(req, context)
40
39
  rescue StandardError => e
41
40
  trace = e.backtrace.join("\n ")
42
- logger.debug(
41
+ Datadog::Utils.logger.debug(
43
42
  "couldn't add tracing context #{context} to request #{e}:\n#{trace}"
44
43
  )
45
44
  end
@@ -53,7 +52,7 @@ module Datadog
53
52
  context[:sample_mode]
54
53
  req[Datadog::Trace::DD_PARENT_ID_HEADER.to_sym] = context[:parent_id]
55
54
  req[Datadog::Trace::DD_TRACE_ID_HEADER.to_sym] = context[:trace_id]
56
- logger.debug("added context #{context} to request")
55
+ Datadog::Utils.logger.debug("added context #{context} to request")
57
56
  req
58
57
  end
59
58
  end
@@ -12,7 +12,7 @@ module Datadog
12
12
  module Lambda
13
13
  module VERSION
14
14
  MAJOR = 1
15
- MINOR = 10
15
+ MINOR = 11
16
16
  PATCH = 0
17
17
  PRE = nil
18
18
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datadog-lambda
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-10 00:00:00.000000000 Z
11
+ date: 2020-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-xray-sdk
@@ -133,7 +133,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  - !ruby/object:Gem::Version
134
134
  version: '0'
135
135
  requirements: []
136
- rubygems_version: 3.0.3
136
+ rubyforge_project:
137
+ rubygems_version: 2.7.6
137
138
  signing_key:
138
139
  specification_version: 4
139
140
  summary: Instruments your Ruby AWS Lambda functions with Datadog