File tree 4 files changed +14
-3
lines changed
java/com/google/firebase/perf/transport
firebase-sessions/src/main/kotlin/com/google/firebase/sessions 4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 51
51
import com .google .firebase .perf .v1 .PerfMetric ;
52
52
import com .google .firebase .perf .v1 .PerfMetricOrBuilder ;
53
53
import com .google .firebase .perf .v1 .TraceMetric ;
54
+ import com .google .firebase .sessions .ProcessDetailsProvider ;
55
+
54
56
import java .lang .ref .WeakReference ;
55
57
import java .text .DecimalFormat ;
56
58
import java .util .Collections ;
@@ -230,6 +232,8 @@ private void finishInitialization() {
230
232
applicationInfoBuilder = ApplicationInfo .newBuilder ();
231
233
applicationInfoBuilder
232
234
.setGoogleAppId (firebaseApp .getOptions ().getApplicationId ())
235
+ .setProcessName (
236
+ ProcessDetailsProvider .getProcessDetailsProvider ().getCurrentProcessDetails (appContext ).getProcessName ())
233
237
.setAndroidAppInfo (
234
238
AndroidApplicationInfo .newBuilder ()
235
239
.setPackageName (packageName )
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ message GaugeMetadata {
292
292
// Additional metadata about an application and its state (including state of
293
293
// the device at runtime) that is not provided by firebase data transport.
294
294
//
295
- // Next tag: 8
295
+ // Next tag: 9
296
296
message ApplicationInfo {
297
297
// Identifier for the application that has been registered with firebase.
298
298
// Contains pantheon project number, platform and the hash of the (package
@@ -316,6 +316,9 @@ message ApplicationInfo {
316
316
317
317
// A map of global-level custom attribute names to values.
318
318
map <string , string > custom_attributes = 6 ;
319
+
320
+ // The name of process that initiate the event. Currently only populated for Android apps.
321
+ optional string process_name = 8 ;
319
322
}
320
323
321
324
// Additional metadata about an android application that is not provided by
Original file line number Diff line number Diff line change @@ -28,7 +28,11 @@ import com.google.android.gms.common.util.ProcessUtils
28
28
*
29
29
* @hide
30
30
*/
31
- internal object ProcessDetailsProvider {
31
+ object ProcessDetailsProvider {
32
+ @JvmStatic
33
+ fun getProcessDetailsProvider (): ProcessDetailsProvider {
34
+ return this
35
+ }
32
36
/* * Gets the details for all of this app's running processes. */
33
37
fun getAppProcessDetails (context : Context ): List <ProcessDetails > {
34
38
val appUid = context.applicationInfo.uid
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ internal data class DataCollectionStatus(
81
81
)
82
82
83
83
/* * Container for information about the process */
84
- internal data class ProcessDetails (
84
+ data class ProcessDetails (
85
85
val processName : String ,
86
86
val pid : Int ,
87
87
val importance : Int ,
You can’t perform that action at this time.
0 commit comments