File tree 2 files changed +3
-17
lines changed
2 files changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -121,15 +121,15 @@ export const fullPayload = JSON.parse(`{
121
121
"eventId": "1486080145623867projects/analytics-integration-fd82a/events/i_made_this_upproviders/google.firebase.analytics/eventTypes/event.sendprojects/f949d1bb9ef782579-tp/topics/cloud-functions-u54ejabpzs4prfjh7433eklhae",
122
122
"eventType": "providers/google.firebase.analytics/eventTypes/event.send",
123
123
"resource": "projects/analytics-integration-fd82a/events/i_made_this_up",
124
- "timestamp": "1969-12-31T23 :59:59.986371388Z"
124
+ "timestamp": "2017-03-29T23 :59:59.986371388Z"
125
125
}` ) ;
126
126
127
127
// The event data that we expect would be constructed if the payload above were to arrive.
128
128
export const fullEvent : Event < AnalyticsEvent > = {
129
129
eventId : '1486080145623867projects/analytics-integration-fd82a/events/i_made_this_upproviders/google.firebase.analytics/eventTypes/event.sendprojects/f949d1bb9ef782579-tp/topics/cloud-functions-u54ejabpzs4prfjh7433eklhae' ,
130
130
eventType : 'providers/google.firebase.analytics/eventTypes/event.send' ,
131
131
resource : 'projects/analytics-integration-fd82a/events/i_made_this_up' ,
132
- timestamp : '2017-02-02T23:06:26.124Z ' ,
132
+ timestamp : '2017-03-29T23:59:59.986371388Z ' ,
133
133
params : { } ,
134
134
data : {
135
135
reportingDate : '20170202' ,
Original file line number Diff line number Diff line change @@ -65,23 +65,9 @@ export class AnalyticsEventBuilder {
65
65
const dataConstructor = ( raw : Event < any > ) => {
66
66
return new AnalyticsEvent ( raw . data ) ;
67
67
} ;
68
- const attemptTimestampFix = ( event : Event < AnalyticsEvent > ) => {
69
- // This is a temporary shim, to mask an issue in which Analytics events may carry an
70
- // incorrect Event.timestamp. Often there's a correct timestamp present in
71
- // Event.data.logTime, so until the production backend sends correct top-level timestamps
72
- // we can pull a timestamp from there.
73
- // BUG(36001921).
74
- if ( event . timestamp && ( event . timestamp . substr ( 0 , 4 ) === '1969' || event . timestamp . substr ( 0 , 4 ) === '1970' ) ) {
75
- event . timestamp = undefined ; // If we don't have a good timestamp, prefer no timestamp at all.
76
- if ( event . data && event . data . logTime ) {
77
- event . timestamp = event . data . logTime ;
78
- }
79
- }
80
- return handler ( event ) ;
81
- } ;
82
68
return makeCloudFunction ( {
83
69
provider,
84
- handler : attemptTimestampFix ,
70
+ handler,
85
71
eventType : 'event.log' ,
86
72
resource : this . resource ,
87
73
dataConstructor,
You can’t perform that action at this time.
0 commit comments