【问题标题】:Firebase Performance Monitoring (Angular)Firebase 性能监控(角度)
【发布时间】:2020-04-30 03:36:02
【问题描述】:

我还是 Firebase 的新手。有什么方法可以使用 Firebase 性能监控从控制台自动逐屏监控我们的 Web 应用程序?我检查了文档,它说我们需要在代码中添加一些跟踪来跟踪(如果我弄错了,请纠正我)。

【问题讨论】:

    标签: firebase firebase-performance


    【解决方案1】:

    当您将 AngularFirePerformanceModule 添加到应用模块的导入中时,性能监控会自动提供页面加载跟踪。

    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 {}
    

    在此处查看文档:https://github.com/angular/angularfire/blob/master/docs/performance/getting-started.md 并在此处查看一些教程:https://labs.thisdot.co/blog/intro-to-performance-analytics-with-firebase

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-05-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-27
      • 1970-01-01
      相关资源
      最近更新 更多