nexus_semantic_logger 1.11.4 → 1.11.5

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: ed653b1e32d734bfc4e9018951531faa51ee614a208f6bddd6dc850cff007ecc
4
- data.tar.gz: 8e23a796f5f3d229c8492628743f6c54dffed4f9028bed78748b917fa1869a8f
3
+ metadata.gz: 2c2b93034acfcfaf40fbffbf01287f4268644eec2752a5fabe52f2ce81139d7a
4
+ data.tar.gz: 613712ccae326eead3599f6f251dbe9d82a6e3fc2beb5c318aab60e9308e625e
5
5
  SHA512:
6
- metadata.gz: e50db7baa294a226af0975d8bb43249056852f0daedcf47f80be5f98ea845803feceba576285c68810384034f0b70cd7909526b24d596f2172d4f5329fca2d0b
7
- data.tar.gz: 470076081cc272decc996dea61f91e10723db443636ecbdebc071507b0f77a8b392916697b3838cbc19b3b52e2f9700e050d2a2db2bb72063afb3af0c162c112
6
+ metadata.gz: '0586dc978666d97bc52c09699a2fc9401c133c1531f4180893d9ac05eaf630ba951c03782b3818c626b429e1a15eac67ded751619a4453d4c55a758e7dd55750'
7
+ data.tar.gz: ecb05454ed928ad108052bda75f609586ffb398731e65ff28cdae77bca8c1a6b0e22368e1611c398062df8345aa61bbf7fe2623b2beef5eccd6cbccbf9a2c2b2
@@ -22,11 +22,15 @@ module NexusSemanticLogger
22
22
  end
23
23
  c.runtime_metrics.statsd = datadog_singleton.statsd
24
24
 
25
- # Configure tags to be sent on all traces and metrics.
25
+ # Configure tags to be sent on all metrics.
26
26
  # Note that 'env' is NOT sent- that is set as the default on the agent e.g. staging, canary, production.
27
27
  # It does not necessarily align with the Rails env, and we do not want to double tag the env.
28
28
  datadog_singleton.global_tags = ["railsenv:#{Rails.env}", "service:#{service}"]
29
- c.tags = datadog_singleton.global_tags
29
+ # Trace tags API is Hash<String,String>, see https://www.rubydoc.info/gems/ddtrace/Datadog/Tracing
30
+ c.tags = {
31
+ railsenv: Rails.env,
32
+ service: service,
33
+ }
30
34
 
31
35
  # Tracer requires configuration to a datadog agent via DD_AGENT_HOST.
32
36
  dd_force_tracer_val = ENV.fetch('DD_FORCE_TRACER', false)
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+ require 'ddtrace'
3
+
4
+ # Temporary monkey patch for ddtrace 1.9 in ruby 3.2.
5
+ # Supposedly fixed in upstream 1.10, once that is released.
6
+ # See https://github.com/DataDog/dd-trace-rb/issues/2534
7
+ puts "hello world"
8
+ Datadog::Core::Environment::VMCache.class_eval do
9
+ module_function
10
+
11
+ # Ruby >= 3.2 uses :constant_cache_invalidations instead of :global_constant_state
12
+ # This is a temporary workaround, the correct solution is to report both :constant_cache_invalidations and
13
+ # :constant_cache_misses in DD
14
+ # See https://github.com/ruby/ruby/pull/5433,
15
+ # https://github.com/DataDog/dd-trace-rb/blob/v1.5.0/lib/datadog/core/environment/vm_cache.rb#L23-L25
16
+ def global_constant_state
17
+ RubyVM.stat[:constant_cache_invalidations]
18
+ end
19
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module NexusSemanticLogger
3
- # Leave this as 1.11.4 in order for CI process to replace with the tagged version.
4
- VERSION = '1.11.4'
3
+ # Leave this as 1.11.5 in order for CI process to replace with the tagged version.
4
+ VERSION = '1.11.5'
5
5
  end
@@ -4,6 +4,7 @@ require 'nexus_semantic_logger/application'
4
4
  require 'nexus_semantic_logger/datadog_formatter'
5
5
  require 'nexus_semantic_logger/datadog_singleton'
6
6
  require 'nexus_semantic_logger/datadog_tracer'
7
+ require 'nexus_semantic_logger/ddtrace_ruby3_patch'
7
8
  require 'nexus_semantic_logger/logger_metrics_subscriber'
8
9
 
9
10
  module NexusSemanticLogger
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexus_semantic_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.4
4
+ version: 1.11.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johnathon Harris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-23 00:00:00.000000000 Z
11
+ date: 2023-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: amazing_print
@@ -111,6 +111,7 @@ files:
111
111
  - lib/nexus_semantic_logger/datadog_formatter.rb
112
112
  - lib/nexus_semantic_logger/datadog_singleton.rb
113
113
  - lib/nexus_semantic_logger/datadog_tracer.rb
114
+ - lib/nexus_semantic_logger/ddtrace_ruby3_patch.rb
114
115
  - lib/nexus_semantic_logger/extensions/action_dispatch/debug_exceptions.rb
115
116
  - lib/nexus_semantic_logger/logger_metrics_subscriber.rb
116
117
  - lib/nexus_semantic_logger/sneakers_metrics.rb