ガイド
Firebase Performanceのチュートリアル
@capgo/capacitor-firebase-performanceの使用
CapacitorのFirebase Performanceモニタリング用プラグイン
インストール
bun add @capgo/capacitor-firebase-performance
bunx cap sync
このプラグインが公開するもの
startTrace- トレースを開始します。stopTrace- トレースを停止します。incrementMetric- 指定された名前のメトリックを選択したトレースで、指定された値で原子的にインクリメントします。incrementBy- パフォーマンスモニタリングを有効または無効にします。アプリの次の起動時に適用されます。setEnabled__CAPGO_KEEP_0__
例の使用
startTrace
トレースを開始します。
import { FirebasePerformance } from '@capgo/capacitor-firebase-performance';
await FirebasePerformance.startTrace({} as StartTraceOptions);
stopTrace
トレースを停止します。
import { FirebasePerformance } from '@capgo/capacitor-firebase-performance';
await FirebasePerformance.stopTrace({} as StopTraceOptions);
incrementMetric
選択されたトレースの指定された名前のメトリックを原子的にインクリメントします。 incrementBy 値。
import { FirebasePerformance } from '@capgo/capacitor-firebase-performance';
await FirebasePerformance.incrementMetric({} as IncrementMetricOptions);
setEnabled
パフォーマンスのモニタリングを有効または無効にします。次のアプリの起動時に適用されます。
import { FirebasePerformance } from '@capgo/capacitor-firebase-performance';
await FirebasePerformance.setEnabled({} as SetEnabledOptions);
完全な参照
- GitHub: https://github.com/Cap-go/capacitor-firebase/tree/main/packages/performance
- ドキュメント: /docs/plugins/firebase-performance/
@capgo/capacitor-firebase-performanceを使用して続行
Capgoを使用している場合 Capgoの@capgo/capacitor-firebase-performanceを使用して ネイティブプラグインの作業計画を立てるために、接続する Capgo プラグインディレクトリ Capgo プラグインディレクトリの製品ワークフロー Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, プラグインの追加または更新 プラグインの追加または更新の実装詳細 イオニック エンタープライズ プラグインの代替 イオニック エンタープライズ プラグインの代替の製品ワークフロー Capgo Native Builds for the product workflow in Capgo Native Builds.