Game Maker Firebase Performance Monitoring

Game Maker Firebase Performance Monitoring allows you to track down performance related issues within your app. This is very useful for observing your app, seeing if certain parts of it is slow or buggy. Performance Monitoring SDK automatically captures device model, app version, country, network speeds etc. You can see the reports on Firebase Panel.

Setup Firebase Tools for Game Maker Studio

To be able to use the extension, you must prepare Game Maker Studio 2 to be able to compile for it. Click the link above to complete it.

Setup Firebase Performance Monitoring Library

In addition to the Setup instructions above, you must add the following codes into their respective folders;

RootFiles/build.gradle
classpath ‘com.google.firebase:perf-plugin:1.3.1’ within the dependencies bracket.

classpath 'com.google.firebase:perf-plugin:1.3.1'

It should look like this(Remember that don’t copy this as you may have other tools inside)

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        classpath 'com.google.gms:google-services:4.3.2'
        classpath 'com.google.firebase:perf-plugin:1.3.1'
    }
}
allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()
    }
}

ProjectFiles/build.gradle
apply plugin: ‘com.google.firebase.firebase-perf’ right after apply plugin: ‘com.android.application’

It should look like this..

apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'

android {
    compileSdkVersion ${YYAndroidCompileSDKVersion}
...
...
...

DOCUMENTATION

firebase_performance_monitoring_debug_mode(True/False debugMode);
Description
: Initializes Debug Mode.
Returns : N/A

firebase_performance_monitoring_init();
Description
: Initializes Firebase Performance Monitoring Extension.
Returns : N/A

firebase_performance_monitoring_trace_start(String traceName);
Description
: Creates a custom trace. Firebase automatically traces important things for you, but you may trace your own metrics here. You’ll see them on Firebase Panel as well.
Returns : N/A

firebase_performance_monitoring_trace_increment_metric(String metricName, Real metricIncrementValue);
Description
: Increments a numerical value on your custom trace.
Returns : N/A

firebase_performance_monitoring_trace_start("spriteLoadingProcess");
//.. Do a process here, gives error!
firebase_performance_monitoring_trace_increment_metric("error",1);

//.. Do 3 processes here, successfully!
firebase_performance_monitoring_trace_increment_metric("success",3);
firebase_performance_monitoring_trace_stop();

firebase_performance_monitoring_trace_put_attribute_string(String attributeName, String attributeValue);
Description
: Adds a String value to your custom trace. This is useful for storing critical information about the process.
Returns : N/A

firebase_performance_monitoring_trace_start("ConnectionProcess");
firebase_performance_monitoring_trace_put_attribute_string("AccountType","Premium");
//You may store personal information as well, but you should ask for consent..
firebase_performance_monitoring_trace_put_attribute_string("Email","gmdevblog@gmdevblog.com");
firebase_performance_monitoring_trace_stop();

firebase_performance_monitoring_trace_stop();
Description
: Stops the custom trace. Reports will be sent to Firebase and can be seen within 24 hours.
Returns : N/A

GET THE EXTENSION
Share

Marty

Truely speaking, I don't know what am I doing most of the time.

Leave a Reply