You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PluginEvent object used by plugins for passing data has this structure:
export interface PluginEvent {
distinct_id: string
ip: string | null
site_url: string
team_id: number
now: string
event: string
sent_at?: string
properties?: Properties
timestamp?: string
offset?: number
/** Person properties update (override). */
$set?: Properties
/** Person properties update (if not set). */
$set_once?: Properties
/** The offset of the Kafka message this event was passed in (EE pipeline-only). */
kafka_offset?: string
/** The assigned UUIDT of the event (EE pipeline-only). */
uuid?: string
}
The field timestamp seems to be the key temporal value for plugin event data. However when plugins run on an event, this value is undefined. Only later, in processEvent do we parse the timestamp and use it to store the event.
This has some implications. For example the BigQuery Export Plugin needs to manually do timestamp || now || sent_at. That's too much for a plugin to know. Same with many other plugins. I ran into this myself with the session tracker plugin and was surprised to find this timestamp to be completely empty.
Thus I propose that the PluginEvent we send to plugins is the most sanitized version available. This means possibly even removing or blanking the now, sent_at, offset fields.
This also means removing $set (and $set_once and maybe $increment?) from properties and putting it in the core of the event.
The text was updated successfully, but these errors were encountered:
This issue hasn't seen activity in two years! If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in two weeks.
The
PluginEvent
object used by plugins for passing data has this structure:The field
timestamp
seems to be the key temporal value for plugin event data. However when plugins run on an event, this value isundefined
. Only later, inprocessEvent
do we parse the timestamp and use it to store the event.This has some implications. For example the BigQuery Export Plugin needs to manually do
timestamp || now || sent_at
. That's too much for a plugin to know. Same with many other plugins. I ran into this myself with the session tracker plugin and was surprised to find thistimestamp
to be completely empty.Thus I propose that the
PluginEvent
we send to plugins is the most sanitized version available. This means possibly even removing or blanking thenow
,sent_at
,offset
fields.This also means removing
$set
(and$set_once
and maybe$increment
?) from properties and putting it in the core of the event.The text was updated successfully, but these errors were encountered: