async-http 0.90.0 → 0.90.2
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
- checksums.yaml.gz.sig +0 -0
- data/lib/async/http/server.rb +1 -1
- data/lib/async/http/version.rb +1 -1
- data/lib/metrics/provider/async/http/client.rb +4 -4
- data/lib/metrics/provider/async/http/server.rb +3 -3
- data/readme.md +4 -4
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f3d3f7847e4ca1d36ea14f2e2a429aaee69540f417eccde36d0e78b046cdd04
|
4
|
+
data.tar.gz: 72254daf856acd1339850a6af190dc3aa302483b00a31891bbc0bcbb41edbe4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d116c25e3ef63211b53222cc2baf36c7469b4da0526d464a30981bbde0e18abdf1860bb4f84a2ac19e89a4ea9ed1f43698e08139214773092e2dd82f74cb8233
|
7
|
+
data.tar.gz: 5550db7a5ddca2f6e0512184a5706504226315337af5eaa357a1f9756afcc01718ce09e00e06cd845c52c19d3ec45180fbbcf4f6447942f767cf9fc73dd29e41
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/async/http/server.rb
CHANGED
@@ -94,7 +94,7 @@ module Async
|
|
94
94
|
attributes["http.protocol"] = protocol
|
95
95
|
end
|
96
96
|
|
97
|
-
Traces.trace("async.http.server.call",
|
97
|
+
Traces.trace("async.http.server.call", attributes: attributes) do |span|
|
98
98
|
super.tap do |response|
|
99
99
|
if status = response&.status
|
100
100
|
span["http.status_code"] = status
|
data/lib/async/http/version.rb
CHANGED
@@ -8,19 +8,19 @@ require "metrics/provider"
|
|
8
8
|
|
9
9
|
Metrics::Provider(Async::HTTP::Client) do
|
10
10
|
ASYNC_HTTP_CLIENT_REQUEST_INITIATED = Metrics.metric("async.http.client.request.initiated", :counter, description: "The number of HTTP client requests initiated.")
|
11
|
-
|
12
|
-
|
11
|
+
ASYNC_HTTP_CLIENT_REQUEST_FINISHED = Metrics.metric("async.http.client.request.finished", :counter, description: "The number of HTTP client requests finished.")
|
12
|
+
|
13
13
|
def make_response(request, connection, attempt)
|
14
14
|
ASYNC_HTTP_CLIENT_REQUEST_INITIATED.emit(1, tags: ["method:#{request.method}"])
|
15
15
|
|
16
16
|
response = super(request, connection, attempt)
|
17
17
|
|
18
|
-
|
18
|
+
ASYNC_HTTP_CLIENT_REQUEST_FINISHED.emit(1, tags: ["method:#{request.method}", "status:#{response.status}"])
|
19
19
|
|
20
20
|
return response
|
21
21
|
ensure
|
22
22
|
unless response
|
23
|
-
|
23
|
+
ASYNC_HTTP_CLIENT_REQUEST_FINISHED.emit(1, tags: ["method:#{request.method}", "status:failed"])
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -8,20 +8,20 @@ require "metrics/provider"
|
|
8
8
|
|
9
9
|
Metrics::Provider(Async::HTTP::Server) do
|
10
10
|
ASYNC_HTTP_SERVER_REQUEST_INITIATED = Metrics.metric("async.http.server.request.initiated", :counter, description: "The number of HTTP server requests initiated.")
|
11
|
-
|
11
|
+
ASYNC_HTTP_SERVER_REQUEST_FINISHED = Metrics.metric("async.http.server.request.finished", :counter, description: "The number of HTTP server requests finished.")
|
12
12
|
|
13
13
|
def call(request)
|
14
14
|
ASYNC_HTTP_SERVER_REQUEST_INITIATED.emit(1, tags: ["method:#{request.method}"])
|
15
15
|
|
16
16
|
if response = super(request)
|
17
|
-
|
17
|
+
ASYNC_HTTP_SERVER_REQUEST_FINISHED.emit(1, tags: ["method:#{request.method}", "status:#{response.status}"])
|
18
18
|
return response
|
19
19
|
else
|
20
20
|
return nil
|
21
21
|
end
|
22
22
|
ensure
|
23
23
|
unless response
|
24
|
-
|
24
|
+
ASYNC_HTTP_SERVER_REQUEST_FINISHED.emit(1, tags: ["method:#{request.method}", "status:failed"])
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
data/readme.md
CHANGED
@@ -16,6 +16,10 @@ Please see the [project documentation](https://socketry.github.io/async-http/) f
|
|
16
16
|
|
17
17
|
Please see the [project releases](https://socketry.github.io/async-http/releases/index) for all releases.
|
18
18
|
|
19
|
+
### v0.90.2
|
20
|
+
|
21
|
+
- Don't emit `resource:` keyword argument in traces - it's unsupported by OpenTelemetry.
|
22
|
+
|
19
23
|
### v0.88.0
|
20
24
|
|
21
25
|
- [Support custom protocols with options](https://socketry.github.io/async-http/releases/index#support-custom-protocols-with-options)
|
@@ -55,10 +59,6 @@ Please see the [project releases](https://socketry.github.io/async-http/releases
|
|
55
59
|
|
56
60
|
- Better handling of HTTP/1 \<-\> HTTP/2 proxying, specifically upgrade/CONNECT requests.
|
57
61
|
|
58
|
-
### v0.74.0
|
59
|
-
|
60
|
-
- [`Async::HTTP::Internet` accepts keyword arguments](https://socketry.github.io/async-http/releases/index#async::http::internet-accepts-keyword-arguments)
|
61
|
-
|
62
62
|
## See Also
|
63
63
|
|
64
64
|
- [benchmark-http](https://github.com/socketry/benchmark-http) — A benchmarking tool to report on web server concurrency.
|
data/releases.md
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|