fluent-plugin-dynatrace 0.1.6 → 0.2.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: 3ed15669d3529fd2d869b4e620a38caee00310b2cc5a56bd3ea5d879b3e0a61a
4
- data.tar.gz: a4cb4ba89820f96e07fc9b0f96bc9716d97c64d86987d6a7eee9e54bc8a69936
3
+ metadata.gz: b25942088d9fc1e97ab3e9c5ee2cfec5baca12f39744bb09012e5f5238522dd9
4
+ data.tar.gz: d942be9cfa1215746fcf513a629d09986d5996ba8a0401622b6d0cf5cdf93cf2
5
5
  SHA512:
6
- metadata.gz: 5d610192bd5c57739f5fb3a0cc37d4e2ab277a08b049ebf719051b624e755f67fc46392758042de0982b56bbd5ca2c821d88e9a8d481370899e7b0d20cb8f907
7
- data.tar.gz: 232945ad4cc7cc31f01599700a465868b1e97159371b7a09a4ad8abac7347ae4ccdb8460831eea6c0ad632d2d4dd18defe951bc7f806a95a30263f369024dc4b
6
+ metadata.gz: 63ca8a3ab6b1e22d7d6e4c29bdcba35e33b145b494f6e736b5cd117feb5af22e647262d0477d9eb72ab316550af2a1469cc7459f0730f3a36fceee79d4834cf0
7
+ data.tar.gz: 9c9532efc4215183ee632ea51a30c27b630b5a239b9fc548e499446fb2dd819ec6c00753e0b3756d435b8625148b59fa1e2c05ad3579d3de5b909fe1c92aa4f7
@@ -20,7 +20,7 @@ module Fluent
20
20
  class DynatraceOutputConstants
21
21
  # The version of the Dynatrace output plugin
22
22
  def self.version
23
- '0.1.6'
23
+ '0.2.0'
24
24
  end
25
25
  end
26
26
  end
@@ -64,7 +64,10 @@ module Fluent
64
64
  compat_parameters_convert(conf, :inject)
65
65
  super
66
66
 
67
- @uri = URI.parse(@active_gate_url)
67
+ raise Fluent::ConfigError, 'api_token is empty' if @api_token.empty?
68
+
69
+ @uri = parse_and_validate_uri(@active_gate_url)
70
+
68
71
  @agent = Net::HTTP.new(@uri.host, @uri.port)
69
72
 
70
73
  return unless uri.scheme == 'https'
@@ -173,6 +176,22 @@ module Fluent
173
176
 
174
177
  "failed to request #{uri} (#{res_summary})"
175
178
  end
179
+
180
+ #############################################
181
+
182
+ private
183
+
184
+ def parse_and_validate_uri(uri_string)
185
+ raise Fluent::ConfigError, 'active_gate_url is empty' if uri_string.empty?
186
+
187
+ uri = URI.parse(uri_string)
188
+ raise Fluent::ConfigError, 'active_gate_url scheme must be http or https' unless
189
+ %w[http https].include?(uri.scheme)
190
+
191
+ raise Fluent::ConfigError, 'active_gate_url must include an authority' if uri.host.nil?
192
+
193
+ uri
194
+ end
176
195
  end
177
196
  end
178
197
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-dynatrace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dynatrace Open Source Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-02 00:00:00.000000000 Z
11
+ date: 2022-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd