Skip to content

Crash tracing rebase#9600

Merged
MaesterChestnut merged 23 commits intocrashlytics-tracingfrom
crashTracingRebase
Feb 27, 2026
Merged

Crash tracing rebase#9600
MaesterChestnut merged 23 commits intocrashlytics-tracingfrom
crashTracingRebase

Conversation

@MaesterChestnut
Copy link

Merge latest crashlytics branch into crashlytics-tracing

google-admin and others added 22 commits February 26, 2026 15:57
Co-authored-by: Ben Knutson <benknutson@google.com>
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…9463)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
#9078)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* use environment for wdr tokens

* missed a file
* fix(deps): update dependency @rushstack/node-core-library to v5

* Fix method name

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christina Holland <chholland@google.com>
@changeset-bot
Copy link

changeset-bot bot commented Feb 26, 2026

⚠️ No Changeset found

Latest commit: dc26a11

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 @MaesterChestnut, 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 AI SDK by integrating automatic function calling into the ChatSession, allowing the model to execute predefined functions based on its output. This feature is supported by new API definitions and internal logic to manage function execution and response handling, including safeguards against excessive sequential calls. Additionally, it includes updates to OpenTelemetry dependencies within the Crashlytics package and modernizes Angular Crashlytics documentation.

Highlights

  • Automatic Function Calling: Introduced automatic function calling capabilities within the ChatSession for both sendMessage and sendMessageStream, allowing the model to invoke declared functions directly.
  • Function Declaration Enhancements: Added a functionReference property to FunctionDeclaration to link declared functions to actual executable code, enabling automatic execution.
  • Sequential Function Call Limits: Added a maxSequentalFunctionCalls option to RequestOptions to prevent infinite loops during automatic function calling, defaulting to 10.
  • Crashlytics OpenTelemetry Updates: Updated various OpenTelemetry dependencies in Crashlytics to newer versions and refined the logging endpoint URL.
  • Angular Crashlytics Documentation: Updated Angular Crashlytics usage examples in documentation to reflect the modern ApplicationConfig approach instead of @NgModule.

🧠 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.

