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

Add fid to Crashlytics report #5052

Merged
merged 3 commits into from
Jun 20, 2023
Merged

Conversation

mrober
Copy link
Contributor

@mrober mrober commented Jun 5, 2023

Add fid to Crashlytics report. Only fetch the fid when data collection is enabled, or the customer is about to upload a report.

If automatic data collection is enabled, set the fid at report creation time.
If automatic data collection is disabled, do not set the fid at report creation time. Later, when the report is being uploaded (either by enabling automatic data collection or calling sendUnsentReports) set the fid.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 5, 2023

Coverage Report 1

Affected Products

  • firebase-crashlytics

    Overall coverage changed from ? (bb4a41a) to 9.69% (3532974) by ?.

    115 individual files with coverage change

    FilenameBase (bb4a41a)Merge (3532974)Diff
    AnalyticsDeferredProxy.java?0.00%?
    AnalyticsEventLogger.java?0.00%?
    AnalyticsEventReceiver.java?0.00%?
    AppData.java?50.00%?
    AutoCrashlyticsReportEncoder.java?57.72%?
    AutoValue_CrashlyticsReport.java?0.00%?
    AutoValue_CrashlyticsReportWithSessionId.java?0.00%?
    AutoValue_CrashlyticsReport_ApplicationExitInfo.java?66.34%?
    AutoValue_CrashlyticsReport_ApplicationExitInfo_BuildIdMappingForArch.java?0.00%?
    AutoValue_CrashlyticsReport_CustomAttribute.java?0.00%?
    AutoValue_CrashlyticsReport_FilesPayload.java?0.00%?
    AutoValue_CrashlyticsReport_FilesPayload_File.java?0.00%?
    AutoValue_CrashlyticsReport_Session.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Application.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Application_Organization.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Device.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application_Execution.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application_Execution_BinaryImage.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application_Execution_Exception.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application_Execution_Signal.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application_Execution_Thread.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Application_Execution_Thread_Frame.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Device.java?0.00%?
    AutoValue_CrashlyticsReport_Session_Event_Log.java?0.00%?
    AutoValue_CrashlyticsReport_Session_OperatingSystem.java?0.00%?
    AutoValue_CrashlyticsReport_Session_User.java?0.00%?
    AutoValue_InstallIdProvider_InstallIds.java?0.00%?
    AutoValue_StaticSessionData.java?0.00%?
    AutoValue_StaticSessionData_AppData.java?0.00%?
    AutoValue_StaticSessionData_DeviceData.java?0.00%?
    AutoValue_StaticSessionData_OsData.java?0.00%?
    BackgroundPriorityRunnable.java?0.00%?
    BatteryState.java?0.00%?
    BlockingAnalyticsEventLogger.java?0.00%?
    BreadcrumbAnalyticsEventReceiver.java?0.00%?
    BreadcrumbHandler.java?0.00%?
    BreadcrumbSource.java?0.00%?
    BuildIdInfo.java?62.50%?
    BytesBackedNativeSessionFile.java?0.00%?
    CachedSettingsIo.java?0.00%?
    CLSUUID.java?0.00%?
    CommonUtils.java?0.00%?
    CrashlyticsAnalyticsListener.java?0.00%?
    CrashlyticsAppQualitySessionsSubscriber.java?0.00%?
    CrashlyticsBackgroundWorker.java?56.25%?
    CrashlyticsController.java?15.96%?
    CrashlyticsCore.java?0.62%?
    CrashlyticsFileMarker.java?30.77%?
    CrashlyticsLifecycleEvents.java?0.00%?
    CrashlyticsNativeComponent.java?0.00%?
    CrashlyticsNativeComponentDeferredProxy.java?25.00%?
    CrashlyticsOriginAnalyticsEventLogger.java?0.00%?
    CrashlyticsRegistrar.java?0.00%?
    CrashlyticsReport.java?2.59%?
    CrashlyticsReportDataCapture.java?3.52%?
    CrashlyticsReportJsonTransform.java?1.18%?
    CrashlyticsReportPersistence.java?2.96%?
    CrashlyticsReportWithSessionId.java?0.00%?
    CrashlyticsUncaughtExceptionHandler.java?0.00%?
    CurrentTimeProvider.java?0.00%?
    CustomKeysAndValues.java?0.00%?
    DataCollectionArbiter.java?0.00%?
    DataTransportCrashlyticsReportSender.java?48.28%?
    DefaultSettingsJsonTransform.java?0.00%?
    DefaultSettingsSpiCall.java?0.00%?
    DeliveryMechanism.java?0.00%?
    DevelopmentPlatformProvider.java?0.00%?
    DisabledBreadcrumbSource.java?0.00%?
    ExecutorUtils.java?0.00%?
    FileBackedNativeSessionFile.java?0.00%?
    FileLogStore.java?0.00%?
    FileStore.java?36.36%?
    FirebaseCrashlytics.java?0.00%?
    HttpGetRequest.java?0.00%?
    HttpRequestFactory.java?0.00%?
    HttpResponse.java?0.00%?
    IdManager.java?3.03%?
    ImmutableList.java?0.00%?
    InstallerPackageNameProvider.java?0.00%?
    InstallIdProvider.java?0.00%?
    KeysMap.java?24.32%?
    LogFileManager.java?60.71%?
    Logger.java?40.54%?
    MetaDataStore.java?23.38%?
    MiddleOutFallbackStrategy.java?0.00%?
    MiddleOutStrategy.java?0.00%?
    NativeSessionFile.java?0.00%?
    NativeSessionFileGzipper.java?0.00%?
    NativeSessionFileProvider.java?0.00%?
    OnDemandCounter.java?0.00%?
    QueueFile.java?0.00%?
    QueueFileLogStore.java?7.58%?
    RemoveRepeatsStrategy.java?0.00%?
    ReportQueue.java?0.00%?
    ResponseParser.java?0.00%?
    SessionReportingCoordinator.java?43.05%?
    Settings.java?95.00%?
    SettingsCacheBehavior.java?0.00%?
    SettingsController.java?0.00%?
    SettingsJsonConstants.java?0.00%?
    SettingsJsonParser.java?0.00%?
    SettingsJsonTransform.java?0.00%?
    SettingsProvider.java?0.00%?
    SettingsRequest.java?0.00%?
    SettingsSpiCall.java?0.00%?
    SettingsV3JsonTransform.java?0.00%?
    StackTraceTrimmingStrategy.java?0.00%?
    StaticSessionData.java?0.00%?
    SystemCurrentTimeProvider.java?0.00%?
    TrimmedThrowableData.java?0.00%?
    UnavailableAnalyticsEventLogger.java?0.00%?
    UserMetadata.java?25.93%?
    Utils.java?0.00%?

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/GxVONmqn4l.html

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

