DMDJ
DMDJ

Reputation: 407

Firebase Performance Monitoring (Angular)

I'm still new with firebase. Is there any way that we can use firebase performance monitoring to monitor our web app screen by screen automatically from the console? I checked the documentation and it says we need to put some traces in the code to trace (correct me if i'm mistaken).

Upvotes: 5

Views: 1553

Answers (1)

John Paulo Rodriguez
John Paulo Rodriguez

Reputation: 1400

Performance Monitoring automatically provides a trace for page load when you add AngularFirePerformanceModule into your App Module's imports.

import { AngularFireModule } from '@angular/fire';
import { AngularFirePerformanceModule, PerformanceMonitoringService } from '@angular/fire/performance';
import { environment } from '../environments/environment';

@NgModule({
  imports: [
    BrowserModule,
    AngularFireModule.initializeApp(environment.firebase),
    AngularFirePerformanceModule,
    ...
  ],
  providers: [
    PerformanceMonitoringService
  ],
  declarations: [ AppComponent ],
  bootstrap: [ AppComponent ]
})
export class AppModule {}

Check documentation here: https://github.com/angular/angularfire/blob/master/docs/performance/getting-started.md and some tutorial here: https://labs.thisdot.co/blog/intro-to-performance-analytics-with-firebase

Upvotes: 5

Related Questions