uptrace 0.16.1 → 0.16.2

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: 3e04833f5ff0015d78af4774cc49272db2c0c10e3cd93ce5acbe6cfc3e9e3772
4
- data.tar.gz: f027f68acd8f95b550bdbde26322307420f8e833447aff1a268d06ac57b00910
3
+ metadata.gz: 6e560d02dc7fff00fe1417273235f621093fddf1dd2b89fec8eb26f25ec77137
4
+ data.tar.gz: f4425d572581c3b8863891e7f1df56c1acc2a8df19e96d56c5fadc138b147fd6
5
5
  SHA512:
6
- metadata.gz: 1ef5879252c95a7ca008f042061ecc1d674f36822739e8f17bb19ae2385ef1f6cdc02bc2885edf3538da13d3f9d5f9feca849c3f553381de4b393f55aedf570d
7
- data.tar.gz: ef03b0f10c6d992d81f5d64c0df4d9eb8c9590399c61fe9f3b9b8cc166492309940c2e2d6479f2366a9137d111caae6ce16b6c9f53c4f89f176b532345d94e2f
6
+ metadata.gz: f9d888b255f9b97deb19d115bfc0a16eca449a79df08c6262557be002f98460a3ba1db188caf5cf2266e7cbbe92aefd5fec1567a7c398ddcd04021f4315324e2
7
+ data.tar.gz: d831ec671858212f78caeadba72689d0735b0c85579af3bcec992e5df83c62d40af0a447dea647f0a28c993f277f8e3ecfbaa9aa9ef348734912523ecc947f26
data/CHANGELOG.md ADDED
@@ -0,0 +1,6 @@
1
+ # Changelog
2
+
3
+ ## v0.16.2 - 2021-03-28
4
+
5
+ - Updated OpenTelemetry to
6
+ [v0.16.0](https://github.com/open-telemetry/opentelemetry-ruby/blob/main/api/CHANGELOG.md#v0160--2021-03-17).
data/lib/uptrace.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'logger'
4
- require 'opentelemetry'
5
4
 
6
5
  # Uptrace provides Uptrace exporters for OpenTelemetry.
7
6
  module Uptrace
@@ -24,26 +23,17 @@ module Uptrace
24
23
  end
25
24
 
26
25
  # ConfigureOpentelemetry configures OpenTelemetry to export data to Uptrace.
27
- # By default it:
28
- # - creates tracer provider;
29
- # - registers Uptrace span exporter;
30
- # - sets tracecontext + baggage composite context propagator.
26
+ # Specifically it configures and registers Uptrace span exporter.
31
27
  #
32
- # @param [OpenTelemetry::SDK::Configurator] c
33
- def configure_opentelemetry(c, dsn: '')
34
- @client = Client.new(dsn: dsn) unless dsn.empty?
35
-
36
- c.add_span_processor(client.span_processor) unless client.disabled?
37
-
38
- if OpenTelemetry.propagation.nil?
39
- c.injectors = [
40
- OpenTelemetry::Trace::Propagation::TraceContext.text_map_injector,
41
- OpenTelemetry::Baggage::Propagation.text_map_injector
42
- ]
43
- c.extractors = [
44
- OpenTelemetry::Trace::Propagation::TraceContext.text_map_extractor,
45
- OpenTelemetry::Baggage::Propagation.text_map_extractor
46
- ]
28
+ # @param [optional String] dsn
29
+ # @yieldparam [OpenTelemetry::SDK::Configurator] c Yields a configurator to the
30
+ # provided block
31
+ def configure_opentelemetry(dsn: '')
32
+ OpenTelemetry::SDK.configure do |c|
33
+ @client = Client.new(dsn: dsn) unless dsn.empty?
34
+ c.add_span_processor(client.span_processor) unless client.disabled?
35
+
36
+ yield c if block_given?
47
37
  end
48
38
  end
49
39
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uptrace
4
- VERSION = '0.16.1'
4
+ VERSION = '0.16.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uptrace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.1
4
+ version: 0.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uptrace Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-23 00:00:00.000000000 Z
11
+ date: 2021-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -172,6 +172,7 @@ extensions: []
172
172
  extra_rdoc_files: []
173
173
  files:
174
174
  - ".yardopts"
175
+ - CHANGELOG.md
175
176
  - LICENSE
176
177
  - README.md
177
178
  - RELEASE.md