Unit Test Results

  6 files    6 suites   28s ⏱️
18 tests 18 ✔️ 0 💤 0
36 runs  36 ✔️ 0 💤 0

Results for commit 6e537fc.

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 5, 2023

Size Report 1

Affected Products

  • base

    TypeBase (bb4a41a)Merge (3532974)Diff
    apk (aggressive)?8.39 kB? (?)
    apk (release)?8.66 kB? (?)
  • firebase-crashlytics

    TypeBase (bb4a41a)Merge (3532974)Diff
    aar?357 kB? (?)
    apk (aggressive)?433 kB? (?)
    apk (release)?2.17 MB? (?)
  • firebase-sessions

    TypeBase (bb4a41a)Merge (3532974)Diff
    aar?114 kB? (?)
    apk (aggressive)?364 kB? (?)
    apk (release)?2.06 MB? (?)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/Q5YJhUe40A.html

@mrober mrober requested a review from samedson June 20, 2023 14:23
@mrober mrober merged commit 5d56114 into firebase-sessions Jun 20, 2023
@mrober mrober deleted the sessions-crashlytics-fid branch June 20, 2023 14:53
davidmotson pushed a commit that referenced this pull request Jun 20, 2023
* Add fid to Crashlytics report

* Format
mrober added a commit that referenced this pull request Jun 26, 2023
* Initial commit for Firebase Sessions SDK (#4713)

* Initial commit for Firebase Sessions SDK

* Add copyright notice

* Remove redundant dependency

* Revert 'Remove redundant dependency' to avoid using api

* Generate api.txt file

* Implement SessionInitiator and hook it up to lifecycle events (#4723)

* Implement SessionInitiator and hook it up to lifecycle events

* Add a warning when failed to register lifecycle callbacks

* Fix formatting

* Use kotlin.time.Duration instead of Long for time intervals (#4733)

* Use kotlin.time.Duration instead of Long for time intervals

* Adjust test constants

* Simplify elapsedRealtime to always be millis precision

* Add SessionGenerator to generate the Session ID (#4747)

* Add SessionEvent data class (#4763)

* Add SessionEvent data class

* Add enum test case

* Remove serialization (this will be handled in encoders) and rename SessionState

* Generate a SessionEvent based on the SessionState

* Rename SessionState to SessionDetails

* Firebase Session Event

* Add Firebase Sessions Test App (#4775)

* Add Firebase Sessions Test App

* Remove boilerplate

* Add JSON encoder for SessionEvents (#4778)

* Use the private setter pattern on SessionGenerator.currentSession (#4785)

* Use the private setter pattern on SessionGenerator.currentSession

* Comments

* Integrate with FirebaseInstallations. (#4796)

* Populate firebaseInstallationId field in session (#4801)

* Package session start event's application information. (#4829)

* Fix workflows for Firebase Sessions (#4841)

* Use googleServices.gradle

* Move package level function to object to fix api surface check

* Add android manifest file with versionName set to fix android tests

* Update pinned deps

* Make getApplicationInfo look leaner

* Setup configuration layer for the library. (#4853)

* Fix Firebase Sessions test app temporarily (#4858)

* Add GDT to Firebase Sessions (#4851)

* Add README files (#4857)

* Fix test app and add README's

* Undo app changes

* Undo app changes

* Add description and formatting to README file

* Add google-services.json file to unit tests (#4868)

* Setup sessions e2e workflow (#4859)

* Start setting up sessions e2e workflow

* Remove schedule

* Format

* Setup gcloud

* Set FIREBASE_APP_CHECK_DEBUG_SECRET

* Set FTL_RESULTS_BUCKET

* Add schedule

* Add 20 min

* Implement local manifest override configs (#4877)

* Fix encoding for Session Events (#4870)

* Use test app for Sessions e2e test (#4881)

* Use test app for Sessions e2e test

* Add test lab plugin

* Use firebase-sessions branch

* Increase time to log session to 60 seconds

* Move currentTimeUs into WallClock (#4890)

* Populate sampling rate in session event (#4891)

* Populate sampling rate in session event

* Fix test

* Fix merge

* Add TimeProvider interface to abstract away the clock (#4905)

* Add TimeProvider interface to abstract away the clock

* Add comment about default elapsed time being zero

* Fill in device_model field for AQS (#4892)

* Implement sampling (#4896)

* Implement sampling

* return

* Remove collectEvents from SessionDetails, use sessionGenerator.collectEvents

* Don't generate whole Session Start event for sampled event

* Fix log message

* Add Sessions to benchmark config (#4914)

* Introduce remote config cache for storing configs fetched remotely. (#4917)

* Make logging consistent with Apple SDK (#4919)

* Pass a CoroutineContext, not CoroutineDispatcher, to SessionCoordinator (#4950)

* Implement remote config fetcher to fetch and cache configs. (#4967)

* Add os_version, app_build_version, device_manufacturer for Sessions #11222 (#4984)

* Add App information for config fetching. (#4992)

* Update the header params for network request. (#4995)

* Add thread safe FirebaseSessionsDependencies (#4983)

* Add thread safe FirebaseSessionsDependencies

* Remove debug line

* Format

* Address comments

* Rename to getRegisteredSubscribers

* Add register api to FirebaseSessions so products can integrate (#4989)

* Add thread safe FirebaseSessionsDependencies

* Remove debug line

* Format

* Add register api to FirebaseSessions so products can integrate

* Fix Android tests and api txt file

* Address comments

* Address comments

* Rename to getRegisteredSubscribers

* Fix callsite

* Add Sessions to Crashlytics (#4993)

* Add thread safe FirebaseSessionsDependencies

* Remove debug line

* Format

* Add register api to FirebaseSessions so products can integrate

* Fix Android tests and api txt file

* Add Sessions to Crashlytics

* Address comments

* Address comments

* Rename to getRegisteredSubscribers

* Fix callsite

* Add todo

* Fix gradle command in README

* Use firebase-encoders-processor instead of manually building encoder (#5030)

* Fix behaviour with multiple subscribers (#5031)

* Fix behaviour with multiple subscribers

* Fix format

* Integrate Firebase Performance with Firebase Sessions. (#5020)

* Clean up how we launch suspend functions (#5028)

* Make `initiateSessionStart` a suspend function

* Notify subscribers regardless of sampling and data collection state

* Add timestamp to SessionDetails

* Fix format

* Generate the session details on main thread

* Fix tests

* Call it sessionStartTimestampUs for clarity sake

* Add and populate appQualitySessionId in Crashlytics reports (#5045)

* Add and populate appQualitySessionId in Crashlytics reports

* Bump Crashlytics ktx target sdk to 33, same as Java sdk

* Log warning when missing AQS session id

* Pin firebase-datatransport version (#5070)

* Use AQS provided sessionId for Fireperf events. (#5060)

* Fix firebase-crashlytics-ktx instrumented tests (#5068)

* Fix firebase-crashlytics-ktx deps

* Fix CrashlyticsTests and clean up build file

* Make FirebaseCrashlyticsKtxRegistrar internal

* Bump health metrics compile sdk

* Add versionName version

* Add check if Sessions is disabled (#5061)

* Do not send session id to subscribers if Sessions is disabled

* Move the Sessions settings disabled check to after subscrubers

* Add fid to Crashlytics report (#5052)

* Add fid to Crashlytics report

* Format

* Handle IOExceptions when fetching remote settings (#5092)

* Handle IOExceptions went fetching remote settings

* Add failure test case for RemoteSettingsFetcher

* Make remote settings fetch non-blocking (#5095)

* Ensure the settings cache has loaded from disk before reading any values (#5103)

* Make remote settings fetch non-blocking

* Ensure the settings cache has loaded from disk before reading any values

* Fix runtime exception with a load-bearing empty block

* Inline the definition of metadata to avoid needing an empty block

* Comments

* Fetch remote settings on session, not on launch (#5107)

* Make remote settings fetch non-blocking

* Ensure the settings cache has loaded from disk before reading any values

* Fix runtime exception with a load-bearing empty block

* Inline the definition of metadata to avoid needing an empty block

* Fetch remote settings on session, not on launch

* Log warning when we fail to fetch the fid

---------

Co-authored-by: Sam Edson <samedson@google.com>
Co-authored-by: Visu <visumickey@gmail.com>
@firebase firebase locked and limited conversation to collaborators Jul 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants