Skip to content

Commit

Permalink
[ML Model Downloader] Migrate from FLL to CCT logging endpoint (#11837)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheard authored Oct 31, 2023
1 parent 60ac2d8 commit b850d1a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions FirebaseMLModelDownloader/Sources/TelemetryLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,29 +124,29 @@ class TelemetryLogger {
private let app: FirebaseApp

/// Transport for Firelog events.
private let fllTransport: GDTCORTransport
private let cctTransport: GDTCORTransport

/// Init logger, could be nil if unable to get event transport.
init?(app: FirebaseApp) {
self.app = app
guard let fllTransport = GDTCORTransport(
guard let cctTransport = GDTCORTransport(
mappingID: mappingID,
transformers: nil,
target: GDTCORTarget.FLL
target: GDTCORTarget.CCT
) else {
DeviceLogger.logEvent(level: .debug,
message: TelemetryLogger.ErrorDescription.initTelemetryLogger,
messageCode: .telemetryInitError)
return nil
}
self.fllTransport = fllTransport
self.cctTransport = cctTransport
}

/// Log events to Firelog.
private func logModelEvent(event: FirebaseMlLogEvent) {
let eventForTransport: GDTCOREvent = fllTransport.eventForTransport()
let eventForTransport: GDTCOREvent = cctTransport.eventForTransport()
eventForTransport.dataObject = FBMLDataObject(event: event)
fllTransport.sendTelemetryEvent(eventForTransport)
cctTransport.sendTelemetryEvent(eventForTransport)
}

/// Log model deleted event to Firelog.
Expand Down

0 comments on commit b850d1a

Please sign in to comment.