opentelemetry-instrumentation-sinatra 0.7.0 → 0.7.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b6a81ca23845eaccd905ebc8a80cd74b155840fcaa9c23e64fefb4c077dcaca
|
4
|
+
data.tar.gz: 3aa4b7102a36fe76351ce8141d69d1738c567fbdd26de37f3c56dfef97258760
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f3d401f47cdec488bf76a1c323e2ea548da48c414cf495a115664bdedaafe1639d8bf5fbf03e5c4944d3e621c0c0ee4e43e77ee7d3394b4f03093d5e721dd44
|
7
|
+
data.tar.gz: 704c8a1c5c2fa96b84a4f7b83faf4fc75618380ba14b4200b1df63f87efe997cbe5b7ce980acc37efa30f977067dee385791d8006c7e2a6518f73e46f41acab2
|
data/CHANGELOG.md
CHANGED
@@ -15,10 +15,8 @@ module OpenTelemetry
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def call(env)
|
18
|
-
span_name = env['sinatra.route'] || env['PATH_INFO']
|
19
|
-
|
20
18
|
tracer.in_span(
|
21
|
-
|
19
|
+
env['PATH_INFO'],
|
22
20
|
attributes: { 'http.method' => env['REQUEST_METHOD'],
|
23
21
|
'http.url' => env['PATH_INFO'] },
|
24
22
|
kind: :server,
|
@@ -46,6 +44,7 @@ module OpenTelemetry
|
|
46
44
|
span.set_attribute('http.status_code', status)
|
47
45
|
span.set_attribute('http.status_text', ::Rack::Utils::HTTP_STATUS_CODES[status])
|
48
46
|
span.set_attribute('http.route', env['sinatra.route'].split.last) if env['sinatra.route']
|
47
|
+
span.name = env['sinatra.route'] if env['sinatra.route']
|
49
48
|
span.status = OpenTelemetry::Trace::Status.http_to_status(status)
|
50
49
|
end
|
51
50
|
end
|