evt-event_source-event_store-http 0.2.0.0.pre2 → 0.2.0.0.pre3
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 +4 -4
- data/lib/event_source/event_store/http/session.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31a40f93e507825b512dfdc9888f92084341899b
|
4
|
+
data.tar.gz: 047d36269233003f428bc63d792a8431e57cec64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
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(
|
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(
|
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.
|
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
|
|