Changelog
  • .changeset/cool-bulldogs-impress.md
    • Added automatic function calling capability when using ChatSession.
  • common/api-review/ai.api.md
    • Added internal methods _callFunctionsAsNeeded, _formatRequest, and _getCallableFunctionCalls to ChatSession.
    • Added functionReference to FunctionDeclaration.
    • Added parts to FunctionResponse.
    • Added maxSequentalFunctionCalls to RequestOptions.
  • docs-devsite/ai.functiondeclaration.md
    • Documented the new functionReference property for FunctionDeclaration.
  • docs-devsite/ai.functionresponse.md
    • Documented the new parts property for FunctionResponse.
  • docs-devsite/ai.requestoptions.md
    • Documented the new maxSequentalFunctionCalls property for RequestOptions.
  • docs-devsite/crashlytics_angular.firebaseerrorhandler.md
    • Updated Angular Crashlytics usage examples to use ApplicationConfig instead of @NgModule.
  • e2e/smoke-tests/package.json
    • Updated webpack-dev-server dependency to 5.2.1.
  • e2e/smoke-tests/yarn.lock
    • Updated webpack-dev-server and related @types/express-serve-static-core dependencies.
  • package.json
    • Updated lodash dependency to 4.17.23.
  • packages/ai/src/methods/chat-session.test.ts
    • Added extensive tests for automatic function calling in ChatSession, covering single and multiple function calls, and sequential call limits.
  • packages/ai/src/methods/chat-session.ts
    • Implemented automatic function calling logic within sendMessage and sendMessageStream.
    • Added internal methods _formatRequest, _getCallableFunctionCalls, and _callFunctionsAsNeeded.
    • Introduced DEFAULT_MAX_SEQUENTIAL_FUNCTION_CALLS constant.
    • Modified sendMessage and sendMessageStream to handle temporary history and sequential function calls.
  • packages/ai/src/methods/generate-content.ts
    • Modified generateContentStream to return the firstValue of the stream.
  • packages/ai/src/models/generative-model.test.ts
    • Updated mock response file for streaming tests to streaming-success-basic-reply-short.txt.
  • packages/ai/src/models/generative-model.ts
    • Modified generateContentStream call to destructure stream and response and return them.
  • packages/ai/src/requests/response-helpers.ts
    • Modified getFunctionCalls to handle undefined response gracefully.
  • packages/ai/src/requests/stream-reader.test.ts
    • Updated processStream calls to be awaited and added assertions for firstValue.
  • packages/ai/src/requests/stream-reader.ts
    • Modified processStream to be async and return firstValue.
    • Introduced processStreamInternal to handle stream peeking and aggregation.
  • packages/ai/src/types/content.ts
    • Added parts to FunctionResponse interface.
  • packages/ai/src/types/requests.ts
    • Added maxSequentalFunctionCalls to RequestOptions and functionReference to FunctionDeclaration.
  • packages/auth-compat/demo/functions/yarn.lock
    • Updated firebase-admin to 11.11.1.
    • Updated @google-cloud/firestore to ^6.8.0.
    • Updated lodash to 4.17.23.
  • packages/auth-compat/demo/yarn.lock
    • Updated @rollup/plugin-node-resolve to 16.0.0.
    • Updated @rollup/pluginutils to 5.3.0.
    • Updated @types/estree to 1.0.8.
    • Added hasown dependency.
    • Updated is-core-module to 2.16.1.
    • Updated resolve to 1.22.11.
    • Updated typescript to 5.5.4.
    • Updated cjs-module-lexer to 2.2.0.
    • Updated fs-extra to 11.3.3.
    • Updated import-in-the-middle to 2.0.6.
    • Updated module-details-from-path to 1.0.4.
    • Updated protobufjs to 8.0.0.
    • Updated require-in-the-middle to 8.0.1.
    • Removed builtin-modules dependency.
    • Removed @types/node dependency.
    • Removed shimmer dependency.
    • Removed validator dependency.
    • Removed z-schema dependency.
  • packages/auth/demo/functions/yarn.lock
    • Updated firebase-admin to 11.11.1.
    • Updated @google-cloud/firestore to ^6.8.0.
    • Updated lodash to 4.17.23.
  • packages/auth/package.json
    • Updated @rollup/plugin-strip dependency to 3.0.4.
  • packages/crashlytics/package.json
    • Updated @opentelemetry/api-logs to 0.212.0.
    • Updated @opentelemetry/core to 2.5.1.
    • Updated @opentelemetry/exporter-logs-otlp-http to 0.212.0.
    • Updated @opentelemetry/exporter-trace-otlp-proto to 0.212.0.
    • Updated @opentelemetry/instrumentation to 0.212.0.
    • Updated @opentelemetry/instrumentation-document-load to 0.57.0.
    • Updated @opentelemetry/instrumentation-fetch to 0.212.0.
    • Updated @opentelemetry/instrumentation-user-interaction to 0.56.0.
    • Updated @opentelemetry/otlp-exporter-base to 0.212.0.
    • Updated @opentelemetry/otlp-transformer to 0.212.0.
    • Updated @opentelemetry/resources to 2.5.1.
    • Updated @opentelemetry/sdk-logs to 0.212.0.
    • Updated @opentelemetry/sdk-trace-base to 2.5.1.
    • Updated @opentelemetry/sdk-trace-web to 2.5.1.
    • Updated @opentelemetry/semantic-conventions to 1.39.0.
  • packages/crashlytics/src/angular/index.ts
    • Updated Angular Crashlytics usage examples to use ApplicationConfig.
  • packages/crashlytics/src/logging/logger-provider.ts
    • Updated OTLP endpoint URL to include locations/global.
    • Removed logRecordLimits from LoggerProvider constructor.
    • Modified OTLPLogExporter to handle config.headers as Record<string, string> and added shutdown and forceFlush methods.
  • packages/crashlytics/src/service.ts
    • Changed tracingProvider type to TracerProvider | null.
  • packages/crashlytics/src/tracing/tracing-provider.ts
    • Removed FetchInstrumentation and UserInteractionInstrumentation from registered instrumentations.
  • packages/rules-unit-testing/functions/yarn.lock
    • Updated lodash dependency to 4.17.23.
  • repo-scripts/api-documenter/package.json
    • Updated @rushstack/node-core-library dependency to 5.19.1.
  • repo-scripts/api-documenter/src/cli/BaseAction.ts
    • Changed FileSystem.readFolder to FileSystem.readFolderItemNames.
  • repo-scripts/size-analysis/package.json
    • Updated @rollup/plugin-virtual dependency to 3.0.2.
  • yarn.lock
    • Updated @opentelemetry/api-logs to 0.212.0.
    • Updated @opentelemetry/core to 2.5.1.
    • Updated @opentelemetry/exporter-logs-otlp-http to 0.212.0.
    • Updated @opentelemetry/exporter-trace-otlp-proto to 0.212.0.
    • Updated @opentelemetry/instrumentation-document-load to 0.57.0.
    • Updated @opentelemetry/instrumentation-fetch to 0.212.0.
    • Updated @opentelemetry/instrumentation-user-interaction to 0.56.0.
    • Updated @opentelemetry/instrumentation to 0.212.0.
    • Updated @opentelemetry/otlp-exporter-base to 0.212.0.
    • Updated @opentelemetry/otlp-transformer to 0.212.0.
    • Updated @opentelemetry/resources to 2.5.1.
    • Updated @opentelemetry/sdk-logs to 0.212.0.
    • Updated @opentelemetry/sdk-metrics to 2.5.1.
    • Updated @opentelemetry/sdk-trace-base to 2.5.1.
    • Updated @opentelemetry/sdk-trace-web to 2.5.1.
    • Updated @opentelemetry/semantic-conventions to 1.39.0.
    • Updated @rollup/plugin-strip to 3.0.4.
    • Updated @rollup/plugin-virtual to 3.0.2.
    • Updated @rushstack/node-core-library to 5.19.1.
    • Removed @types/shimmer dependency.
    • Updated acorn to 8.16.0.
    • Updated cjs-module-lexer to 2.2.0.
    • Added fs-extra 11.3.3.
    • Added hasown 2.0.2.
    • Updated import-in-the-middle to 2.0.6.
    • Updated is-core-module to 2.16.1.
    • Updated lodash.isequal to 4.5.0.
    • Updated lodash to 4.17.23.
    • Updated module-details-from-path to 1.0.4.
    • Updated protobufjs to 8.0.0.
    • Updated require-in-the-middle to 8.0.1.
    • Removed shimmer dependency.
    • Removed validator dependency.
    • Removed z-schema dependency.
Ignored Files
  • Ignored by pattern: .github/workflows/** (10)
    • .github/workflows/canary-deploy.yml
    • .github/workflows/check-changeset.yml
    • .github/workflows/e2e-test.yml
    • .github/workflows/health-metrics-pull-request.yml
    • .github/workflows/health-metrics-release.yml
    • .github/workflows/prerelease-manual-deploy.yml
    • .github/workflows/release-pr.yml
    • .github/workflows/release-prod.yml
    • .github/workflows/release-staging.yml
    • .github/workflows/test-changed-firestore-integration.yml
Activity
  • MaesterChestnut rebased the crashlytics branch into crashlytics-tracing.
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 introduces automatic function calling for the AI ChatSession and includes several updates to Crashlytics tracing, mainly by upgrading OpenTelemetry dependencies.

My review focuses on these areas. I've found a few issues:

  • There is a recurring typo maxSequentalFunctionCalls in the new public API for AI function calling. This should be corrected to maxSequentialFunctionCalls across all files.
  • The Crashlytics tracing setup has removed FetchInstrumentation and UserInteractionInstrumentation. This could be a significant reduction in tracing capabilities, and it would be good to clarify if this is intentional.
  • The custom OTLPLogExporter has placeholder implementations for shutdown() and forceFlush() that should be corrected to ensure proper behavior, like preventing log loss on shutdown.

I've left specific comments with suggestions on the relevant files.

I am having trouble creating individual review comments. Click here to see my feedback.

packages/ai/src/types/requests.ts (255-263)

critical

There's a typo in maxSequentalFunctionCalls. It should be maxSequentialFunctionCalls (sequential, not sequental). This typo appears in multiple places in the codebase (API definitions, implementation, tests, and documentation). Since this is part of the public API, it's important to correct it before it gets released.

  /**
   * Limits amount of sequential function calls the SDK can make during automatic
   * function calling, in order to prevent infinite loops. If not specified,
   * this value defaults to 10.
   *
   * When it reaches this limit, it will return the last response received
   * from the model, whether it is a text response or further function calls.
   */
  maxSequentialFunctionCalls?: number;

packages/crashlytics/src/tracing/tracing-provider.ts (85-87)

high

This change removes FetchInstrumentation and UserInteractionInstrumentation. This means that fetch requests and user interactions will no longer be automatically traced. Is this removal intentional? If so, it would be good to document the reasoning behind this change in the PR description as it seems like a significant reduction in tracing capabilities.

packages/crashlytics/src/logging/logger-provider.ts (126-134)

medium

The implementations for shutdown and forceFlush seem to be placeholders that only log to the console. This is misleading and can cause issues.

For shutdown, it should call super.shutdown() to ensure the base exporter is properly shut down, which is crucial for preventing data loss.

For forceFlush, a simple return Promise.resolve(); would be more appropriate, as this method is often a no-op in exporters that don't buffer, and logging to console is unnecessary noise.

  async shutdown(): Promise<void> {
    return super.shutdown();
  }

  async forceFlush(): Promise<void> {
    return Promise.resolve();
  }

@MaesterChestnut MaesterChestnut merged commit e2608ae into crashlytics-tracing Feb 27, 2026
31 of 40 checks passed
@MaesterChestnut MaesterChestnut deleted the crashTracingRebase branch February 27, 2026 15:18
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.

6 participants