nexus_semantic_logger 1.11.4 → 1.11.6

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: ed653b1e32d734bfc4e9018951531faa51ee614a208f6bddd6dc850cff007ecc
4
- data.tar.gz: 8e23a796f5f3d229c8492628743f6c54dffed4f9028bed78748b917fa1869a8f
3
+ metadata.gz: c3f367c4597a558ce34338e3378f03c014de4745b3fa3b107629eb28c4be03d0
4
+ data.tar.gz: 06b199a9c633825110cefdc2bd10272dff2d6e88340b1fd91296994108236b6e
5
5
  SHA512:
6
- metadata.gz: e50db7baa294a226af0975d8bb43249056852f0daedcf47f80be5f98ea845803feceba576285c68810384034f0b70cd7909526b24d596f2172d4f5329fca2d0b
7
- data.tar.gz: 470076081cc272decc996dea61f91e10723db443636ecbdebc071507b0f77a8b392916697b3838cbc19b3b52e2f9700e050d2a2db2bb72063afb3af0c162c112
6
+ metadata.gz: a071e056de2fd4a4a86112b382b3de49a3d6b0d80beca2a430141fbef69aa3075a3082d9a59f211c10040c4999a4d7eca4c7e72470275ef1f229011842a794c3
7
+ data.tar.gz: 2814af602f6693ab6076cbf2d1c922c5cbefb8b8ae5520bf03efc6860c8448fb95e7cee81325aae98d1bcf707ff8dc23ec4fc309ea77ab4ae7e41274501da7f3
@@ -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,18 @@
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
+ Datadog::Core::Environment::VMCache.class_eval do
8
+ module_function
9
+
10
+ # Ruby >= 3.2 uses :constant_cache_invalidations instead of :global_constant_state
11
+ # This is a temporary workaround, the correct solution is to report both :constant_cache_invalidations and
12
+ # :constant_cache_misses in DD
13
+ # See https://github.com/ruby/ruby/pull/5433,
14
+ # https://github.com/DataDog/dd-trace-rb/blob/v1.5.0/lib/datadog/core/environment/vm_cache.rb#L23-L25
15
+ def global_constant_state
16
+ RubyVM.stat[:constant_cache_invalidations]
17
+ end
18
+ 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.6 in order for CI process to replace with the tagged version.
4
+ VERSION = '1.11.6'
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.6
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