feat(node, bun): Enforce minimum collection interval in runtime metrics integrations#20068
Merged
feat(node, bun): Enforce minimum collection interval in runtime metrics integrations#20068
Conversation
Contributor
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Deps
Other
Bug Fixes 🐛
Internal Changes 🔧Core
Deps
Other
🤖 This preview updates automatically when you update the PR. |
Contributor
size-limit report 📦
|
Contributor
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
…public API Exporting _INTERNAL_normalizeCollectionInterval from @sentry/node triggers the consistent-exports check, requiring all node-dependent packages to re-export it. Inline the logic in bun directly instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…om node public API" This reverts commit 6fc3c7a.
…kages The consistent exports CI check requires that packages depending on @sentry/node re-export everything @sentry/node exports. Add the missing _INTERNAL_normalizeCollectionInterval re-export to @sentry/astro, @sentry/bun, @sentry/aws-serverless, and @sentry/google-cloud-serverless. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…dent packages" This reverts commit f9b34c4.
…s check This export is an internal helper consumed by integrations (e.g. bunRuntimeMetricsIntegration) and does not need to be re-exported by every package that depends on @sentry/node. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
nicohrubec
reviewed
Apr 2, 2026
nicohrubec
approved these changes
Apr 2, 2026
…valMs is NaN Previously, non-finite values like NaN would fall back to the 1000ms minimum, which could surprise users expecting the documented default. Distinguish between two error cases: - NaN/Infinity: invalid input → fall back to the integration's default - Below minimum: too low → clamp to 1000ms minimum Update _INTERNAL_normalizeCollectionInterval to accept a defaultInterval parameter and apply it for non-finite inputs. Update deno's inline logic and all tests accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
console.warnNaN) are also caught and fall back to 1000ms_INTERNAL_normalizeCollectionIntervalhelper extracted to@sentry/node-coreand re-exported through@sentry/nodefor use in@sentry/bunDEFAULT_INTERVAL_MS