Skip to content

Commit

Permalink
fix: correct timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
stuft2 committed Aug 16, 2022
1 parent bb6cc4f commit f7976ca
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Binary file modified cloudwatch2humio.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion lambda/src/metric_ingester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function formatHumioEvents (metrics: GetMetricDataCommandOutput, configurations:
// Create Humio event based on each extracted timestamp.
for (const result of metrics.MetricDataResults ?? []) {
(result.Timestamps ?? []).forEach((ts, i) => {
const timestamp = dayjs(ts).utc().toISOString()
const timestamp = dayjs(ts).toISOString()
humioEvents.push({
timestamp,
attributes: {
Expand Down
2 changes: 1 addition & 1 deletion lambda/src/metric_statistics_ingester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function formatHumioEvents (metrics: GetMetricStatisticsCommandOutput, parameter

// Create one Humio event per datapoint/timestamp
;(metrics.Datapoints ?? []).forEach((datapoint) => {
const timestamp = dayjs(datapoint.Timestamp).utc().toISOString()
const timestamp = dayjs(datapoint.Timestamp).toISOString()
const event = {
timestamp,
attributes: {
Expand Down

0 comments on commit f7976ca

Please sign in to comment.