Skip to content

Instantly share code, notes, and snippets.

View dannyk81's full-sized avatar

Danny Kulchinsky dannyk81

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dannyk81 on github.
  • I am dannyk (https://keybase.io/dannyk) on keybase.
  • I have a public key ASBBK8Cw44RqJkn-MJXiTn91pRMPDV34YXi46Wp1VV9nxAo

To claim this, I am signing this object:

@dannyk81
dannyk81 / fluentd.conf
Created August 8, 2017 19:12
Fluentd v0.12 converting long epoch (milliseconds) to Date Time string with milleseconds precision
# Consider the record contains the time stamp of the event in a record key called 'timestamp'
# e.g. "timestamp": "1502217900063"
# The below will add a new record called `formatted_date` that will include an iso8601(3) formatted date string with milliseconds,
# the trick was to extract from the long epoch value the seconds & remaining milliseconds and convert it to microseconds since Time.at() accepts:
# `Time.at(seconds, microseconds_with_frac) → time`
<filter tag.*>
@type record_modifier
<record>