nexus_semantic_logger 1.12.12 → 1.12.13

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: 8ffe47db66b655b68cdb1aec2623c866b76275c470a4893269e9693a4352e9c2
4
- data.tar.gz: c2de8bb467f2c738be827dc6005539a37411f8dff91d251ac1ca98e25260886c
3
+ metadata.gz: 709f2b9a2553d01ebc0cf991dc33fe3ae5024fe962d4cadde574ad3b82ba3298
4
+ data.tar.gz: 6a52e8e19155030674e49970fde59051d7cc98c054e99c84f5e4f3e9395bd0f0
5
5
  SHA512:
6
- metadata.gz: af0e05963b659da545f9b8ad0420ee72aa6bc04b16cad3727a6d0f7ca80ee2d7dc1da04221815c24995afeddb828e9b3624d655b68e77a6dc8b287a5c6c6e39d
7
- data.tar.gz: 562af249df1f57f678d752a4c9eeddba91dfb4e1676a90776a58f31c329227da6d6db570698e54a902043d92531b34b7cebf5d0519ed1ed24245e44298af9ba1
6
+ metadata.gz: 524e707f24b09ba2ba3cb0758a6ce9b056344ce05a5ca3870ae94f716ca4ba0e69ae4bff5552511350bdeca34c04cbbf5561ed3faa608b75dc8e8f1aa8711642
7
+ data.tar.gz: 863a26604c60a18d75c33f9b8847cb57cbde9f1b86b6b02e48b25125dda3a2de57a5a3ac8f6133859f87b7924449c079fafced35cae66375d4b7d597856621b7
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module NexusSemanticLogger
3
- # Leave this as 1.12.12 in order for CI process to replace with the tagged version.
4
- VERSION = '1.12.12'
3
+ # Leave this as 1.12.13 in order for CI process to replace with the tagged version.
4
+ VERSION = '1.12.13'
5
5
  end
@@ -6,7 +6,6 @@ require 'nexus_semantic_logger/datadog_singleton'
6
6
  require 'nexus_semantic_logger/datadog_tracer'
7
7
  require 'nexus_semantic_logger/ddtrace_ruby3_patch'
8
8
  require 'nexus_semantic_logger/logger_metrics_subscriber'
9
- require 'nexus_semantic_logger/response_code_stats_middleware'
10
9
 
11
10
  module NexusSemanticLogger
12
11
  # Get application wide object for sending metrics.
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.12.12
4
+ version: 1.12.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johnathon Harris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-23 00:00:00.000000000 Z
11
+ date: 2024-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: amazing_print
@@ -128,7 +128,6 @@ files:
128
128
  - lib/nexus_semantic_logger/ddtrace_ruby3_patch.rb
129
129
  - lib/nexus_semantic_logger/extensions/action_dispatch/debug_exceptions.rb
130
130
  - lib/nexus_semantic_logger/logger_metrics_subscriber.rb
131
- - lib/nexus_semantic_logger/response_code_stats_middleware.rb
132
131
  - lib/nexus_semantic_logger/sneakers_metrics.rb
133
132
  - lib/nexus_semantic_logger/version.rb
134
133
  - lib/puma/plugin/README.md
@@ -152,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
151
  - !ruby/object:Gem::Version
153
152
  version: '0'
154
153
  requirements: []
155
- rubygems_version: 3.5.19
154
+ rubygems_version: 3.5.20
156
155
  signing_key:
157
156
  specification_version: 4
158
157
  summary: semantic_logger usage for nexus
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # noinspection RubyClassVariableUsageInspection
4
- module NexusSemanticLogger
5
- class ResponseCodeStatsMiddleware
6
- @@code_metrics = Hash.new(0)
7
- def initialize(app)
8
- @app = app
9
- end
10
-
11
- def call(env)
12
- status, headers, response = @app.call(env)
13
-
14
- @@code_metrics[status] ||= 0
15
- @@code_metrics[status] += 1
16
-
17
- [status, headers, response]
18
- end
19
-
20
- def self.read_and_reset_metrics
21
- metrics = @@code_metrics.dup
22
- @@code_metrics = Hash.new(0)
23
- metrics
24
- end
25
- end
26
- end