Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[📚] Firebase performance for flutter web #16959

Closed
Vinsho opened this issue Jan 10, 2025 · 4 comments
Closed

[📚] Firebase performance for flutter web #16959

Vinsho opened this issue Jan 10, 2025 · 4 comments
Labels
Needs Attention This issue needs maintainer attention. platform: web Issues / PRs which are specifically for web. plugin: performance resolution: solution-provided A solution has been provided in the issue. type: question A question where further information is requested

Comments

@Vinsho
Copy link

Vinsho commented Jan 10, 2025

Howdy,
this is a bit of a followup for this issue #10960.
I'm confused whether firebase performance is available for flutter web or not.
https://pub.dev/packages/firebase_performance package has web tag in it, there is also https://pub.dev/packages/firebase_performance_web package which sounds like something that should add performance functionality to flutter web, but to no avail.

I wasn't able to find clear answer whether flutter web is supported or not. Rest of firebase functionalities for web work but for performance I get this:

Image

Am I just blind and it's somewhere explained or are the docs missing this information.

Thanks!

@Vinsho Vinsho added good first issue Good for newcomers type: documentation Improvements or additions to documentation labels Jan 10, 2025
@SelaseKay SelaseKay added plugin: performance platform: web Issues / PRs which are specifically for web. type: question A question where further information is requested and removed good first issue Good for newcomers type: documentation Improvements or additions to documentation labels Jan 10, 2025
@SelaseKay
Copy link
Contributor

Hi @Vinsho, Flutter Web does support firebase_performance. Have you tried interacting with your app after adding firebase_performance? Your Performance Dashboard should show data afterwards.

@SelaseKay SelaseKay added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Jan 10, 2025
@Vinsho
Copy link
Author

Vinsho commented Jan 10, 2025

Thanks for the reply! @SelaseKay

I have, it's been in a production for quite a while now.
We get performance data for android and iOS but just web is missing. Meanwhile we also get analytics data from web so that makes me believe we have firebase setup correctly. Just to be sure:

  • Is firebase_performance enough or do I need firebase_performance_web?
  • Is there by any chance something special I need to do to enable performance for web ? As I mentioned above I believe we have firebase for web setup correctly.

Thanks a lot!

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Jan 10, 2025
@SelaseKay
Copy link
Contributor

Hi @Vinsho, adding only firebase_performance should be sufficient. To the best of my knowledge, no additional setup is required for it to work on the web. I tested it with the current firebase_performance example app, and it worked fine. Feel free to check the example app to ensure you're not overlooking anything.

@SelaseKay SelaseKay added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Jan 10, 2025
@Vinsho
Copy link
Author

Vinsho commented Jan 10, 2025

Thanks for the example app tip, I'm blind that I didn't find it!
So I've managed to do it by actually adding some trace inside the app, f.e.:

final performance = FirebasePerformance.instance;
performance.newTrace('app_init');

After adding this and running app, I also get all the other stuff logged that I wanted, like network requests, custom traces, page load...
Way I understood it was that all this stuff would be logged automatically if performance is added to the app. But it seems like it's logged only if some newTrace is actually created within the app. Not sure if that is desired or I just understood it incorrectly :D

Anyway, thanks a lot for the help! @SelaseKay

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Jan 10, 2025
@SelaseKay SelaseKay added resolution: user This was a user issue, e.g. invalid configuration or code. resolution: solution-provided A solution has been provided in the issue. and removed resolution: user This was a user issue, e.g. invalid configuration or code. labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention This issue needs maintainer attention. platform: web Issues / PRs which are specifically for web. plugin: performance resolution: solution-provided A solution has been provided in the issue. type: question A question where further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants