httpx 0.24.6 → 0.24.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/release_notes/0_24_7.md +10 -0
- data/lib/httpx/adapters/datadog.rb +44 -12
- data/lib/httpx/plugins/grpc.rb +16 -4
- data/lib/httpx/version.rb +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06e8fd5ae58c24b0e8d71267133209622fad2e16e2196403937f3d330330fc72
|
4
|
+
data.tar.gz: 2684eb339c078326609390667a8c9522225fdf56ff2fdece7571022c110d96fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc776c73232482381b6c8861cd6b743b16e2ccd03a8aa2764ccb30668c6e13ca3a560b51d66f0569cbf1f0d71c2ad101ad04e3b1c187336496b6424633b12e41
|
7
|
+
data.tar.gz: aaa3cbf6a87825896331a2cd0aa2604e82738510507cade210092fcbb060456765750ed3e13af1395fc1cc998abf0c6222eda776f27d152e9e46c406ed3cce4d
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# 0.24.6
|
2
|
+
|
3
|
+
## dependencies
|
4
|
+
|
5
|
+
`http-2-next` last supported version for the 0.x series is the last version before v1. This shoul ensure that older versions of `httpx` won't be affected by any of the recent breaking changes.
|
6
|
+
|
7
|
+
## Bugfixes
|
8
|
+
|
9
|
+
* `grpc`: setup of rpc calls from camel-cased symbols has been fixed. As an improvement, the GRPC-enabled session will now support both snake-cased, as well as camel-cased calls.
|
10
|
+
* `datadog` adapter has now been patched to support the most recent breaking changes of `ddtrace` configuration DSL (`env_to_bool` is no longer supported).
|
@@ -188,19 +188,39 @@ module TRACING_MODULE # rubocop:disable Naming/ClassAndModuleCamelCase
|
|
188
188
|
option :distributed_tracing, default: true
|
189
189
|
option :split_by_domain, default: false
|
190
190
|
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
191
|
+
if DDTrace::VERSION::STRING >= "1.13.0"
|
192
|
+
option :enabled do |o|
|
193
|
+
o.type :bool
|
194
|
+
o.env "DD_TRACE_HTTPX_ENABLED"
|
195
|
+
o.default true
|
196
|
+
end
|
195
197
|
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
198
|
+
option :analytics_enabled do |o|
|
199
|
+
o.type :bool
|
200
|
+
o.env "DD_TRACE_HTTPX_ANALYTICS_ENABLED"
|
201
|
+
o.default false
|
202
|
+
end
|
203
|
+
|
204
|
+
option :analytics_sample_rate do |o|
|
205
|
+
o.type :float
|
206
|
+
o.env "DD_TRACE_HTTPX_ANALYTICS_SAMPLE_RATE"
|
207
|
+
o.default 1.0
|
208
|
+
end
|
209
|
+
else
|
210
|
+
option :enabled do |o|
|
211
|
+
o.default { env_to_bool("DD_TRACE_HTTPX_ENABLED", true) }
|
212
|
+
o.lazy
|
213
|
+
end
|
200
214
|
|
201
|
-
|
202
|
-
|
203
|
-
|
215
|
+
option :analytics_enabled do |o|
|
216
|
+
o.default { env_to_bool(%w[DD_TRACE_HTTPX_ANALYTICS_ENABLED DD_HTTPX_ANALYTICS_ENABLED], false) }
|
217
|
+
o.lazy
|
218
|
+
end
|
219
|
+
|
220
|
+
option :analytics_sample_rate do |o|
|
221
|
+
o.default { env_to_float(%w[DD_TRACE_HTTPX_ANALYTICS_SAMPLE_RATE DD_HTTPX_ANALYTICS_SAMPLE_RATE], 1.0) }
|
222
|
+
o.lazy
|
223
|
+
end
|
204
224
|
end
|
205
225
|
|
206
226
|
if defined?(TRACING_MODULE::Contrib::SpanAttributeSchema)
|
@@ -224,7 +244,19 @@ module TRACING_MODULE # rubocop:disable Naming/ClassAndModuleCamelCase
|
|
224
244
|
|
225
245
|
option :distributed_tracing, default: true
|
226
246
|
|
227
|
-
|
247
|
+
if DDTrace::VERSION::STRING >= "1.15.0"
|
248
|
+
option :error_handler do |o|
|
249
|
+
o.type :proc
|
250
|
+
o.default_proc(&DEFAULT_ERROR_HANDLER)
|
251
|
+
end
|
252
|
+
elsif DDTrace::VERSION::STRING >= "1.13.0"
|
253
|
+
option :error_handler do |o|
|
254
|
+
o.type :proc
|
255
|
+
o.experimental_default_proc(&DEFAULT_ERROR_HANDLER)
|
256
|
+
end
|
257
|
+
else
|
258
|
+
option :error_handler, default: DEFAULT_ERROR_HANDLER
|
259
|
+
end
|
228
260
|
end
|
229
261
|
end
|
230
262
|
|
data/lib/httpx/plugins/grpc.rb
CHANGED
@@ -141,17 +141,29 @@ module HTTPX
|
|
141
141
|
deadline: @options.grpc_deadline,
|
142
142
|
}.merge(opts)
|
143
143
|
|
144
|
+
local_rpc_name = rpc_name.underscore
|
145
|
+
|
144
146
|
session_class = Class.new(self.class) do
|
147
|
+
# define rpc method with ruby style name
|
145
148
|
class_eval(<<-OUT, __FILE__, __LINE__ + 1)
|
146
|
-
def #{
|
147
|
-
rpc_execute("#{
|
148
|
-
end
|
149
|
+
def #{local_rpc_name}(input, **opts) # def grpc_action(input, **opts)
|
150
|
+
rpc_execute("#{local_rpc_name}", input, **opts) # rpc_execute("grpc_action", input, **opts)
|
151
|
+
end # end
|
149
152
|
OUT
|
153
|
+
|
154
|
+
# define rpc method with original name
|
155
|
+
unless local_rpc_name == rpc_name
|
156
|
+
class_eval(<<-OUT, __FILE__, __LINE__ + 1)
|
157
|
+
def #{rpc_name}(input, **opts) # def grpcAction(input, **opts)
|
158
|
+
rpc_execute("#{local_rpc_name}", input, **opts) # rpc_execute("grpc_action", input, **opts)
|
159
|
+
end # end
|
160
|
+
OUT
|
161
|
+
end
|
150
162
|
end
|
151
163
|
|
152
164
|
session_class.new(@options.merge(
|
153
165
|
grpc_rpcs: @options.grpc_rpcs.merge(
|
154
|
-
|
166
|
+
local_rpc_name => [rpc_name, input, output, rpc_opts]
|
155
167
|
).freeze
|
156
168
|
))
|
157
169
|
end
|
data/lib/httpx/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httpx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.24.
|
4
|
+
version: 0.24.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tiago Cardoso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http-2-next
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "<"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 1.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "<"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 1.0.0
|
27
27
|
description: A client library for making HTTP requests from Ruby.
|
28
28
|
email:
|
29
29
|
- cardoso_tiago@hotmail.com
|
@@ -106,6 +106,7 @@ extra_rdoc_files:
|
|
106
106
|
- doc/release_notes/0_24_4.md
|
107
107
|
- doc/release_notes/0_24_5.md
|
108
108
|
- doc/release_notes/0_24_6.md
|
109
|
+
- doc/release_notes/0_24_7.md
|
109
110
|
- doc/release_notes/0_2_0.md
|
110
111
|
- doc/release_notes/0_2_1.md
|
111
112
|
- doc/release_notes/0_3_0.md
|
@@ -204,6 +205,7 @@ files:
|
|
204
205
|
- doc/release_notes/0_24_4.md
|
205
206
|
- doc/release_notes/0_24_5.md
|
206
207
|
- doc/release_notes/0_24_6.md
|
208
|
+
- doc/release_notes/0_24_7.md
|
207
209
|
- doc/release_notes/0_2_0.md
|
208
210
|
- doc/release_notes/0_2_1.md
|
209
211
|
- doc/release_notes/0_3_0.md
|