diff --git a/package.json b/package.json index 5e50976cc7c45..b3eb4b483d8b9 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "js-cookie": "^3.0.5", "js-yaml": "^3.0.0", "jsdom": "^22.1.0", - "platformicons": "^5.6.0", + "platformicons": "^5.6.4", "prism-sentry": "^1.0.2", "prismjs": "^1.27.0", "query-string": "^6.13.1", diff --git a/src/components/guideGrid.tsx b/src/components/guideGrid.tsx index baab81d7a602f..9cf6e1e70b9b3 100644 --- a/src/components/guideGrid.tsx +++ b/src/components/guideGrid.tsx @@ -26,7 +26,7 @@ export function GuideGrid({platform, className}: Props) {
  • diff --git a/src/components/hooks/usePlatform.tsx b/src/components/hooks/usePlatform.tsx index 61680c0bf478c..338889703262f 100644 --- a/src/components/hooks/usePlatform.tsx +++ b/src/components/hooks/usePlatform.tsx @@ -17,6 +17,7 @@ const query = graphql` title url sdk + icon caseStyle supportLevel fallbackPlatform @@ -26,6 +27,7 @@ const query = graphql` name title url + icon sdk caseStyle supportLevel diff --git a/src/components/navbarPlatformDropdown.tsx b/src/components/navbarPlatformDropdown.tsx index d3e75ba635f79..5f557ef1534a4 100644 --- a/src/components/navbarPlatformDropdown.tsx +++ b/src/components/navbarPlatformDropdown.tsx @@ -14,7 +14,7 @@ export function NavbarPlatformDropdown() { currentPlatform ? ( diff --git a/src/components/platformLinkWithLogo.tsx b/src/components/platformLinkWithLogo.tsx index 0ad1c5e222700..3e3aee723dba1 100644 --- a/src/components/platformLinkWithLogo.tsx +++ b/src/components/platformLinkWithLogo.tsx @@ -21,7 +21,7 @@ export function PlatformLinkWithLogo({platform, label, url}: Props) { { categories: [PlatformCategory!] url: String! fallbackPlatform: String! + icon: String } type Platform implements Node { @@ -44,6 +45,7 @@ export const getPlatformTypeDefs = () => { categories: [PlatformCategory!] url: String! fallbackPlatform: String + icon: String } `, ]; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 9fb8d01457e7a..5f7b30ccc0335 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -128,7 +128,11 @@ function IndexPage() { {visiblePlatforms.map(platform => (
    - +
    {platform.title}
    diff --git a/src/pages/platform-redirect.tsx b/src/pages/platform-redirect.tsx index d00770dfccc67..3f9fd5c1a6e88 100644 --- a/src/pages/platform-redirect.tsx +++ b/src/pages/platform-redirect.tsx @@ -29,7 +29,7 @@ function BasePlatformRedirect({path = '/'}: Props) { diff --git a/src/platform-includes/getting-started-config/javascript.bun.mdx b/src/platform-includes/getting-started-config/javascript.bun.mdx new file mode 100644 index 0000000000000..c889539cb1335 --- /dev/null +++ b/src/platform-includes/getting-started-config/javascript.bun.mdx @@ -0,0 +1,12 @@ +Once installed, you can capture exceptions manually for now. + + + +```javascript {tabTitle:ESM} +import * as Sentry from "@sentry/bun"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + tracesSampleRate: 1.0, +}); +``` diff --git a/src/platform-includes/getting-started-install/javascript.bun.mdx b/src/platform-includes/getting-started-install/javascript.bun.mdx new file mode 100644 index 0000000000000..9cb40312f4cc4 --- /dev/null +++ b/src/platform-includes/getting-started-install/javascript.bun.mdx @@ -0,0 +1,3 @@ +```bash {tabTitle:Bun} +bun add @sentry/bun +``` diff --git a/src/platform-includes/getting-started-primer/javascript.bun.mdx b/src/platform-includes/getting-started-primer/javascript.bun.mdx new file mode 100644 index 0000000000000..eb4697d019d60 --- /dev/null +++ b/src/platform-includes/getting-started-primer/javascript.bun.mdx @@ -0,0 +1,12 @@ + + +The Bun SDK is currently in Beta. + + + + + +It's not possible to capture global unhandled exceptions, unhandled promise rejections now - Bun is working on adding support for it. +[Github Issue](https://github.com/oven-sh/bun/issues/5091) follow this issue. + + diff --git a/src/platform-includes/getting-started-sourcemaps/javascript.bun.mdx b/src/platform-includes/getting-started-sourcemaps/javascript.bun.mdx new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/src/platform-includes/getting-started-verify/javascript.bun.mdx b/src/platform-includes/getting-started-verify/javascript.bun.mdx new file mode 100644 index 0000000000000..7d76223a64426 --- /dev/null +++ b/src/platform-includes/getting-started-verify/javascript.bun.mdx @@ -0,0 +1,16 @@ +```javascript +const transaction = Sentry.startTransaction({ + op: "test", + name: "My First Test Transaction", +}); + +setTimeout(() => { + try { + foo(); + } catch (e) { + Sentry.captureException(e); + } finally { + transaction.finish(); + } +}, 99); +``` diff --git a/src/platform-includes/performance/automatic-instrumentation-intro/javascript.bun.mdx b/src/platform-includes/performance/automatic-instrumentation-intro/javascript.bun.mdx new file mode 100644 index 0000000000000..ddddfb99d5822 --- /dev/null +++ b/src/platform-includes/performance/automatic-instrumentation-intro/javascript.bun.mdx @@ -0,0 +1 @@ +The Sentry SDK provides a `Tracing` integration to add automatic instrumentation for monitoring the performance of your application. diff --git a/src/platform-includes/performance/configure-sample-rate/javascript.bun.mdx b/src/platform-includes/performance/configure-sample-rate/javascript.bun.mdx new file mode 100644 index 0000000000000..973d6124220a0 --- /dev/null +++ b/src/platform-includes/performance/configure-sample-rate/javascript.bun.mdx @@ -0,0 +1,17 @@ + + +```javascript +import * as Sentry from "@sentry/bun"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [new Sentry.Tracing()], + + // We recommend adjusting this value in production, or using tracesSampler + // for finer control + tracesSampleRate: 1.0, + + // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled + tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], +}); +``` diff --git a/src/platform-includes/performance/enable-automatic-instrumentation/javascript.bun.mdx b/src/platform-includes/performance/enable-automatic-instrumentation/javascript.bun.mdx new file mode 100644 index 0000000000000..e502666b50172 --- /dev/null +++ b/src/platform-includes/performance/enable-automatic-instrumentation/javascript.bun.mdx @@ -0,0 +1,17 @@ +To enable tracing, include the `Tracing` integration in your SDK configuration options. + + + +```javascript +import * as Sentry from "@sentry/bun"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + + integrations: [new Sentry.Tracing()], + + // We recommend adjusting this value in production, or using tracesSampler + // for finer control + tracesSampleRate: 1.0, +}); +``` diff --git a/src/platform-includes/performance/enable-tracing/javascript.bun.mdx b/src/platform-includes/performance/enable-tracing/javascript.bun.mdx new file mode 100644 index 0000000000000..7a277149ea14f --- /dev/null +++ b/src/platform-includes/performance/enable-tracing/javascript.bun.mdx @@ -0,0 +1 @@ +Tracing is available by default in the Sentry Bun. diff --git a/src/platforms/common/index.mdx b/src/platforms/common/index.mdx index 1986dc16db23a..649cc41e1abec 100644 --- a/src/platforms/common/index.mdx +++ b/src/platforms/common/index.mdx @@ -1,6 +1,6 @@ -On this page, we get you up and running with Sentry's SDK, so that it will automatically report errors and exceptions in your application. +On this page, we get you up and running with Sentry's SDK. diff --git a/src/platforms/javascript/common/install/index.mdx b/src/platforms/javascript/common/install/index.mdx index fbf40ef81d04f..d78433334f660 100644 --- a/src/platforms/javascript/common/install/index.mdx +++ b/src/platforms/javascript/common/install/index.mdx @@ -4,6 +4,7 @@ sidebar_order: 1 description: "Review our alternate installation methods." notSupported: - javascript.angular + - javascript.bun - javascript.capacitor - javascript.cordova - javascript.electron diff --git a/src/platforms/javascript/common/profiling/index.mdx b/src/platforms/javascript/common/profiling/index.mdx index 054de7d0ca93e..d7a0e81c6fd49 100644 --- a/src/platforms/javascript/common/profiling/index.mdx +++ b/src/platforms/javascript/common/profiling/index.mdx @@ -3,6 +3,8 @@ title: Profiling sidebar_order: 1 supported: - javascript +notSupported: + - javascript.bun description: "Learn what transactions are captured after tracing is enabled." --- diff --git a/src/platforms/javascript/guides/bun/config.yml b/src/platforms/javascript/guides/bun/config.yml new file mode 100644 index 0000000000000..2745973fb2540 --- /dev/null +++ b/src/platforms/javascript/guides/bun/config.yml @@ -0,0 +1,9 @@ +title: Bun +sdk: sentry.javascript.bun +fallbackPlatform: javascript +caseStyle: camelCase +supportLevel: production +icon: bun +categories: + - browser + - server diff --git a/src/types/platform.tsx b/src/types/platform.tsx index 59c7268677222..faa3a55aeb510 100644 --- a/src/types/platform.tsx +++ b/src/types/platform.tsx @@ -96,6 +96,10 @@ export interface PlatformConfig { * inherit configuration values from the parent platform. */ fallbackPlatform?: string; + /** + * The icon to use for this platform. This is the name of the icon as defined + */ + icon?: string; /** * Keywords used for search etc. */ diff --git a/yarn.lock b/yarn.lock index ab30bffda602b..15ab3e53a071d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12162,10 +12162,10 @@ platform@^1.3.6: resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7" integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== -platformicons@^5.6.0: - version "5.6.2" - resolved "https://registry.yarnpkg.com/platformicons/-/platformicons-5.6.2.tgz#24d109e56c3dcedbac513f5b8fa73335e0eddd1e" - integrity sha512-2X/cWYohEqVAMQiz/MCVjgJaFEX/jiSXncqcgnMztPcsCSL5JpLn4d8CBeSBjpMIDTlCvGF90p0vM0oc7yGTpA== +platformicons@^5.6.4: + version "5.6.4" + resolved "https://registry.yarnpkg.com/platformicons/-/platformicons-5.6.4.tgz#1c5b5aa410ea3f4a5113214863c08b7a5d7e5fc8" + integrity sha512-Mx6EEBC0XuwY7RU8Qa7YCdjhXj0QV7aFx1gYyBH8iEzz7uCLQmP7gj9WLfEu1WGo69AeJlkTjX6ViiEfTbUZOQ== dependencies: "@types/node" "*" "@types/react" "*"