tobox 0.1.4 → 0.1.6

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: 97779e8a66a116f0b0ae5bd22866284009c1cfe2e94a6130396cfcab1da08ef2
4
- data.tar.gz: 917ad9d5a033c815516ab4d7c0ff28c6d21fac8e5de39dc7fa106122d8e42e2c
3
+ metadata.gz: 9e47d46ec5d5f20a122b8667f00227517002ea4503348a253e3e16cd6cabe281
4
+ data.tar.gz: 93fbcdbd7280e21249d4f798b7d86dac70cc8ff9847873d6a8368bda371ccf4d
5
5
  SHA512:
6
- metadata.gz: '092313ee498b233a99c4badfb435bc644d2cc1910332ed7814f02e2fad30f626af443706e10021360c4da96167ba136338ec181000cacc03a3940f217f179e4d'
7
- data.tar.gz: bda1b2ca32edd8cd41b1f0b81846bdee802bf383d859de95cf4f0e330187435c34d256ffc9e1dfeeb4c6c818b6fb44b0557215775d0d9768ced1ea77533cdf1b
6
+ metadata.gz: bc3f385c64603c6a9b8f95f32e9c38d2974080b0df50a6530505c3d5438d3d60a3ecf66b06200beedce9de23838f0e6dbb6e2aca65233180107e362538905853
7
+ data.tar.gz: 5cb0d36a97a6bc173dfbfe01fc834a483848faf4157482b982551ffeb1eec3129dccd59b83cf65d9eab034c4560a7809699557a62dece8046f1944e55bcd9ee4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.6] - 2002-10-06
4
+
5
+ ### Bugfixes
6
+
7
+ Allow passing datadog options, initialize tracing from plugin.
8
+
9
+ ## [0.1.5] - 2002-10-06
10
+
11
+ ### Bugfixes
12
+
13
+ Fixing datadog plugin name.
14
+
3
15
  ## [0.1.4] - 2002-10-06
4
16
 
5
17
  ### Bugfixes
@@ -85,7 +85,7 @@ module Tobox
85
85
  self
86
86
  end
87
87
 
88
- def plugin(plugin, _options = nil, &block)
88
+ def plugin(plugin, **options, &block)
89
89
  raise Error, "Cannot add a plugin to a frozen config" if frozen?
90
90
 
91
91
  plugin = Plugins.load_plugin(plugin) if plugin.is_a?(Symbol)
@@ -93,11 +93,11 @@ module Tobox
93
93
  return if @plugins.include?(plugin)
94
94
 
95
95
  @plugins << plugin
96
- plugin.load_dependencies(self, &block) if plugin.respond_to?(:load_dependencies)
96
+ plugin.load_dependencies(self, **options, &block) if plugin.respond_to?(:load_dependencies)
97
97
 
98
98
  extend(plugin::ConfigurationMethods) if defined?(plugin::ConfigurationMethods)
99
99
 
100
- plugin.configure(self, &block) if plugin.respond_to?(:configure)
100
+ plugin.configure(self, **options, &block) if plugin.respond_to?(:configure)
101
101
  end
102
102
 
103
103
  def freeze
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "datadog/tracing/contrib"
3
4
  require "datadog/tracing/contrib/configuration/settings"
4
5
  require "datadog/tracing/span_operation"
5
6
 
@@ -88,11 +88,15 @@ module Tobox
88
88
  require "uri"
89
89
  end
90
90
 
91
- def configure(config)
91
+ def configure(config, **datadog_options, &blk)
92
92
  event_handler = EventHandler.new(config)
93
93
  config.on_before_event(&event_handler.method(:on_start))
94
94
  config.on_after_event(&event_handler.method(:on_finish))
95
95
  config.on_error_event(&event_handler.method(:on_error))
96
+ ::Datadog.configure do |c|
97
+ c.tracing.instrument :tobox, datadog_options
98
+ yield(c) if blk
99
+ end
96
100
  end
97
101
  end
98
102
  end
data/lib/tobox/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tobox
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tobox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - HoneyryderChuck