Skip to content

Conversation

@andrewbrook
Copy link

Discussion

Collect framework-specific attributes whenever recordError is called, explicitly or implicitly.

Testing

Unit tested, manually tested

API Changes

N/A

@changeset-bot
Copy link

changeset-bot bot commented Dec 18, 2025

⚠️ No Changeset found

Latest commit: e125f7a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @andrewbrook, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the Crashlytics integration for Angular applications by implementing a standardized way to automatically collect and attach framework-specific context to error reports. By introducing a flexible provider mechanism, the system now ensures that valuable diagnostic information, such as the Angular route path, is consistently included with every error, thereby improving the clarity and actionability of crash logs for developers.

Highlights

  • Framework-Specific Attribute Collection: Introduced a mechanism to collect framework-specific attributes (like Angular route path) whenever recordError is called, whether explicitly or implicitly.
  • Angular Integration Update: The FirebaseErrorHandler in Angular now registers a frameworkAttributesProvider with the Crashlytics service to automatically capture the Angular route path for error reports.
  • Centralized Attribute Handling: The core recordError function in api.ts was updated to check for and utilize this new frameworkAttributesProvider to enrich error logs with relevant context.
  • Service Extension: The CrashlyticsService now includes a frameworkAttributesProvider property, allowing framework-specific implementations to supply additional context dynamically.
  • Enhanced Testing: Unit tests were updated and new tests were added to ensure the correct collection and reporting of framework attributes, including handling of dynamic routes.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the collection of Angular-specific context for error reporting by introducing a frameworkAttributesProvider on the CrashlyticsService. This allows the recordError function to automatically include framework context, like the Angular route, even when called directly. This is a solid architectural improvement that enhances modularity. The changes are well-tested. I have one suggestion in packages/crashlytics/src/api.ts to prevent mutation of user-provided arguments, which is a recommended practice for robust APIs.

@andrewbrook andrewbrook marked this pull request as ready for review December 18, 2025 20:50
@andrewbrook andrewbrook requested a review from a team as a code owner December 18, 2025 20:50
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Dec 18, 2025

Size Report 1

Affected Products

  • @firebase/crashlytics

    TypeBase (e3691f6)Merge (5bb5c09)Diff
    browser9.71 kB10.1 kB+420 B (+4.3%)
    main8.68 kB9.10 kB+420 B (+4.8%)
    module9.71 kB10.1 kB+420 B (+4.3%)
  • firebase

    TypeBase (e3691f6)Merge (5bb5c09)Diff
    firebase-crashlytics.js88.8 kB89.0 kB+240 B (+0.3%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/A3sFyLWd6l.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Dec 18, 2025

Size Analysis Report 1

Affected Products

  • @firebase/crashlytics

    • flush

      Size

      TypeBase (e3691f6)Merge (5bb5c09)Diff
      size5.21 kB5.36 kB+146 B (+2.8%)
      size-with-ext-deps64.6 kB64.8 kB+146 B (+0.2%)
    • getCrashlytics

      Size

      TypeBase (e3691f6)Merge (5bb5c09)Diff
      size5.38 kB5.53 kB+146 B (+2.7%)
      size-with-ext-deps71.7 kB71.9 kB+146 B (+0.2%)
    • nextOnRequestError

      Size

      TypeBase (e3691f6)Merge (5bb5c09)Diff
      size6.32 kB6.56 kB+243 B (+3.8%)
      size-with-ext-deps72.7 kB72.9 kB+243 B (+0.3%)
    • recordError

      Size

      TypeBase (e3691f6)Merge (5bb5c09)Diff
      size5.94 kB6.19 kB+243 B (+4.1%)
      size-with-ext-deps65.3 kB65.6 kB+243 B (+0.4%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/JS7Q1ysVMd.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants