[FR] Support sending Firebase Performance traces to multiple destinations (e.g. log, Firebase, Hotdog, Sentry, etc.)

オープン
#1,954 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
android, firebase, kotlin

調査の方向性

Issue では Now in Android のパフォーマンス追跡ユーティリティについて言及されていますが、ファイルやテストは指定されていません。まずそれらのユーティリティを見つけ、現在 Firebase Performance のトレースがどのように報告されているかを確認してください。明確に設定可能な設計でトレースを複数の宛先に転送でき、サポートされている報告動作をカバーできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement
Is there an existing issue for this?
  • I have searched the existing issues
Describe the problem
Description

It would be extremely helpful if the Now in Android sample app (and its performance tracking utilities) could support sending performance trace data not only to Firebase Performance Monitoring but also to other destinations such as:

  • Logcat (for quick local debugging)
  • Firebase Performance Dashboard (default destination)
  • Hotdog
  • Sentry
  • (Any other custom tools)
Motivation

Developers often need performance data in multiple contexts simultaneously. For instance:

  • Logcat: Useful for immediate debugging during development, CI builds, or local testing.
  • Firebase: Great for aggregate analytics and real user monitoring.
  • Hotdog / Sentry / etc.: Useful for centralized error/performance dashboards, custom dashboards, or alternative monitoring solutions.

Serving multiple destinations would make debugging and monitoring smoother and more flexible.

Proposed approach
  • Create an abstraction layer over performance trace reporting, e.g., a PerformanceReporter interface.
  • Implement multiple reporters (e.g., LogcatReporter, FirebaseReporter, HotdogReporter, SentryReporter).
  • Make these reporters configurable (via dependency injection or a simple registry), so users can opt in to any combination they need.
Example usage
val performanceReporters = listOf(LogcatReporter(), FirebaseReporter(), SentryReporter())
PerformanceReporting.initialize(performanceReporters)

trace("user_login") {
    // Business logic here
}


### Describe the solution

interface PerformanceReporter {
    fun onTraceStart(name: String)
    fun onTraceEnd(name: String, durationMs: Long)
}
Each destination will implement this interface, for example:

kotlin
Copy code
class FirebaseReporter : PerformanceReporter { /* ... */ }
class LogcatReporter : PerformanceReporter { /* ... */ }
class SentryReporter : PerformanceReporter { /* ... */ }
class HotdogReporter : PerformanceReporter { /* ... */ }
2. Create a CompositePerformanceReporter
This class will manage a list of reporters and forward trace events to all of them:

kotlin
Copy code
class CompositePerformanceReporter(
    private val reporters: List<PerformanceReporter>
) : PerformanceReporter {
    override fun onTraceStart(name: String) {
        reporters.forEach { it.onTraceStart(name) }
    }

    override fun onTraceEnd(name: String, durationMs: Long) {
        reporters.forEach { it.onTraceEnd(name, durationMs) }
    }
}

### Additional context

_No response_

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct
主要言語
Kotlin
スター
22.1k
フォーク
4.7k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

android/nowinandroid のほかの issue

android/nowinandroid の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。