opentelemetry-instrumentation-sinatra 0.5.0 → 0.9.0

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: 463755e72b6917628c2b7bbc02599b2da739e76b874c685bfcb33181a0aa984d
4
- data.tar.gz: c5cf332769f65063492782c97455241679de5880374f80bdd4795a8066892fdb
3
+ metadata.gz: 85383532eea8f7f5350066b3dec5c319b3645c31f7c82bf036db5c6ebc7ff79c
4
+ data.tar.gz: ba9aef6b07908a0080b7d545b7c4fd5b6d624f5fc4488461816d93cb6385c545
5
5
  SHA512:
6
- metadata.gz: 45498e852be6777281d07fa7d8f3436e832d82156d34d38abb0e546978e8a172ea7a5d3c5acb9e45da51ded0988e136c2d68ad51ca15748f7317816e5200d649
7
- data.tar.gz: 5f786765651163159d0527d0697a14e2b353aa77ccd1d2730bf8374f09d06eac7d25eb5e5575322d8a449105427f78488264d657b74de900a605f34799c1f3ff
6
+ metadata.gz: b2748f4e4036dfbdb41b8d28978aaaf65f7bd3d292c78e77487468182f780c09c3ca3fe05934b669dc75262c39c1ee68805c0d20c607c12911bf4efb3e288bb1
7
+ data.tar.gz: 1bc9735582dbf35dcf55c5a1e3ea7678d6329ad8e54ecd69c82cae3ee15f5caa198e157ab095c3705497ed213d647dcf06b9f82cbe1eae376ced9d57454acdb2
@@ -0,0 +1,9 @@
1
+ --no-private
2
+ --title=OpenTelemetry Sinatra Instrumentation
3
+ --markup=markdown
4
+ --main=README.md
5
+ ./lib/opentelemetry/instrumentation/**/*.rb
6
+ ./lib/opentelemetry/instrumentation.rb
7
+ -
8
+ README.md
9
+ CHANGELOG.md
@@ -0,0 +1,26 @@
1
+ # Release History: opentelemetry-instrumentation-sinatra
2
+
3
+ ### v0.9.0 / 2020-11-27
4
+
5
+ * BREAKING CHANGE: Add timeout for force_flush and shutdown
6
+
7
+ * ADDED: Add timeout for force_flush and shutdown
8
+
9
+ ### v0.8.0 / 2020-10-27
10
+
11
+ * BREAKING CHANGE: Remove 'canonical' from status codes
12
+
13
+ * FIXED: Remove 'canonical' from status codes
14
+
15
+ ### v0.7.1 / 2020-10-08
16
+
17
+ * FIXED: Set span name to sinatra.route
18
+
19
+ ### v0.7.0 / 2020-10-07
20
+
21
+ * FIXED: Default to sinatra.route for span name
22
+ * DOCS: Standardize toplevel docs structure and readme
23
+
24
+ ### v0.6.0 / 2020-09-10
25
+
26
+ * (No significant changes)
@@ -0,0 +1,60 @@
1
+ # Sinatra Instrumentation
2
+
3
+ The Sinatra instrumentation is a community-maintained instrumentation for the [Sinatra][sinatra-home] Web Framework.
4
+
5
+ ## How do I get started?
6
+
7
+ Install the gem using:
8
+
9
+ ```
10
+ gem install opentelemetry-instrumentation-sinatra
11
+ ```
12
+
13
+ Or, if you use [bundler][bundler-home], include `opentelemetry-instrumentation-sinatra` to your `Gemfile`.
14
+
15
+ ## Usage
16
+
17
+ To install the instrumentation, add the gem to your Gemfile:
18
+
19
+ ```ruby
20
+ gem 'opentelemetry-instrumentation-sinatra'
21
+ ```
22
+
23
+ Then call `use` with the name of the instrumentation:
24
+
25
+ ```ruby
26
+ require 'rubygems'
27
+ require 'bundler/setup'
28
+
29
+ Bundler.require
30
+
31
+ OpenTelemetry::SDK.configure do |c|
32
+ c.use 'OpenTelemetry::Instrumentation::Sinatra'
33
+ end
34
+ ```
35
+
36
+ Alternatively, you can also call `use_all` to install all the available instrumentation.
37
+
38
+ ```ruby
39
+ OpenTelemetry::SDK.configure do |c|
40
+ c.use_all
41
+ end
42
+ ```
43
+
44
+ ## How can I get involved?
45
+
46
+ The `opentelemetry-instrumentation-sinatra` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
47
+
48
+ The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us on our [gitter channel][ruby-gitter] 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
+
50
+ ## License
51
+
52
+ The `opentelemetry-instrumentation-sinatra` gem is distributed under the Apache 2.0 license. See [LICENSE][license-github] for more information.
53
+
54
+ [sinatra-home]: http://sinatrarb.com
55
+ [bundler-home]: https://bundler.io
56
+ [repo-github]: https://github.com/open-telemetry/opentelemetry-ruby
57
+ [license-github]: https://github.com/open-telemetry/opentelemetry-ruby/blob/master/LICENSE
58
+ [ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
59
+ [community-meetings]: https://github.com/open-telemetry/community#community-meetings
60
+ [ruby-gitter]: https://gitter.im/open-telemetry/opentelemetry-ruby
@@ -4,6 +4,12 @@
4
4
  #
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
 
7
+ # OpenTelemetry is an open source observability framework, providing a
8
+ # general-purpose API, SDK, and related tools required for the instrumentation
9
+ # of cloud-native software, frameworks, and libraries.
10
+ #
11
+ # The OpenTelemetry module provides global accessors for telemetry objects.
12
+ # See the documentation for the `opentelemetry-api` gem for details.
7
13
  module OpenTelemetry
8
14
  # "Instrumentation" are specified by
9
15
  # https://github.com/open-telemetry/opentelemetry-specification/blob/784635d01d8690c8f5fcd1f55bdbc8a13cf2f4f2/specification/glossary.md#instrumentation-library
@@ -20,7 +20,7 @@ module OpenTelemetry
20
20
  attributes: { 'http.method' => env['REQUEST_METHOD'],
21
21
  'http.url' => env['PATH_INFO'] },
22
22
  kind: :server,
23
- with_parent_context: parent_context(env)
23
+ with_parent: parent_context(env)
24
24
  ) do |span|
