Move source to top level

This commit is contained in:
Eric Bailey
2026-02-12 11:15:02 -06:00
parent 17117abe11
commit 161acac902
3 changed files with 3 additions and 3 deletions
-1
View File
@@ -94,7 +94,6 @@ const Context = createContext<AnalyticsBaseContextType>({
})
},
metadata: {
source: 'app',
base: {
deviceId: getDeviceId() ?? 'unknown',
sessionId: getInitialSessionId(),
-1
View File
@@ -34,7 +34,6 @@ export type MergeableMetadata = {
}
export type Metadata = {
source: 'app'
base: BaseMetadata
geolocation: GeolocationMetadata
} & MergeableMetadata
+3 -1
View File
@@ -4,6 +4,7 @@ import {Logger} from '#/logger'
import * as env from '#/env'
type Event<M extends Record<string, any>> = {
source: 'app'
time: number
event: keyof M
payload: M[keyof M]
@@ -43,7 +44,8 @@ export class MetricsClient<M extends Record<string, any>> {
) {
this.start()
const e = {
const e: Event<M> = {
source: 'app',
time: Date.now(),
event,
payload,