inspec-reporter-honeycomb 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/inspec-reporter-honeycomb/reporter.rb +5 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 385f08aea723a5e126555cd71daf4a211cfff2e1cadbf85aadc35fafc303ee3e
|
4
|
+
data.tar.gz: ef0bea80dd6c07adb439361f6fdc39ca050fec02fe9579c75455432d19bdc97f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b45fc20ddf804896f6233ae702e2a0b88bf92517dd64695aa6d0f7998b893d473b29fd6c64da9b21b1cfef7b74122e49dabf5bea0d2dc3670c0203d239cff4e0
|
7
|
+
data.tar.gz: 7231814e770c1cde25c2e252b2aaeeac679438ffe2697771763475dca1a3064772c2a946f0e9a145456d90dc77c7b6aaabbaa36b96bbff5e76b5f43d3bfe79a0
|
@@ -1,7 +1,8 @@
|
|
1
1
|
|
2
2
|
require 'inspec/plugin/v2'
|
3
3
|
require 'json'
|
4
|
-
require
|
4
|
+
require 'socket'
|
5
|
+
require 'securerandom' unless defined?(SecureRandom)
|
5
6
|
|
6
7
|
module InspecPlugins::HoneycombReporter
|
7
8
|
# Reporter Plugin Class
|
@@ -15,7 +16,7 @@ module InspecPlugins::HoneycombReporter
|
|
15
16
|
end
|
16
17
|
|
17
18
|
def report
|
18
|
-
report = Inspec::Reporters::
|
19
|
+
report = Inspec::Reporters::JsonAutomate.new(@config).report
|
19
20
|
trace_id = SecureRandom.hex(16)
|
20
21
|
root_span_id = SecureRandom.hex(8)
|
21
22
|
trace_batch = []
|
@@ -28,6 +29,7 @@ module InspecPlugins::HoneycombReporter
|
|
28
29
|
'platform.name' => report[:platform][:name],
|
29
30
|
'duration' => report[:statistics][:duration]*1000,
|
30
31
|
'version' => report[:version],
|
32
|
+
'hostname' => Socket.gethostname,
|
31
33
|
}
|
32
34
|
|
33
35
|
trace_batch << root_span_data
|
@@ -116,6 +118,7 @@ module InspecPlugins::HoneycombReporter
|
|
116
118
|
'type' => args[:type],
|
117
119
|
'name' => args[:name],
|
118
120
|
'duration' => time_in_ms,
|
121
|
+
'hostname' => Socket.gethostname,
|
119
122
|
}
|
120
123
|
|
121
124
|
args[:data].each do |k,v|
|