prefab-cloud-ruby 1.3.1 → 1.3.2

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: ac25de1650da9f74095f10f535d3d82d7b865c8e3f2c56d621703ebe5a5c15f9
4
- data.tar.gz: a628c38bba37dbb0f49fcb9ed6beeb6c58363a73a656a24d853d87ea9d835d92
3
+ metadata.gz: 51803ee8ef4be86a0dbe2a7cbf678ea24c91eb5f023c37cc66ed9477d0132ae7
4
+ data.tar.gz: 43106c26d3dcb9c3736ef5d6b1ff69e90525cc34098d74406e183eff8c536222
5
5
  SHA512:
6
- metadata.gz: 1ea0aef2dd291d5263b825ad7ccb0565feb05acba45c0e142872f22b1111b93c3fadb431a03540230d97f48b20c13772821d523e41beb9b940bcbeec25e074bf
7
- data.tar.gz: 9a70210438aeff434d33adfd6119ea279d4b27ff0c87cc604970ed3e48c77651d8064b761b06cc376039f29cab2519f72c494579472de87bdfadd7fdf02c4467
6
+ metadata.gz: 3051706d0c390715de78a1fb2e8c02eb030801bb8923498a4fb12e6b3ec47c3a18b67fabae5bc3d189ed6fd3f7cd5d4589f5159f1474af61ce2b38444e524ac3
7
+ data.tar.gz: 7398e9212e21f4a10d5093b7b5c572e1f7f938b3a805bb41c694c38246123a1d464f67cbe86e04ea0581c8c830e1100429378c6d7c24351618a5e4b97c063e3c
data/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 1.3.2 - 2023-11-15
6
+ - Send back cloud.prefab logging telemetry (#160)
7
+
5
8
  ## 1.3.1 - 2023-11-14
6
9
  - Improve path of rails.controller logging & fix strong param include (#159)
7
10
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.1
1
+ 1.3.2
@@ -56,8 +56,6 @@ module Prefab
56
56
  path_loc = get_loc_path(loc)
57
57
  path = @prefix + path_loc
58
58
 
59
- @log_path_aggregator&.push(path_loc, severity)
60
-
61
59
  log(message, path, progname, severity, log_context, &block)
62
60
  end
63
61
 
@@ -73,6 +71,8 @@ module Prefab
73
71
 
74
72
  def log(message, path, progname, severity, log_context={})
75
73
  severity ||= ::Logger::UNKNOWN
74
+ @log_path_aggregator&.push(path, severity)
75
+
76
76
  return true if @logdev.nil? || severity < level_of(path) || @silences[local_log_id]
77
77
 
78
78
  progname = @progname if progname.nil?
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: prefab-cloud-ruby 1.3.1 ruby lib
5
+ # stub: prefab-cloud-ruby 1.3.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "prefab-cloud-ruby".freeze
9
- s.version = "1.3.1"
9
+ s.version = "1.3.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Jeff Dwyer".freeze]
14
- s.date = "2023-11-14"
14
+ s.date = "2023-11-15"
15
15
  s.description = "Feature Flags, Live Config, and Dynamic Log Levels as a service".freeze
16
16
  s.email = "jdwyer@prefab.cloud".freeze
17
17
  s.executables = ["console".freeze]
@@ -34,22 +34,19 @@ class TestLogPathAggregator < Minitest::Test
34
34
  client.log_path_aggregator.send(:sync)
35
35
  end
36
36
 
37
- assert_equal [[
38
- '/api/v1/known-loggers',
39
- PrefabProto::Loggers.new(
40
- loggers: [PrefabProto::Logger.new(logger_name: 'test.test_log_path_aggregator.test_sync',
41
- infos: 2, errors: 3)],
42
- start_at: Prefab::TimeHelpers.now_in_ms,
43
- end_at: Prefab::TimeHelpers.now_in_ms,
44
- instance_hash: client.instance_hash,
45
- namespace: 'this.is.a.namespace'
46
- )
47
- ]], requests
37
+ assert_equal '/api/v1/known-loggers', requests[0][0]
38
+ sent_logger = requests[0][1]
39
+ assert_equal 'this.is.a.namespace', sent_logger.namespace
40
+ assert_equal Prefab::TimeHelpers.now_in_ms, sent_logger.start_at
41
+ assert_equal Prefab::TimeHelpers.now_in_ms, sent_logger.end_at
42
+ assert_equal client.instance_hash, sent_logger.instance_hash
43
+ assert_includes sent_logger.loggers, PrefabProto::Logger.new(logger_name: 'test.test_log_path_aggregator.test_sync', infos: 2, errors: 3)
44
+ assert_includes sent_logger.loggers, PrefabProto::Logger.new(logger_name: 'cloud.prefab.client.client', debugs: 1) # spot test that internal logging is here too
48
45
 
49
46
  assert_logged [
50
- 'WARN 2023-08-09 15:18:12 -0400: cloud.prefab.client.configclient No success loading checkpoints',
51
- 'ERROR 2023-08-09 15:18:12 -0400: test.test_log_path_aggregator.test_sync here is a message'
52
- ]
47
+ 'WARN 2023-08-09 15:18:12 -0400: cloud.prefab.client.configclient No success loading checkpoints',
48
+ 'ERROR 2023-08-09 15:18:12 -0400: test.test_log_path_aggregator.test_sync here is a message'
49
+ ]
53
50
  end
54
51
  end
55
52
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prefab-cloud-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Dwyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-14 00:00:00.000000000 Z
11
+ date: 2023-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby