Skip to content

Commit 88ceab4

Browse files
author
Luca Forstner
authored
Merge pull request #9614 from getsentry/prepare-release/7.81.1
2 parents 7dad213 + aa459aa commit 88ceab4

File tree

31 files changed

+284
-141
lines changed

31 files changed

+284
-141
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ body:
3535
- '@sentry/angular'
3636
- '@sentry/angular-ivy'
3737
- '@sentry/bun'
38+
- '@sentry/deno'
3839
- '@sentry/ember'
3940
- '@sentry/gatsby'
4041
- '@sentry/nextjs'

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44

55
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
66

7+
## 7.81.1
8+
9+
- fix(astro): Remove method from span op (#9603)
10+
- fix(deno): Make sure files get published (#9611)
11+
- fix(nextjs): Use `globalThis` instead of `global` in edge runtime (#9612)
12+
- fix(node): Improve error handling and shutdown handling for ANR (#9548)
13+
- fix(tracing-internal): Fix case when originalURL contain query params (#9531)
14+
15+
Work in this release contributed by @powerfulyang, @LubomirIgonda1, @joshkel, and @alexgleason. Thank you for your contributions!
16+
717
## 7.81.0
818

919
### Important Changes

packages/astro/src/server/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const handleRequest: (options?: MiddlewareOptions) => MiddlewareResponseH
8383
const res = await startSpan(
8484
{
8585
name: `${method} ${interpolateRouteFromUrlAndParams(ctx.url.pathname, ctx.params)}`,
86-
op: `http.server.${method.toLowerCase()}`,
86+
op: 'http.server',
8787
origin: 'auto.http.astro',
8888
status: 'ok',
8989
...traceparentData,

packages/astro/test/server/middleware.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('sentryMiddleware', () => {
4747
source: 'route',
4848
},
4949
name: 'GET /users/[id]/details',
50-
op: 'http.server.get',
50+
op: 'http.server',
5151
origin: 'auto.http.astro',
5252
status: 'ok',
5353
},

packages/core/src/baseclient.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import type {
2727
Transport,
2828
TransportMakeRequestResponse,
2929
} from '@sentry/types';
30+
import type { FeedbackEvent } from '@sentry/types';
3031
import {
3132
addItemToEnvelope,
3233
checkOrSetAlreadyCaught,
@@ -413,6 +414,12 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
413414
/** @inheritdoc */
414415
public on(hook: 'otelSpanEnd', callback: (otelSpan: unknown, mutableOptions: { drop: boolean }) => void): void;
415416

417+
/** @inheritdoc */
418+
public on(
419+
hook: 'beforeSendFeedback',
420+
callback: (feedback: FeedbackEvent, options?: { includeReplay: boolean }) => void,
421+
): void;
422+
416423
/** @inheritdoc */
417424
public on(hook: string, callback: unknown): void {
418425
if (!this._hooks[hook]) {
@@ -450,6 +457,9 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
450457
/** @inheritdoc */
451458
public emit(hook: 'otelSpanEnd', otelSpan: unknown, mutableOptions: { drop: boolean }): void;
452459

460+
/** @inheritdoc */
461+
public emit(hook: 'beforeSendFeedback', feedback: FeedbackEvent, options?: { includeReplay: boolean }): void;
462+
453463
/** @inheritdoc */
454464
public emit(hook: string, ...rest: unknown[]): void {
455465
if (this._hooks[hook]) {

packages/deno/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/deno",
77
"author": "Sentry",
88
"license": "MIT",
9-
"module": "build/index.js",
9+
"module": "build/index.mjs",
1010
"types": "build/index.d.ts",
1111
"publishConfig": {
1212
"access": "public"
1313
},
1414
"files": [
15-
"index.js",
16-
"index.js.map",
15+
"index.mjs",
16+
"index.mjs.map",
1717
"index.d.ts"
1818
],
1919
"dependencies": {

packages/feedback/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ The following options can be configured as options to the integration, in `new F
6565
| --------- | ------- | ------- | ----------- |
6666
| `showName` | `boolean` | `true` | Displays the name field on the feedback form, however will still capture the name (if available) from Sentry SDK context. |
6767
| `showEmail` | `boolean` | `true` | Displays the email field on the feedback form, however will still capture the email (if available) from Sentry SDK context. |
68-
| `isAnonymous` | `boolean` | `false` | Hides both name and email fields and does not use Sentry SDK's user context. |
68+
| `isNameRequired` | `boolean` | `false` | Requires the name field on the feedback form to be filled in. |
69+
| `isEmailRequired` | `boolean` | `false` | Requires the email field on the feedback form to be filled in. |
6970
| `useSentryUser` | `Record<string, string>` | `{ email: 'email', name: 'username'}` | Map of the `email` and `name` fields to the corresponding Sentry SDK user fields that were called with `Sentry.setUser`. |
7071

7172
By default the Feedback integration will attempt to fill in the name/email fields if you have set a user context via [`Sentry.setUser`](https://docs.sentry.io/platforms/javascript/enriching-events/identify-user/). By default it expects the email and name fields to be `email` and `username`. Below is an example configuration with non-default user fields.
@@ -133,7 +134,7 @@ Colors can be customized via the Feedback constructor or by defining CSS variabl
133134
| `submitForegroundHover` | `--submit-foreground-hover` | `#ffffff` | `#ffffff` | Foreground color for the submit button when hovering |
134135
| `cancelBackground` | `--cancel-background` | `transparent` | `transparent` | Background color for the cancel button |
135136
| `cancelBackgroundHover` | `--cancel-background-hover` | `var(--background-hover)` | `var(--background-hover)` | Background color when hovering over the cancel button |
136-
| `cancelBorder` | `--cancel-border` | `var(--border)` | `var(--border)` | Border style for the cancel button |
137+
| `cancelBorder` | `--cancel-border` | `var(--border)` | `var(--border)` | Border style for the cancel button |
137138
| `cancelOutlineFocus` | `--cancel-outline-focus` | `var(--input-outline-focus)` | `var(--input-outline-focus)` | Outline color for the cancel button, in the focused state |
138139
| `cancelForeground` | `--cancel-foreground` | `var(--foreground)` | `var(--foreground)` | Foreground color for the cancel button |
139140
| `cancelForegroundHover` | `--cancel-foreground-hover` | `var(--foreground)` | `var(--foreground)` | Foreground color for the cancel button when hovering |
@@ -270,7 +271,7 @@ document.getElementById('my-feedback-form').addEventListener('submit', (event) =
270271
271272
Note: The following instructions are to be followed in the Sentry product.
272273
273-
If you have Sentry's default issue alert ("Alert me on every new issue") turned on for the project you are setting up User Feedback on, no action is required to have alerting on each user feedback report.
274+
If you have Sentry's default issue alert ("Alert me on every new issue") turned on for the project you are setting up User Feedback on, no action is required to have alerting on each user feedback report.
274275
275276
If you don't have Sentry's default issue alert turned on, follow these steps:
276277

packages/feedback/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"access": "public"
2424
},
2525
"dependencies": {
26-
"@sentry/browser": "7.81.0",
2726
"@sentry/core": "7.81.0",
2827
"@sentry/types": "7.81.0",
2928
"@sentry/utils": "7.81.0"

packages/feedback/src/constants.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
import { GLOBAL_OBJ } from '@sentry/utils';
2+
3+
// exporting a separate copy of `WINDOW` rather than exporting the one from `@sentry/browser`
4+
// prevents the browser package from being bundled in the CDN bundle, and avoids a
5+
// circular dependency between the browser and feedback packages
6+
export const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;
7+
18
const LIGHT_BACKGROUND = '#ffffff';
29
const INHERIT = 'inherit';
310
const SUBMIT_COLOR = 'rgba(108, 95, 199, 1)';

packages/feedback/src/integration.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { WINDOW } from '@sentry/browser';
21
import type { Integration } from '@sentry/types';
32
import { isBrowser, logger } from '@sentry/utils';
43

@@ -15,6 +14,7 @@ import {
1514
NAME_PLACEHOLDER,
1615
SUBMIT_BUTTON_LABEL,
1716
SUCCESS_MESSAGE_TEXT,
17+
WINDOW,
1818
} from './constants';
1919
import type { FeedbackInternalOptions, FeedbackWidget, OptionalFeedbackConfiguration } from './types';
2020
import { mergeOptions } from './util/mergeOptions';
@@ -80,7 +80,6 @@ export class Feedback implements Integration {
8080
email: 'email',
8181
name: 'username',
8282
},
83-
isAnonymous = false,
8483
isEmailRequired = false,
8584
isNameRequired = false,
8685

@@ -120,7 +119,6 @@ export class Feedback implements Integration {
120119
id,
121120
showBranding,
122121
autoInject,
123-
isAnonymous,
124122
isEmailRequired,
125123
isNameRequired,
126124
showEmail,

0 commit comments

Comments
 (0)