Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML Model Downloader] Migrate from FLL to CCT logging endpoint #11837

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading