Skip to content

Crashlytics disable otel auto flush - #10379

Draft
bryanatkinson wants to merge 4 commits into
crashlytics2from
crashlytics-disable-otel-auto-flush
Draft

bryanatkinson wants to merge 4 commits into
crashlytics2from
crashlytics-disable-otel-auto-flush

Conversation

@bryanatkinson

Copy link
Copy Markdown
Contributor

We already register listeners and flush in helpers.ts. Without this setting, the BatchLogRecordProcessor also registers listeners and flushes the logs, but if that flush fails it enqueues an error log to be exported again: https://github.com/open-telemetry/opentelemetry-js/blob/3d1d427a445d6d1b76b94785c3d0f4048e38cc69/experimental/packages/sdk-logs/src/platform/browser/export/BatchLogRecordProcessor.ts#L40-L47

@changeset-bot

changeset-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 505695f

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 gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 configures the BatchLogRecordProcessor with disableAutoFlushOnDocumentHide: true in logger-provider.ts and adds corresponding unit tests. The review feedback suggests refactoring the tests to avoid fragile deep imports and global mocking of third-party internals. Instead, it is recommended to import @opentelemetry/sdk-logs as a namespace and spy on BatchLogRecordProcessor to verify that the configuration options are passed correctly.

Comment thread packages/crashlytics/src/logging/logger-provider.test.ts
Comment thread packages/crashlytics/src/logging/logger-provider.test.ts
@bryanatkinson
bryanatkinson force-pushed the crashlytics-disable-otel-auto-flush branch from 20704a6 to d7a09b1 Compare September 11, 2026 19:58
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.

1 participant