eventhub-components 0.4.0 → 0.4.1

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: 62b597731a526635002f05d2c12bd7a47992bad26ec2718e0fc5cfa9048ed856
4
- data.tar.gz: a032f4272f7a1bd326c6ae62784d7ff68e5c1cd64af67bddac750f1770d3bed0
3
+ metadata.gz: d45be3a6617176a8ef103375ab9f9dd890c03d2d42b18b7807f70dacf8b0ca77
4
+ data.tar.gz: a37a882428f4da50230fbc6cd50eff5bcfd92a84ca20339cee1de5afcf55abed
5
5
  SHA512:
6
- metadata.gz: '09dd455c9ea23edb7371b50973cb599cbc5f45c876df95799536fe7c2d36a6db7cf55669b44734743489453d1d247847a0b9cf62617a87781c16a833c2f512d6'
7
- data.tar.gz: 47071f03bfb054bc6b58df26b71d8a57502a0ed2e2e5b7ad30011f5eb8d205cbf9b8adbfeed67d22840cdda0f6a6d7c7c89fb4d3a0fdd0ded6ef2ae57127ef32
6
+ metadata.gz: ad92bc759f7269ac1aed64f7e326e795033947495d3b85cefe135896f18d3fd4712cc9ac10e84d92c89a74de81c0bed3fa0a2e79fc8726cce1c6a2fa22a0d8c8
7
+ data.tar.gz: e84d5cc265c6de87df7ab0de29b5f975f5008a2cfe1b2a9a57a8185f169f0c33502983e0744e1f6dc6622b8b76f0d66f681351d0dc7cd2ac50a48965355d4e62
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.4.1 / 2024-07-24
2
+
3
+ * Have higher resolution timestamps in json output. 6 digits of fractional second. Exp {"time":"2024-07-24T14:02:47.102394+02:00"}
4
+
1
5
  ## 0.4.0 / 2024-07-24
2
6
 
3
7
  * Customized cloud stdout logstash logger
@@ -24,11 +24,14 @@ class EventHub::Components::Logger
24
24
  LogStashLogger.configure do |config|
25
25
  config.customize_event do |event|
26
26
  # renaming default fields to be eventhub cloud compatible
27
- event["time"] = event.remove("@timestamp")
27
+ event["time"] = event.timestamp.iso8601(6)
28
28
  event["msg"] = event.remove("message")
29
29
  event["level"] = event.remove("severity")
30
- event["host"] = event.remove("host") # reordering
31
- event.remove("@version") # not needed
30
+ event["host"] = event.remove("host") # for reordering
31
+
32
+ # to be removed or replaced
33
+ event.remove("@version")
34
+ event.remove("@timestamp")
32
35
 
33
36
  # additional fields
34
37
  event["app"] = processor_name
@@ -1,5 +1,5 @@
1
1
  module EventHub
2
2
  module Components
3
- VERSION = "0.4.0"
3
+ VERSION = "0.4.1"
4
4
  end
5
5
  end
@@ -62,7 +62,7 @@ RSpec.describe EventHub::Components::StructuredDataLogger do
62
62
  end
63
63
 
64
64
  it "logs json to standard output" do
65
- pattern = /\{"time":"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{2}:\d{2}","msg":"hello","level":"(INFO|WARN|ERROR|DEBUG|FATAL)","host":"[^\"]+","app":"processor","env":"development"\}/
65
+ pattern = /\{"time":"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}\+\d{2}:\d{2}","msg":"hello","level":"(INFO|WARN|ERROR|DEBUG|FATAL)","host":"[^\"]+","app":"processor","env":"development"\}/
66
66
 
67
67
  logger.add_device(EventHub::Components::Logger.logstash_cloud("processor", "development"))
68
68
  expect { logger.info("hello") }.to output(pattern).to_stdout_from_any_process
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventhub-components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steiner, Thomas