File tree Expand file tree Collapse file tree 4 files changed +14
-3
lines changed
java/com/google/firebase/perf/transport
firebase-sessions/src/main/kotlin/com/google/firebase/sessions Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 5151import com .google .firebase .perf .v1 .PerfMetric ;
5252import com .google .firebase .perf .v1 .PerfMetricOrBuilder ;
5353import com .google .firebase .perf .v1 .TraceMetric ;
54+ import com .google .firebase .sessions .ProcessDetailsProvider ;
55+
5456import java .lang .ref .WeakReference ;
5557import java .text .DecimalFormat ;
5658import java .util .Collections ;
@@ -230,6 +232,8 @@ private void finishInitialization() {
230232 applicationInfoBuilder = ApplicationInfo .newBuilder ();
231233 applicationInfoBuilder
232234 .setGoogleAppId (firebaseApp .getOptions ().getApplicationId ())
235+ .setProcessName (
236+ ProcessDetailsProvider .getProcessDetailsProvider ().getCurrentProcessDetails (appContext ).getProcessName ())
233237 .setAndroidAppInfo (
234238 AndroidApplicationInfo .newBuilder ()
235239 .setPackageName (packageName )
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ message GaugeMetadata {
292292// Additional metadata about an application and its state (including state of
293293// the device at runtime) that is not provided by firebase data transport.
294294//
295- // Next tag: 8
295+ // Next tag: 9
296296message ApplicationInfo {
297297 // Identifier for the application that has been registered with firebase.
298298 // Contains pantheon project number, platform and the hash of the (package
@@ -316,6 +316,9 @@ message ApplicationInfo {
316316
317317 // A map of global-level custom attribute names to values.
318318 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 ;
319322}
320323
321324// 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
2828 *
2929 * @hide
3030 */
31- internal object ProcessDetailsProvider {
31+ object ProcessDetailsProvider {
32+ @JvmStatic
33+ fun getProcessDetailsProvider (): ProcessDetailsProvider {
34+ return this
35+ }
3236 /* * Gets the details for all of this app's running processes. */
3337 fun getAppProcessDetails (context : Context ): List <ProcessDetails > {
3438 val appUid = context.applicationInfo.uid
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ internal data class DataCollectionStatus(
8181)
8282
8383/* * Container for information about the process */
84- internal data class ProcessDetails (
84+ data class ProcessDetails (
8585 val processName : String ,
8686 val pid : Int ,
8787 val importance : Int ,
You can’t perform that action at this time.
0 commit comments