25
25
  app.call(env).tap { |resp| trace_response(span, env, resp) }
26
26
  end
@@ -44,6 +44,7 @@ module OpenTelemetry
44
44
  span.set_attribute('http.status_code', status)
45
45
  span.set_attribute('http.status_text', ::Rack::Utils::HTTP_STATUS_CODES[status])
46
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']
47
48
  span.status = OpenTelemetry::Trace::Status.http_to_status(status)
48
49
  end
49
50
  end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Sinatra
10
- VERSION = '0.5.0'
10
+ VERSION = '0.9.0'
11
11
  end
12
12
  end
13
13
  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.5.0
4
+ version: 0.9.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: 2020-07-17 00:00:00.000000000 Z
11
+ date: 2020-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.5.0
19
+ version: 0.9.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.5.0
26
+ version: 0.9.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: appraisal
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -185,7 +185,10 @@ executables: []
185
185
  extensions: []
186
186
  extra_rdoc_files: []
187
187
  files:
188
+ - ".yardopts"
189
+ - CHANGELOG.md
188
190
  - LICENSE
191
+ - README.md
189
192
  - lib/opentelemetry-instrumentation-sinatra.rb
190
193
  - lib/opentelemetry/instrumentation.rb
191
194
  - lib/opentelemetry/instrumentation/sinatra.rb
@@ -196,7 +199,11 @@ files:
196
199
  homepage: https://github.com/open-telemetry/opentelemetry-ruby
197
200
  licenses:
198
201
  - Apache-2.0
199
- metadata: {}
202
+ metadata:
203
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-sinatra/v0.9.0/file.CHANGELOG.html
204
+ source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/master/instrumentation/sinatra
205
+ 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.9.0
200
207
  post_install_message:
201
208
  rdoc_options: []
202
209
  require_paths:
@@ -212,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
219
  - !ruby/object:Gem::Version
213
220
  version: '0'
214
221
  requirements: []
215
- rubygems_version: 3.0.3
222
+ rubygems_version: 3.1.4
216
223
  signing_key:
217
224
  specification_version: 4
218
225
  summary: Sinatra instrumentation for the OpenTelemetry framework