Skip to content

Commit

Permalink
feat: Update Sentry SDKs to v8.14.0 (#937)
Browse files Browse the repository at this point in the history
  • Loading branch information
timfish authored Jul 6, 2024
1 parent eeef359 commit a22fd7d
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 111 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@
"e2e": "xvfb-maybe vitest run --root=./test/e2e --silent=false --disable-console-intercept"
},
"dependencies": {
"@sentry/browser": "8.13.0",
"@sentry/core": "8.13.0",
"@sentry/node": "8.13.0",
"@sentry/types": "8.13.0",
"@sentry/utils": "8.13.0",
"@sentry/browser": "8.14.0",
"@sentry/core": "8.14.0",
"@sentry/node": "8.14.0",
"@sentry/types": "8.14.0",
"@sentry/utils": "8.14.0",
"deepmerge": "4.3.1"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@sentry-internal/eslint-config-sdk": "8.13.0",
"@sentry-internal/typescript": "8.13.0",
"@sentry-internal/eslint-config-sdk": "8.14.0",
"@sentry-internal/typescript": "8.14.0",
"@types/busboy": "^0.2.3",
"@types/form-data": "^2.5.0",
"@types/koa": "^2.0.52",
Expand Down
23 changes: 22 additions & 1 deletion src/renderer/metrics.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { MetricData } from '@sentry/core';
import { metrics as metricsCore } from '@sentry/core';
import { MeasurementUnit, MetricsAggregator, Primitive } from '@sentry/types';
import { DurationUnit, MeasurementUnit, MetricsAggregator, Primitive } from '@sentry/types';

import { IPCInterface } from '../common/ipc';
import { getIPC } from './ipc';
Expand Down Expand Up @@ -79,9 +79,30 @@ function gauge(name: string, value: number, data?: MetricData): void {
metricsCore.gauge(ElectronRendererMetricsAggregator, name, value, data);
}

/**
* Adds a timing metric.
* The metric is added as a distribution metric.
*
* You can either directly capture a numeric `value`, or wrap a callback function in `timing`.
* In the latter case, the duration of the callback execution will be captured as a span & a metric.
*
* @experimental This API is experimental and might have breaking changes in the future.
*/
function timing(name: string, value: number, unit?: DurationUnit, data?: Omit<MetricData, 'unit'>): void;
function timing<T>(name: string, callback: () => T, unit?: DurationUnit, data?: Omit<MetricData, 'unit'>): T;
function timing<T = void>(
name: string,
value: number | (() => T),
unit: DurationUnit = 'second',
data?: Omit<MetricData, 'unit'>,
): T | void {
metricsCore.timing(ElectronRendererMetricsAggregator, name, value, unit, data);
}

export const metrics = {
increment,
distribution,
set,
gauge,
timing,
};
2 changes: 1 addition & 1 deletion src/renderer/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ interface ElectronRendererOptions extends BrowserOptions {
export function init<O extends ElectronRendererOptions>(
options: ElectronRendererOptions & O = {} as ElectronRendererOptions & O,
// This parameter name ensures that TypeScript error messages contain a hint for fixing SDK version mismatches
originalInit: (if_you_get_a_typescript_error_ensure_sdks_use_version_v8_13_0: O) => void = browserInit,
originalInit: (if_you_get_a_typescript_error_ensure_sdks_use_version_v8_14_0: O) => void = browserInit,
): void {
// Ensure the browser SDK is only init'ed once.
if (window?.__SENTRY__RENDERER_INIT__) {
Expand Down
204 changes: 102 additions & 102 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -572,10 +572,10 @@
"@pnpm/network.ca-file" "^1.0.1"
config-chain "^1.1.11"

"@prisma/[email protected].0":
version "5.16.0"
resolved "https://registry.yarnpkg.com/@prisma/instrumentation/-/instrumentation-5.16.0.tgz#ee50f851945364c43e4067b84fe4071235ca3dd2"
integrity sha512-MVzNRW2ikWvVNnMIEgQMcwWxpFD+XF2U2h0Qz7MjutRqJxrhWexWV2aSi2OXRaU8UL5wzWw7pnjdKUzYhWauLg==
"@prisma/[email protected].1":
version "5.16.1"
resolved "https://registry.yarnpkg.com/@prisma/instrumentation/-/instrumentation-5.16.1.tgz#93f996f9c95874156badbb5edbb97994667f7c3f"
integrity sha512-4m5gRFWnQb8s/yTyGbMZkL7A5uJgqOWcWJxapwcAD0T0kh5sGPEVSQl/zTQvE9aduXhFAxOtC3gO+R8Hb5xO1Q==
dependencies:
"@opentelemetry/api" "^1.8"
"@opentelemetry/instrumentation" "^0.49 || ^0.50 || ^0.51 || ^0.52.0"
Expand Down Expand Up @@ -690,22 +690,22 @@
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.16.4.tgz#c09ad9a132ccb5a67c4f211d909323ab1294f95f"
integrity sha512-YunpoOAyGLDseanENHmbFvQSfVL5BxW3k7hhy0eN4rb3gS/ct75dVD0EXOWIqFT/nE8XYW6LP6vz6ctKRi0k9A==

"@sentry-internal/browser-utils@8.13.0":
version "8.13.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.13.0.tgz#b7c3bdd49d2382f60dde31745716d29dd419b6ba"
integrity sha512-lqq8BYbbs9KTlDuyB5NjdZB6P/llqQs32KUgaCQ/k5DFB4Zf56+BFHXObnMHxwx375X1uixtnEphagWZa+nsLQ==
"@sentry-internal/browser-utils@8.14.0":
version "8.14.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.14.0.tgz#2a50823c43fcea26846fd0088c8712e36ab0dab5"
integrity sha512-ldIa3qeMYZ5WUdcuBqQhXOSrEPZwB09gmELzFietjcPZTK1naAE5g5On94gpj1je1dn1S0+tXJ0a7SJS9Tu4Sw==
dependencies:
"@sentry/core" "8.13.0"
"@sentry/types" "8.13.0"
"@sentry/utils" "8.13.0"
"@sentry/core" "8.14.0"
"@sentry/types" "8.14.0"
"@sentry/utils" "8.14.0"

"@sentry-internal/eslint-config-sdk@8.13.0":
version "8.13.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-config-sdk/-/eslint-config-sdk-8.13.0.tgz#5d5e2607bb15ab965a50a94f93c0735bfda00b79"
integrity sha512-Dlro9JTzl9i2xzzb4gAyFOHB8Fg2bmJEmLa+9dzpNtA5grG0WGRMhfO4qla1mcMEpwUpf8ejLl4Lllgga2gX0A==
"@sentry-internal/eslint-config-sdk@8.14.0":
version "8.14.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-config-sdk/-/eslint-config-sdk-8.14.0.tgz#148cde61cbff52510107fb8c55edd8941e1c6004"
integrity sha512-nyDPU39/8fiD9lPyOlHiNVWorDJTIQuk6GRHi04Obsv0xIXem7uQh4crxn1No2cj9K6kyaYeNgar3iLvVGYPog==
dependencies:
"@sentry-internal/eslint-plugin-sdk" "8.13.0"
"@sentry-internal/typescript" "8.13.0"
"@sentry-internal/eslint-plugin-sdk" "8.14.0"
"@sentry-internal/typescript" "8.14.0"
"@typescript-eslint/eslint-plugin" "^5.48.0"
"@typescript-eslint/parser" "^5.48.0"
eslint-config-prettier "^6.11.0"
Expand All @@ -715,70 +715,70 @@
eslint-plugin-jsdoc "^30.0.3"
eslint-plugin-simple-import-sort "^5.0.3"

"@sentry-internal/eslint-plugin-sdk@8.13.0":
version "8.13.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-plugin-sdk/-/eslint-plugin-sdk-8.13.0.tgz#2ccc36db76eb5bbeb1293aaa87616e378f2cd9d0"
integrity sha512-OYCPIm5ETdaBUn4262LzJSV+eAVXwbtlkMuCshwd441Sm8cD+DkwZQYpZKRKlppt0YlsfhkJaZqaRYgB0LxNpA==

"@sentry-internal/feedback@8.13.0":
version "8.13.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.13.0.tgz#100eeeb558536e2390ded8fb58cba3984ac41abd"
integrity sha512-YyJ6SzpTonixvguAg0H9vkEp7Jq8ZeVY8M4n47ClR0+TtaAUp04ZhcJpHKF7PwBIAzc7DRr2XP112tmWgiVEcg==
dependencies:
"@sentry/core" "8.13.0"
"@sentry/types" "8.13.0"
"@sentry/utils" "8.13.0"

"@sentry-internal/replay-canvas@8.13.0":
version "8.13.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.13.0.tgz#fce0fb82ab85badb421244d75bc616948fb6db64"
integrity sha512-lPlfWVIHX+gW4S8a/UOVutuqMyQhlkNUAay0W21MVhZJT5Mtj0p21D/Cz7nrOQRDIiLNq90KAGK2tLxx5NkiWA==
dependencies:
"@sentry-internal/replay" "8.13.0"
"@sentry/core" "8.13.0"
"@sentry/types" "8.13.0"
"@sentry/utils" "8.13.0"

"@sentry-internal/replay@8.13.0":
version "8.13.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.13.0.tgz#84e57e3596e24ad0bc31eb61540c81c3737c09ff"
integrity sha512-DJ1jF/Pab0FH4SeCvSGCnGAu/s0wJvhBWM5VjQp7Jjmcfunp+R3vJibqU8gAVZU1nYRLaqprLdIXrSyP2Km8nQ==
dependencies:
"@sentry-internal/browser-utils" "8.13.0"
"@sentry/core" "8.13.0"
"@sentry/types" "8.13.0"
"@sentry/utils" "8.13.0"

"@sentry-internal/typescript@8.13.0":
version "8.13.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/typescript/-/typescript-8.13.0.tgz#3746383085114aeb8910ab745ff9a2feb03392ae"
integrity sha512-QSrwIcSrO1N/9OmQawUrBuBN20jjoD/GXG8uniq6fxVObparhQEl+C3GqcXd6sjb0/E24QfF8T5clxQt0PNxbQ==

"@sentry/browser@8.13.0":
version "8.13.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.13.0.tgz#38329ff716d681d8dc5445c1660698b186d05723"
integrity sha512-/tp7HZ5qjwDLtwooPMoexdAi2PG7gMNY0bHeMlwy20hs8mclC8RW8ZiJA6czXHfgnbmvxfrHaY53IJyz//JnlA==
dependencies:
"@sentry-internal/browser-utils" "8.13.0"
"@sentry-internal/feedback" "8.13.0"
"@sentry-internal/replay" "8.13.0"
"@sentry-internal/replay-canvas" "8.13.0"
"@sentry/core" "8.13.0"
"@sentry/types" "8.13.0"
"@sentry/utils" "8.13.0"

"@sentry/core@8.13.0":
version "8.13.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.13.0.tgz#5b2a83402013b828bf2c49c82e751ca490f8669a"
integrity sha512-N9Qg4ZGxZWp8eb2eUUHVVKgjBLtFIjS805nG92s6yJmkvOpKm6mLtcUaT/iDf3Hta6nG+xRkhbE3r+Z4cbXG8w==
dependencies:
"@sentry/types" "8.13.0"
"@sentry/utils" "8.13.0"

"@sentry/node@8.13.0":
version "8.13.0"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-8.13.0.tgz#5c41099b755a7c1f422c72ccbb5cbd93d6ecae94"
integrity sha512-OeZ7K90RhyxfwfreerIi4cszzHrPRRH36STJno2+p3sIGbG5VScOccqXzYEOAqHpByxnti4KQN34BLAT2BFOEA==
"@sentry-internal/eslint-plugin-sdk@8.14.0":
version "8.14.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-plugin-sdk/-/eslint-plugin-sdk-8.14.0.tgz#6c4999248a90236a542ac8552585623b7d59c5e8"
integrity sha512-XcljbXC3bHtsQ/Jga7HX4zkbD8KwwqmN7TMamC5gd+1Lz6lUhK7Qd3q/OtTVNEPTDX0VODtNuHJMU/AwPHpCIg==

"@sentry-internal/feedback@8.14.0":
version "8.14.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.14.0.tgz#bed1d59267406b638fd47a371999fb7d61251515"
integrity sha512-0mBSTdoCEgzWS4btIIZF8XSnAo0eK6gr7Md7xVVOZMd/er0DgYVKl+z3dMoidyijGcrAlJssECUxWHOV3iJitQ==
dependencies:
"@sentry/core" "8.14.0"
"@sentry/types" "8.14.0"
"@sentry/utils" "8.14.0"

"@sentry-internal/replay-canvas@8.14.0":
version "8.14.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.14.0.tgz#5e7351a70a5da582b8cc19f26398a5987feb4255"
integrity sha512-8md1ZxuEk51PNFPbwxVDc7RJ7RSNWHiGLNWYQO/MTKonZf78x4OfQLNIHgQ4z4nMUP38NfjMVkNi21LGW+vMNA==
dependencies:
"@sentry-internal/replay" "8.14.0"
"@sentry/core" "8.14.0"
"@sentry/types" "8.14.0"
"@sentry/utils" "8.14.0"

"@sentry-internal/replay@8.14.0":
version "8.14.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.14.0.tgz#1c9f842febddb0147bbe7e38b0c7b65cbaed2d0f"
integrity sha512-ntc4+1asXCUvM/Oiot/z3+mlCZ83imphbPdiI9ilLErQjDsXFsvNTXe6a0TMoCckKcnypTG6LFyQS62okDiG5Q==
dependencies:
"@sentry-internal/browser-utils" "8.14.0"
"@sentry/core" "8.14.0"
"@sentry/types" "8.14.0"
"@sentry/utils" "8.14.0"

"@sentry-internal/typescript@8.14.0":
version "8.14.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/typescript/-/typescript-8.14.0.tgz#cb07c021354e1e942b5489ec9dcf74fb1797515c"
integrity sha512-JwievGa806UV9JVrhVKhOS30+l9qcTbls+VudojYrsCu58HUSsiGhvoZDoB8uPKKwXSyJzZsRdGdsVvK4F5xPw==

"@sentry/browser@8.14.0":
version "8.14.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.14.0.tgz#14a555000dcb615b454f70e2485dd656fb6fbbef"
integrity sha512-XQ28e/vcxtI+TwSpvfqS86nZtY0538ZUdda1vZmkpu9eXT632tzk1P8rNhiIUs0lCssQw8sakTUzjxZxEe0+ZA==
dependencies:
"@sentry-internal/browser-utils" "8.14.0"
"@sentry-internal/feedback" "8.14.0"
"@sentry-internal/replay" "8.14.0"
"@sentry-internal/replay-canvas" "8.14.0"
"@sentry/core" "8.14.0"
"@sentry/types" "8.14.0"
"@sentry/utils" "8.14.0"

"@sentry/core@8.14.0":
version "8.14.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.14.0.tgz#4fa4ba8de9ec123f8cececd44b7cc54e1af909fd"
integrity sha512-kEB8R3hMxdJRzwZwNqIxwrnmKx/iNl2ZHL/48/ywJu4u+qkBqQs9OsR+ACa+eZyAZTY5T0cPRGsUcNdnwy1ZAg==
dependencies:
"@sentry/types" "8.14.0"
"@sentry/utils" "8.14.0"

"@sentry/node@8.14.0":
version "8.14.0"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-8.14.0.tgz#47908275af3a0ba389a327159159a84c66a56225"
integrity sha512-C/Gwk4iHo2AbMX3X8aoZR1pYhr5WwaeTZZXSytglbKJgy5Udi/jB/3PKJqJnzJX4xCSvNj7rp75QM+E+3fAzbw==
dependencies:
"@opentelemetry/api" "^1.9.0"
"@opentelemetry/context-async-hooks" "^1.25.1"
Expand All @@ -802,34 +802,34 @@
"@opentelemetry/resources" "^1.25.1"
"@opentelemetry/sdk-trace-base" "^1.25.1"
"@opentelemetry/semantic-conventions" "^1.25.1"
"@prisma/instrumentation" "5.16.0"
"@sentry/core" "8.13.0"
"@sentry/opentelemetry" "8.13.0"
"@sentry/types" "8.13.0"
"@sentry/utils" "8.13.0"
"@prisma/instrumentation" "5.16.1"
"@sentry/core" "8.14.0"
"@sentry/opentelemetry" "8.14.0"
"@sentry/types" "8.14.0"
"@sentry/utils" "8.14.0"
optionalDependencies:
opentelemetry-instrumentation-fetch-node "1.2.0"

"@sentry/opentelemetry@8.13.0":
version "8.13.0"
resolved "https://registry.yarnpkg.com/@sentry/opentelemetry/-/opentelemetry-8.13.0.tgz#2fb4910b10f8af67749c41f636bf3610c2690203"
integrity sha512-NYn/HNE/SxFXe8pfnxJknhrrRzYRMHNssCoi5M1CeR5G7F2BGxxVmaGsd8j0WyTCpUS4i97G4vhYtDGxHvWN6w==
"@sentry/opentelemetry@8.14.0":
version "8.14.0"
resolved "https://registry.yarnpkg.com/@sentry/opentelemetry/-/opentelemetry-8.14.0.tgz#bc4587f3a15ef941e157a102b482da5d6e028602"
integrity sha512-Kf7mzxhmHQFf3G1tueAhKHFF3wfGiAyCGzSof7QwhHaUp2a3iHOFHGpzcPaq+RS9O01qAQDq0GYChj0VpBH34g==
dependencies:
"@sentry/core" "8.13.0"
"@sentry/types" "8.13.0"
"@sentry/utils" "8.13.0"
"@sentry/core" "8.14.0"
"@sentry/types" "8.14.0"
"@sentry/utils" "8.14.0"

"@sentry/types@8.13.0":
version "8.13.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.13.0.tgz#0753700af93592b65272e63c396b3c0202dd3105"
integrity sha512-r63s/H5gvQnQM9tTGBXz2xErUbxZALh4e2Lg/1aHj4zIvGLBjA2z5qWsh6TEZYbpmgAyGShLDr6+rWeUVf9yBQ==
"@sentry/types@8.14.0":
version "8.14.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.14.0.tgz#01705776836dc3acf490fcefde2b236cb2dc7d0e"
integrity sha512-RTXp96JPY3OM7Y3J8CaAYEkhosyTXrT/2uE7dTmPn1z7Oxunp8MYyyfSU4HtvDeMA3dxbI4dhNmXpfRyclV4Ew==

"@sentry/utils@8.13.0":
version "8.13.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.13.0.tgz#b2cce61705ea95a639db932f000247bddf13aa16"
integrity sha512-PxV0v9VbGWH9zP37P5w2msLUFDr287nYjoY2XVF+RSolyiTs1CQNI5ZMUO3o4MsSac/dpXxjyrZXQd72t/jRYA==
"@sentry/utils@8.14.0":
version "8.14.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.14.0.tgz#5b58fb15e62e73504761b432ea274d8b48da1628"
integrity sha512-EWlBrYEqdgmDn/C8iRr+z2jSwUXOQL73NG+cbsJtGWSDGSmBLsGNPk2wgKq6U5Nu7Icyw2+10QbbqS5F1Q1bvQ==
dependencies:
"@sentry/types" "8.13.0"
"@sentry/types" "8.14.0"

"@sinclair/typebox@^0.27.8":
version "0.27.8"
Expand Down

0 comments on commit a22fd7d

Please sign in to comment.