|
| 1 | +// Copyright 2022 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +// |
| 16 | +// Instructions for updating this file: |
| 17 | +// |
| 18 | +// 1. Get the session_event.proto from the backend |
| 19 | +// 2. Copy everything below the options, and past it here below the package |
| 20 | +// declaraction. |
| 21 | +// 3. Remove all the datapol.semantic_type tags |
| 22 | +// 4. Remove "wireless_android_play_playlog." from |
| 23 | +// "wireless_android_play_playlog.NetworkConnectionInfo" |
| 24 | +// 5. Any new proto fields of type string, repeated, or bytes must be specified |
| 25 | +// in the sessions.options file as "type:FT_POINTER" |
| 26 | +// |
| 27 | + |
| 28 | +syntax = "proto3"; |
| 29 | + |
| 30 | +import "clientanalytics.proto"; |
| 31 | + |
| 32 | +package firebase.appquality.sessions; |
| 33 | + |
| 34 | +// Contains the relevant information around an App Quality Session. |
| 35 | +// See go/app-quality-unified-session-definition for more details. |
| 36 | +message SessionEvent { |
| 37 | + // The type of event being reported. |
| 38 | + EventType event_type = 1; |
| 39 | + // Information about the session triggering the event. |
| 40 | + SessionInfo session_data = 2; |
| 41 | + // Information about the running application. |
| 42 | + ApplicationInfo application_info = 3; |
| 43 | +} |
| 44 | + |
| 45 | +// Enum denoting all possible session event types. |
| 46 | +enum EventType { |
| 47 | + EVENT_UNKNOWN = 0; |
| 48 | + // This event type is fired as soon as a new session begins. |
| 49 | + EVENT_SESSION_START = 1; |
| 50 | +} |
| 51 | + |
| 52 | +// Contains session-specific information relating to the event being uploaded. |
| 53 | +message SessionInfo { |
| 54 | + // A globally unique identifier for the session. |
| 55 | + string session_id = 1; |
| 56 | + // The unique identifier for the session that preceded this one on the device. |
| 57 | + // This will be the empty string if there was no previous session. |
| 58 | + string previous_session_id = 2; |
| 59 | + // Identifies a unique device+app installation: go/firebase-installations |
| 60 | + string firebase_installation_id = 3; |
| 61 | + // The device-reported timestamp at which the event occurred. |
| 62 | + int64 event_timestamp_us = 4; |
| 63 | + // Any sampling rate being applied to these events on device. |
| 64 | + // 1.0 implies no sampling. |
| 65 | + float sampling_rate = 5; |
| 66 | + // The data collection status for each related SDK. |
| 67 | + DataCollectionStatus data_collection_status = 6; |
| 68 | +} |
| 69 | + |
| 70 | +// Contains the data collection status for each related SDK. |
| 71 | +message DataCollectionStatus { |
| 72 | + // The collection status of the FirePerf SDK. |
| 73 | + DataCollectionState performance = 1; |
| 74 | + // The collection status for the Crashlytics SDK. |
| 75 | + DataCollectionState crashlytics = 2; |
| 76 | +} |
| 77 | + |
| 78 | +// Enum denoting all possible states for SDK data collection. |
| 79 | +enum DataCollectionState { |
| 80 | + COLLECTION_UNKNOWN = 0; |
| 81 | + // This product SDK is not present in this version of the app. |
| 82 | + COLLECTION_SDK_NOT_INSTALLED = 1; |
| 83 | + // The product SDK is present and collecting all product-level events. |
| 84 | + COLLECTION_ENABLED = 2; |
| 85 | + // The product SDK is present but data collection for it has been locally |
| 86 | + // disabled. |
| 87 | + COLLECTION_DISABLED = 3; |
| 88 | + // The product SDK is present but data collection has been remotely disabled. |
| 89 | + COLLECTION_DISABLED_REMOTE = 4; |
| 90 | + // Indicates that the product SDK is present, but session data is being |
| 91 | + // collected, but the product-level events are not being uploaded. |
| 92 | + COLLECTION_SAMPLED = 5; |
| 93 | +} |
| 94 | + |
| 95 | +// App-level information collected from the device. |
| 96 | +message ApplicationInfo { |
| 97 | + // Commonly known as the GMP App Id |
| 98 | + string app_id = 1; |
| 99 | + // The manufacturer supplied device model name. Eg. 'N5502L' |
| 100 | + string device_model = 2; |
| 101 | + // The development platform used by the app. Eg. 'Unity', 'Flutter' |
| 102 | + string development_platform_name = 3; |
| 103 | + // The version of the development platform in use by the app. Eg. 2020.3.33f1 |
| 104 | + string development_platform_version = 4; |
| 105 | + |
| 106 | + oneof platform_info { |
| 107 | + // App info relevant only to Android apps |
| 108 | + AndroidApplicationInfo android_app_info = 5; |
| 109 | + // App info relevant only to Apple apps |
| 110 | + AppleApplicationInfo apple_app_info = 6; |
| 111 | + } |
| 112 | +} |
| 113 | + |
| 114 | +// Android-specific app information |
| 115 | +// In addition to these fields, the Firelog SDK also collects: |
| 116 | +// - application_build |
| 117 | +// - mcc_mnc |
| 118 | +// - sdk_version(app's build version) |
| 119 | +// - manufacturer |
| 120 | +// - model |
| 121 | +// - country |
| 122 | +// - network_connection_info |
| 123 | +message AndroidApplicationInfo { |
| 124 | + // The applications package name. Eg. com.google.search |
| 125 | + string package_name = 1; |
| 126 | + // The version of the Android Firebase-Sessions SDK in use |
| 127 | + string sdk_version = 2; |
| 128 | + // The version name as specified in the app's manifest |
| 129 | + // https://developer.android.com/guide/topics/manifest/manifest-element#vname |
| 130 | + string version_name = 3; |
| 131 | +} |
| 132 | + |
| 133 | +// Apple-specific app information |
| 134 | +// In addition to these fields, the Firelog SDK also collects: |
| 135 | +// - application_build |
| 136 | +// - application_version |
| 137 | +// - os_full_version |
| 138 | +// - model |
| 139 | +// - country |
| 140 | +message AppleApplicationInfo { |
| 141 | + // The application's bundle id. Eg. com.google.search |
| 142 | + string bundle_short_version = 1; |
| 143 | + // The version of the Apple Firebase-Sessions SDK in use |
| 144 | + string sdk_version = 2; |
| 145 | + // Describes the network connectivity of the device |
| 146 | + NetworkConnectionInfo network_connection_info = 3; |
| 147 | + // Collects the OS running. Eg. iOS, iPadOs, tvOS, etc. |
| 148 | + OsName os_name = 4; |
| 149 | +} |
| 150 | + |
| 151 | +// The name of the operating system on which the application is running. |
| 152 | +// Currently Apple only. |
| 153 | +enum OsName { |
| 154 | + OS_NAME_UNKNOWN = 0; |
| 155 | + OS_NAME_IOS = 1; |
| 156 | + OS_NAME_IPAD_OS = 2; |
| 157 | + OS_NAME_MAC_OS = 3; |
| 158 | + OS_NAME_TV_OS = 4; |
| 159 | + OS_NAME_WATCH_OS = 5; |
| 160 | +} |
0 commit comments