From ae7dab50360063590da5cd84204142c6437b7fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Ak=C4=B1n?= Date: Thu, 6 Jul 2023 21:14:59 +0300 Subject: [PATCH] Revert "@timestamp handling from https://github.com/opsgenie/kubernetes-event-exporter/pull/165 (#92)" This reverts commit c572daa48aecfb3f07b7ea3d0d2b66920c03323a. --- pkg/kube/event.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/kube/event.go b/pkg/kube/event.go index 3cdeec3f..6a8d3986 100644 --- a/pkg/kube/event.go +++ b/pkg/kube/event.go @@ -12,7 +12,6 @@ type EnhancedEvent struct { corev1.Event `json:",inline"` ClusterName string `json:"clusterName"` InvolvedObject EnhancedObjectReference `json:"involvedObject"` - Timestamp time.Time `json:"@timestamp"` } // DeDot replaces all dots in the labels and annotations with underscores. This is required for example in the @@ -48,7 +47,6 @@ type EnhancedObjectReference struct { // ToJSON does not return an error because we are %99 confident it is JSON serializable. // TODO(makin) Is it a bad practice? It's open to discussion. func (e *EnhancedEvent) ToJSON() []byte { - e.Timestamp = e.FirstTimestamp.Time b, _ := json.Marshal(e) return b }