elastic-transport 8.5.2 → 8.5.3
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/CHANGELOG.md +6 -0
- data/lib/elastic/transport/client.rb +1 -1
- data/lib/elastic/transport/transport/base.rb +4 -9
- data/lib/elastic/transport/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d1367aa286a53be8c0c3f93320afebd83849057b5aef6bead07660876cfbffc2
|
|
4
|
+
data.tar.gz: 2c795f10b5863477f782690af3791a50abdb8d05eeb4e40c5ba901a49f2ecf38
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 62b1b3175922a1999e8bace0eb9acbf7d3de89e3e12acc34d93f7bbe89353fae797fb39fa345d363d12d5ca1557ddbefdf7252aa3dd5e356bffffd764439e374
|
|
7
|
+
data.tar.gz: a34e264fd4f799322b737bcaa8647676367e823377c90cc3fa4b3979298bdb62ce2969c17d5aca4dfa6d95988b27ff209c77079f60001c03d449d983b2d1f403
|
data/CHANGELOG.md
CHANGED
|
@@ -169,7 +169,7 @@ module Elastic
|
|
|
169
169
|
def perform_request(method, path, params = {}, body = nil, headers = nil, opts = {})
|
|
170
170
|
method = @send_get_body_as if method == 'GET' && body
|
|
171
171
|
validate_ca_fingerprints if @ca_fingerprint
|
|
172
|
-
if @otel
|
|
172
|
+
if defined?(@otel) && !@otel.nil?
|
|
173
173
|
# If no endpoint is specified in the opts, use the HTTP method name
|
|
174
174
|
span_name = opts[:endpoint] || method
|
|
175
175
|
@otel.tracer.in_span(span_name) do |span|
|
|
@@ -356,15 +356,10 @@ module Elastic
|
|
|
356
356
|
end
|
|
357
357
|
|
|
358
358
|
if response.body &&
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
# Prevent Float value from automatically becoming BigDecimal when using Oj
|
|
364
|
-
load_options = {}
|
|
365
|
-
load_options[:mode] = :compat if ::MultiJson.adapter.to_s == "MultiJson::Adapters::Oj"
|
|
366
|
-
|
|
367
|
-
json = serializer.load(response.body, load_options)
|
|
359
|
+
!response.body.empty? &&
|
|
360
|
+
response.headers &&
|
|
361
|
+
response.headers['content-type'] =~ /json/
|
|
362
|
+
json = serializer.load(response.body)
|
|
368
363
|
end
|
|
369
364
|
took = (json['took'] ? sprintf('%.3fs', json['took'] / 1000.0) : 'n/a') rescue 'n/a'
|
|
370
365
|
__log_response(method, path, params, body, url, response, json, took, duration) unless ignore.include?(response.status.to_i)
|