Skip to content

Commit 4335c23

Browse files
committed
ref(hub): remove hard cap from maxBreadcrumbs
Signed-off-by: Outsider <[email protected]>
1 parent f5cbc4c commit 4335c23

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/hub/src/scope.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ import {
3434
import { updateSession } from './session';
3535

3636
/**
37-
* Absolute maximum number of breadcrumbs added to an event.
38-
* The `maxBreadcrumbs` option cannot be higher than this value.
37+
* Default value for maximum number of breadcrumbs added to an event.
3938
*/
40-
const MAX_BREADCRUMBS = 100;
39+
const DEFAULT_MAX_BREADCRUMBS = 100;
4140

4241
/**
4342
* Holds additional event information. {@link Scope.applyToEvent} will be
@@ -392,7 +391,7 @@ export class Scope implements ScopeInterface {
392391
* @inheritDoc
393392
*/
394393
public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {
395-
const maxCrumbs = typeof maxBreadcrumbs === 'number' ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS;
394+
const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;
396395

397396
// No data has been changed, so don't notify scope listeners
398397
if (maxCrumbs <= 0) {

packages/types/src/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
9393

9494
/**
9595
* The maximum number of breadcrumbs sent with events. Defaults to 100.
96-
* Values over 100 will be ignored and 100 used instead.
96+
* Sentry has a maximum payload size of 1MB and any events exceeding that payload size will be dropped.
9797
*/
9898
maxBreadcrumbs?: number;
9999

0 commit comments

Comments
 (0)