opentelemetry-instrumentation-sinatra 0.14.0 → 0.19.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a25a6b241afe6caf9bd21eb246515c01301172252cad3e8745be96626cb1800
|
4
|
+
data.tar.gz: 8b387c2e6214d30111ab720aa9233c772f0375963727ace61d9ea115c8c10ae9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8655ab692694340292ac67e130ae614ad22a7f8cb4c5691bfb7923d924cd566bf7957f252baea5d5b2e44580e68b6a653b6af4b52e93deadc8e65c297c9a6087
|
7
|
+
data.tar.gz: 992b466c7d62c57064cbbede06e7d04546b20431d9111313079f77c35d05c97ca01fddf49c81d30df47694ff76727b31b81772b2f3270b836a46eeb2864bae69
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,37 @@
|
|
1
1
|
# Release History: opentelemetry-instrumentation-sinatra
|
2
2
|
|
3
|
+
### v0.19.0 / 2021-06-23
|
4
|
+
|
5
|
+
* BREAKING CHANGE: Total order constraint on span.status=
|
6
|
+
|
7
|
+
* FIXED: Total order constraint on span.status=
|
8
|
+
|
9
|
+
### v0.18.0 / 2021-05-21
|
10
|
+
|
11
|
+
* ADDED: Updated API depedency for 1.0.0.rc1
|
12
|
+
* BREAKING CHANGE: Remove optional parent_context from in_span
|
13
|
+
|
14
|
+
* FIXED: Remove optional parent_context from in_span
|
15
|
+
* FIXED: Removed http.status_text attribute #750
|
16
|
+
|
17
|
+
### v0.17.0 / 2021-04-22
|
18
|
+
|
19
|
+
* (No significant changes)
|
20
|
+
|
21
|
+
### v0.16.0 / 2021-03-17
|
22
|
+
|
23
|
+
* FIXED: Example scripts now reference local common lib
|
24
|
+
* DOCS: Replace Gitter with GitHub Discussions
|
25
|
+
|
26
|
+
### v0.15.0 / 2021-02-18
|
27
|
+
|
28
|
+
* (No significant changes)
|
29
|
+
|
3
30
|
### v0.14.0 / 2021-02-03
|
4
31
|
|
5
|
-
* BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
|
32
|
+
* BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
|
6
33
|
|
7
|
-
* ADDED: Replace getter and setter callables and remove rack specific propagators
|
34
|
+
* ADDED: Replace getter and setter callables and remove rack specific propagators
|
8
35
|
|
9
36
|
### v0.13.0 / 2021-01-29
|
10
37
|
|
@@ -16,7 +43,7 @@
|
|
16
43
|
|
17
44
|
### v0.11.0 / 2020-12-11
|
18
45
|
|
19
|
-
* FIXED: Copyright comments to not reference year
|
46
|
+
* FIXED: Copyright comments to not reference year
|
20
47
|
|
21
48
|
### v0.10.0 / 2020-12-03
|
22
49
|
|
@@ -24,24 +51,24 @@
|
|
24
51
|
|
25
52
|
### v0.9.0 / 2020-11-27
|
26
53
|
|
27
|
-
* BREAKING CHANGE: Add timeout for force_flush and shutdown
|
54
|
+
* BREAKING CHANGE: Add timeout for force_flush and shutdown
|
28
55
|
|
29
|
-
* ADDED: Add timeout for force_flush and shutdown
|
56
|
+
* ADDED: Add timeout for force_flush and shutdown
|
30
57
|
|
31
58
|
### v0.8.0 / 2020-10-27
|
32
59
|
|
33
|
-
* BREAKING CHANGE: Remove 'canonical' from status codes
|
60
|
+
* BREAKING CHANGE: Remove 'canonical' from status codes
|
34
61
|
|
35
|
-
* FIXED: Remove 'canonical' from status codes
|
62
|
+
* FIXED: Remove 'canonical' from status codes
|
36
63
|
|
37
64
|
### v0.7.1 / 2020-10-08
|
38
65
|
|
39
|
-
* FIXED: Set span name to sinatra.route
|
66
|
+
* FIXED: Set span name to sinatra.route
|
40
67
|
|
41
68
|
### v0.7.0 / 2020-10-07
|
42
69
|
|
43
|
-
* FIXED: Default to sinatra.route for span name
|
44
|
-
* DOCS: Standardize toplevel docs structure and readme
|
70
|
+
* FIXED: Default to sinatra.route for span name
|
71
|
+
* DOCS: Standardize toplevel docs structure and readme
|
45
72
|
|
46
73
|
### v0.6.0 / 2020-09-10
|
47
74
|
|
data/README.md
CHANGED
@@ -45,7 +45,7 @@ end
|
|
45
45
|
|
46
46
|
The `opentelemetry-instrumentation-sinatra` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
|
47
47
|
|
48
|
-
The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us
|
48
|
+
The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us in [GitHub Discussions][discussions-url] or attending our weekly meeting. See the [meeting calendar][community-meetings] for dates and times. For more information on this and other language SIGs, see the OpenTelemetry [community page][ruby-sig].
|
49
49
|
|
50
50
|
## License
|
51
51
|
|
@@ -57,4 +57,4 @@ The `opentelemetry-instrumentation-sinatra` gem is distributed under the Apache
|
|
57
57
|
[license-github]: https://github.com/open-telemetry/opentelemetry-ruby/blob/main/LICENSE
|
58
58
|
[ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
|
59
59
|
[community-meetings]: https://github.com/open-telemetry/community#community-meetings
|
60
|
-
[
|
60
|
+
[discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
|
@@ -15,28 +15,24 @@ module OpenTelemetry
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def call(env)
|
18
|
-
|
19
|
-
env['PATH_INFO'],
|
20
|
-
attributes: { 'http.method' => env['REQUEST_METHOD'],
|
21
|
-
'http.url' => env['PATH_INFO'] },
|
22
|
-
kind: :server,
|
23
|
-
with_parent: parent_context(env)
|
24
|
-
) do |span|
|
25
|
-
app.call(env).tap { |resp| trace_response(span, env, resp) }
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
attr_reader :app
|
32
|
-
|
33
|
-
def parent_context(env)
|
34
|
-
OpenTelemetry.propagation.extract(
|
18
|
+
extracted_context = OpenTelemetry.propagation.extract(
|
35
19
|
env,
|
36
20
|
getter: OpenTelemetry::Context::Propagation.rack_env_getter
|
37
21
|
)
|
22
|
+
OpenTelemetry::Context.with_current(extracted_context) do
|
23
|
+
tracer.in_span(
|
24
|
+
env['PATH_INFO'],
|
25
|
+
attributes: { 'http.method' => env['REQUEST_METHOD'],
|
26
|
+
'http.url' => env['PATH_INFO'] },
|
27
|
+
kind: :server
|
28
|
+
) do |span|
|
29
|
+
@app.call(env).tap { |resp| trace_response(span, env, resp) }
|
30
|
+
end
|
31
|
+
end
|
38
32
|
end
|
39
33
|
|
34
|
+
private
|
35
|
+
|
40
36
|
def tracer
|
41
37
|
OpenTelemetry::Instrumentation::Sinatra::Instrumentation.instance.tracer
|
42
38
|
end
|
@@ -45,10 +41,9 @@ module OpenTelemetry
|
|
45
41
|
status, _headers, _response_body = resp
|
46
42
|
|
47
43
|
span.set_attribute('http.status_code', status)
|
48
|
-
span.set_attribute('http.status_text', ::Rack::Utils::HTTP_STATUS_CODES[status])
|
49
44
|
span.set_attribute('http.route', env['sinatra.route'].split.last) if env['sinatra.route']
|
50
45
|
span.name = env['sinatra.route'] if env['sinatra.route']
|
51
|
-
span.status = OpenTelemetry::Trace::Status.
|
46
|
+
span.status = OpenTelemetry::Trace::Status.error unless (100..399).include?(status.to_i)
|
52
47
|
end
|
53
48
|
end
|
54
49
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-instrumentation-sinatra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenTelemetry Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -16,14 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 1.0.0.rc2
|
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.rc2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: opentelemetry-instrumentation-base
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.18.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.18.1
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: appraisal
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +86,14 @@ dependencies:
|
|
72
86
|
requirements:
|
73
87
|
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
89
|
+
version: 1.0.0.rc1
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
96
|
+
version: 1.0.0.rc1
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: rack-test
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,10 +214,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
200
214
|
licenses:
|
201
215
|
- Apache-2.0
|
202
216
|
metadata:
|
203
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-sinatra/v0.
|
217
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-sinatra/v0.19.0/file.CHANGELOG.html
|
204
218
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/sinatra
|
205
219
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
206
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-sinatra/v0.
|
220
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-sinatra/v0.19.0
|
207
221
|
post_install_message:
|
208
222
|
rdoc_options: []
|
209
223
|
require_paths:
|
@@ -219,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
233
|
- !ruby/object:Gem::Version
|
220
234
|
version: '0'
|
221
235
|
requirements: []
|
222
|
-
rubygems_version: 3.1.
|
236
|
+
rubygems_version: 3.1.6
|
223
237
|
signing_key:
|
224
238
|
specification_version: 4
|
225
239
|
summary: Sinatra instrumentation for the OpenTelemetry framework
|