-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Comparing changes
Open a pull request
base repository: getsentry/sentry-javascript
base: 10.14.0
head repository: getsentry/sentry-javascript
compare: 10.15.0
- 15 commits
- 242 files changed
- 11 contributors
Commits on Sep 23, 2025
-
build: Add
@typescript-eslint/no-unnecessary-type-assertion
rule (#……17728) This PR adds the [no-unnecessary-type-assertion](https://typescript-eslint.io/rules/no-unnecessary-type-assertion/) eslint rule. This rule captures unneeded type assertions/conversions. E.g. the following code will be raised: ```js const thing = { name: 'string' }; // no need for !, this def. exists thing!.name // no need to cast to string, as this is already the type thing.name as string; ``` note that this also expects you to use generics where possible instead of casting types, which is nicer anyhow (e.g. `getIntegrationByName<IntegrationType>(..)` vs `getIntegrationByName(..) as IntegrationType`).
Configuration menu - View commit details
-
Copy full SHA for 1e6fde6 - Browse repository at this point
Copy the full SHA 1e6fde6View commit details -
Merge branch 'release/10.14.0'
getsentry-bot committedSep 23, 2025 Configuration menu - View commit details
-
Copy full SHA for d28c34d - Browse repository at this point
Copy the full SHA d28c34dView commit details -
Merge pull request #17740 from getsentry/master
[Gitflow] Merge master into develop
Configuration menu - View commit details
-
Copy full SHA for 48b2b6d - Browse repository at this point
Copy the full SHA 48b2b6dView commit details -
build: Update TS target to
es2020
everywhere (#17709)We already officially only support es2020, so we may as well also use this as lib & target everywhere.
Configuration menu - View commit details
-
Copy full SHA for 75e502f - Browse repository at this point
Copy the full SHA 75e502fView commit details -
feat(browser): Add
setActiveSpanInBrowser
to set an active span in ……the browser (#17714) This PR adds a long-requested feature to the browser SDKs (only!): Making an inactive span active. We do this to enable use cases where having a span only being active in the callback is not practical (see #13495 for examples). There are a couple of caveats to this feature: - This on purpose is only exported from the browser SDKs. We cannot support this in Node, due to OTel not allowing for a similar hack. Frankly, it also makes no sense in Node-based SDKs. - Calling `setActiveSpanInBrowser ` on a nested child span, will make that child span the active span as long as it is active. However, due to `parentSpanIsAlwaysRootSpan` defaulting to `true` any child span of the active child span, will still be parented to the root span. By setting `parentSpanIsAlwaysRootSpan: false`, the span hierarchy is respected and child spans are correctly parented to the active span. Note that this cannot be guaranteed to work perfectly, due to missing async context in the browser. See tests for the `parentSpanIsAlwaysRootSpan` behaviour. - A span once set active, cannot be set as inactive again. It will remain active until it is ended or until another span is set active. In the latter case, once that span ends, the initial span will be set as active again until it ends. This is reflected in the types where we by design only allow `Span` to be passed to `setActiveSpanInBrowser `. Technically, `setActiveSpanInBrowser` uses `_setSpanForScope` which I decided to re-export from core as `_INTERNAL_setSpanForScope`, similarly to how we do it with logs APIs. ### Usage This example shows one of the most frequent use cases where having an active, callback-unbound span is useful: ```js function instrumentMyRouter() { let routeSpan; on('routeStart', (from, to) => { routeSpan = Sentry.startInactiveSpan({name: `/${from} -> /${to}`}); Sentry. setActiveSpanInBrowser(rootSpan); }); // any span started in the meantime (e.g. fetch requests) will be // automatically parented to `routeSpan` on('routeEnd', () => { // automatically removes the span from the scope routeSpan.end(); }) } ``` closes #13495
Configuration menu - View commit details
-
Copy full SHA for 73f356d - Browse repository at this point
Copy the full SHA 73f356dView commit details -
feat(node): Add instrumentation for hono handler (#17428)
## Summary This PR enhances the Hono integration by adding comprehensive handler instrumentation, error handling capabilities, and thorough test coverage. The changes build upon the basic Hono integration to provide a complete tracing and error monitoring solution. ## New Features - Handler Instrumentation: Added instrumentation for Hono handlers and middleware, providing detailed tracing capabilities - Error Handler: Implemented setupHonoErrorHandler() function to capture and report errors to Sentry with configurable error filtering - Public API: Added Hono integration to the main package exports, making it available as @sentry/node - Tracing Module: Included Hono integration in the tracing integrations index ## Bug Fixes - CJS Compatibility: Fixed an issue where applying patches failed in CommonJS environments - Type Corrections: Fixed incorrect MiddlewareHandler type definition to ensure proper TypeScript support ## Implementation Details - Instrumentation: Created HonoInstrumentation class that wraps Hono middleware handlers via class extension instead of function replacement for better compatibility - Type Definitions: Added comprehensive TypeScript type definitions vendored from Hono's official types - Constants: Defined Hono-specific attribute names for OpenTelemetry integration - CJS Compatibility: Fixed patching issues in CommonJS environments ## Testing - Integration Tests: Added comprehensive test suite covering: - ESM and CJS compatibility - Multiple HTTP methods (GET, POST, PUT, DELETE, PATCH) - Various route patterns (sync/async, different paths) - Middleware and handler instrumentation verification - Error handling scenarios - Span attribute validation ## Related Issue close #15260
Configuration menu - View commit details
-
Copy full SHA for 01fa69d - Browse repository at this point
Copy the full SHA 01fa69dView commit details -
chore: Add external contributor to CHANGELOG.md (#17745)
This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #17428 Co-authored-by: s1gr1d <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 16ee36a - Browse repository at this point
Copy the full SHA 16ee36aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c084bd6 - Browse repository at this point
Copy the full SHA c084bd6View commit details
Commits on Sep 24, 2025
-
feat(aws): Enable Lambda extension by default when using the Lamba la…
…yer (#17684) Enables the Lambda extension by default when using the Lambda layer --------- Co-authored-by: Francesco Gringl-Novy <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 678d6e8 - Browse repository at this point
Copy the full SHA 678d6e8View commit details -
fix(browser): Improve handling of
0
andundefined
resource timing…… values (#17751) This patch - drops any `http.request.*` timing attributes where the original value was `undefined` - sends `0` for any `http.request.*` timing attribte values that were originally `0` (i.e. no longer converts them to the `timeOrigin` absolute timestamp) --------- Co-authored-by: Abhijeet Prasad <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 105f78e - Browse repository at this point
Copy the full SHA 105f78eView commit details -
docs: Reword changelog for google gen ai instrumentation (#17753)
Rewording this as it is not actually correct, this is not auto-instrumented but needs to be done manually - see #17723
Configuration menu - View commit details
-
Copy full SHA for e419420 - Browse repository at this point
Copy the full SHA e419420View commit details -
feat(cloudflare): Add
honoIntegration
with error-filtering function (……#17743) This adds a `honoIntegration` that exposes a `shouldHandleError` function that lets users define a custom handling of capturing errors. By default, we capture exceptions with `error.status >= 500 || error.status <= 299`. It's possible to modify this behavior like this: ```js integrations: [ honoIntegration({ shouldHandleError: (err) => true; // always capture exceptions in onError }) ] ``` **Up for discussion**: The function name is the same like in express/fastify to keep it consistent. But I was also thinking about other names like `shouldHandleInOnError` or `shouldCaptureOnError` 🤔 Because it's specifically about the `onError` function. Let me know what you think. closes #17717
Configuration menu - View commit details
-
Copy full SHA for 34538c8 - Browse repository at this point
Copy the full SHA 34538c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 75796c5 - Browse repository at this point
Copy the full SHA 75796c5View commit details -
Merge pull request #17756 from getsentry/prepare-release/10.15.0
meta(changelog): Update changelog for 10.15.0
Configuration menu - View commit details
-
Copy full SHA for 2d54234 - Browse repository at this point
Copy the full SHA 2d54234View commit details -
Configuration menu - View commit details
-
Copy full SHA for d1366f4 - Browse repository at this point
Copy the full SHA d1366f4View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 10.14.0...10.15.0