evt-event_source-event_store-http 0.2.0.0.pre2 → 0.2.0.0.pre3

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
  SHA1:
3
- metadata.gz: a094a56175c4908062570e24beae32d3f2765b86
4
- data.tar.gz: f5c1ceb11488f07b58479695fa0a734978a6f066
3
+ metadata.gz: 31a40f93e507825b512dfdc9888f92084341899b
4
+ data.tar.gz: 047d36269233003f428bc63d792a8431e57cec64
5
5
  SHA512:
6
- metadata.gz: 40942fa2f9c0ba8b8fd5029a52714b95f039af2b930fa62b21943d914442fef817a77f2eb02a0ad1d2c6eb667dd332a1dcfb3ab063560b592e5175c99e84b445
7
- data.tar.gz: 6fd5a9a9119d1d3609da4fc4c87a78112bfe251f2e08cdd6053f518ff1e6c266ca98c6cc63b9ca79dda8cf7fb391ab6a5cfa6676ed05e4a559c07d258c746c6d
6
+ metadata.gz: 70ecd424f58eb004c16748b150ff0067bb54fe85a4c12467a412c3f3c923e57ea60a710a8bec0352aeac31d0b8166c58d2579d8c674e14ddda8768b7afef17c1
7
+ data.tar.gz: 944bd74d27628d59e92c67f00b96e00419ecd253eecec9314def4bdeb32aa708b0aabb21245c3cb83a5f9708acfb689f6174b23ba7e96bcdcff7cb8e797c7a6a
@@ -29,13 +29,13 @@ module EventSource
29
29
  def call(request, redirect: nil, &probe)
30
30
  redirect ||= false
31
31
 
32
- logger.trace(tags: :http) { "Issuing #{request.method} request (#{LogText.request_attributes request})" }
32
+ logger.trace(tag: :event_store_http) { "Issuing #{request.method} request (#{LogText.request_attributes request})" }
33
33
  logger.trace(tag: :data) { LogText.request_body request } if request.request_body_permitted?
34
34
 
35
35
  response = connection.request request
36
36
 
37
37
  if Net::HTTPRedirection === response && !redirect
38
- logger.debug(tags: :http) { "#{request.method} request received redirect response (#{LogText.request_attributes request}, #{LogText.response_attributes response}, Location: #{response['Location'] || '(none)'})" }
38
+ logger.debug(tag: :event_store_http) { "#{request.method} request received redirect response (#{LogText.request_attributes request}, #{LogText.response_attributes response}, Location: #{response['Location'] || '(none)'})" }
39
39
 
40
40
  location = URI.parse response['Location']
41
41
  leader_ip_address = location.host
@@ -50,7 +50,7 @@ module EventSource
50
50
  return response
51
51
  end
52
52
 
53
- logger.trace(tags: :http) { "#{request.method} request issued (#{LogText.request_attributes request}, #{LogText.response_attributes response})" }
53
+ logger.trace(tag: :event_store_http) { "#{request.method} request issued (#{LogText.request_attributes request}, #{LogText.response_attributes response})" }
54
54
  logger.trace(tag: :data) { LogText.response_body response }
55
55
 
56
56
  telemetry.record :http_request, Telemetry::HTTPRequest.build(request, response)
@@ -75,7 +75,7 @@ module EventSource
75
75
  end
76
76
 
77
77
  def establish_connection(leader_ip_address=nil)
78
- logger.trace { "Establishing connection to EventStore (#{LogText.establishing_connection self, leader_ip_address})" }
78
+ logger.trace(tag: :event_store_connection) { "Establishing connection to EventStore (#{LogText.establishing_connection self, leader_ip_address})" }
79
79
 
80
80
  close if connected?
81
81
 
@@ -90,7 +90,7 @@ module EventSource
90
90
 
91
91
  rescue ::EventStore::Cluster::LeaderStatus::GossipEndpoint::Get::NonClusterError => error
92
92
  leader_status_queried_telemetry.error = error
93
- logger.warn { "Could not determine cluster leader (#{LogText.establishing_connection self, leader_ip_address}, Error: #{error.class})" }
93
+ logger.warn(tag: :event_store_connection) { "Could not determine cluster leader (#{LogText.establishing_connection self, leader_ip_address}, Error: #{error.class})" }
94
94
  end
95
95
 
96
96
  telemetry.record :leader_status_queried, leader_status_queried_telemetry
@@ -100,7 +100,7 @@ module EventSource
100
100
 
101
101
  telemetry.record :connection_established, Telemetry::ConnectionEstablished.new(leader_ip_address || host, port, connection)
102
102
 
103
- logger.debug { "Connection to EventStore established (#{LogText.connection_established self, leader_ip_address})" }
103
+ logger.info(tag: :event_store_connection) { "Connection to EventStore established (#{LogText.connection_established self, leader_ip_address})" }
104
104
 
105
105
  self.connection = connection
106
106
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-event_source-event_store-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.0.pre2
4
+ version: 0.2.0.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project