logstash-output-dynatrace 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/logstash/outputs/dynatrace.rb +6 -3
- data/spec/outputs/dynatrace_spec.rb +13 -0
- data/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06c22415ca3c16b7214c6aca478edd757db1302dff08fd706e80402bd3627392
|
4
|
+
data.tar.gz: af603917cd20c72d12d98add8409e1d171e7ca2edc632d42378f8a54f5a018a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c5b60e14c175f9e7937c79131f872768034e191df4c12e9c58b88abcb190208148fb77d76c2d93e42aff8a2599e1b89621f165740910b0ee0561273f529fcc4
|
7
|
+
data.tar.gz: ad04bc45337935f619619bef6765dee1335285fc7fa705147bfdce7888f88158c829f62ad1a84f4a26c729710292143ffd8efa217954ce5c1bc9f4c458a64abe
|
data/CHANGELOG.md
CHANGED
@@ -19,7 +19,7 @@ require 'logstash/outputs/base'
|
|
19
19
|
require 'logstash/json'
|
20
20
|
|
21
21
|
MAX_RETRIES = 5
|
22
|
-
PLUGIN_VERSION = '0.3.
|
22
|
+
PLUGIN_VERSION = '0.3.1'
|
23
23
|
|
24
24
|
module LogStash
|
25
25
|
module Outputs
|
@@ -36,7 +36,7 @@ module LogStash
|
|
36
36
|
config :ingest_endpoint_url, validate: :uri, required: true
|
37
37
|
|
38
38
|
# The API token to use to authenticate requests to the log ingestion endpoint. Must have `logs.ingest` (Ingest Logs) scope.
|
39
|
-
config :api_key, validate: :
|
39
|
+
config :api_key, validate: :password, required: true
|
40
40
|
|
41
41
|
# Disable SSL validation by setting :verify_mode OpenSSL::SSL::VERIFY_NONE
|
42
42
|
config :ssl_verify_none, validate: :boolean, default: false
|
@@ -63,7 +63,7 @@ module LogStash
|
|
63
63
|
{
|
64
64
|
'User-Agent' => "logstash-output-dynatrace/#{PLUGIN_VERSION}",
|
65
65
|
'Content-Type' => 'application/json; charset=utf-8',
|
66
|
-
'Authorization' => "Api-Token #{@api_key}"
|
66
|
+
'Authorization' => "Api-Token #{@api_key.value}"
|
67
67
|
}
|
68
68
|
end
|
69
69
|
|
@@ -105,6 +105,9 @@ module LogStash
|
|
105
105
|
@logger.error("Failed to export logs to Dynatrace.")
|
106
106
|
return
|
107
107
|
end
|
108
|
+
rescue StandardError => e
|
109
|
+
@logger.error("Unknown error raised", :error => e.inspect)
|
110
|
+
raise e
|
108
111
|
end
|
109
112
|
end
|
110
113
|
|
@@ -135,4 +135,17 @@ describe LogStash::Outputs::Dynatrace do
|
|
135
135
|
subject.multi_receive(events)
|
136
136
|
end
|
137
137
|
end
|
138
|
+
|
139
|
+
context 'when an unknown error occurs' do
|
140
|
+
it 'logs and re-raises the error' do
|
141
|
+
class BadEvents
|
142
|
+
def length
|
143
|
+
1
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
expect(subject.logger).to receive(:error)
|
148
|
+
expect { subject.multi_receive(BadEvents.new) }.to raise_error(StandardError)
|
149
|
+
end
|
150
|
+
end
|
138
151
|
end
|
data/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-dynatrace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
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: 2022-10-
|
11
|
+
date: 2022-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-codec-json
|