Skip to content

Commit

Permalink
adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Nov 29, 2024
1 parent 56e5720 commit 677ac31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cloudflare/src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ function markAsInstrumented<T>(handler: T): void {
}
}

function isInstrumented<T>(handler: T): boolean {
function isInstrumented<T>(handler: T): boolean | undefined {
try {
return !!(handler as SentryInstrumented<T>).__SENTRY_INSTRUMENTED__;
return (handler as SentryInstrumented<T>).__SENTRY_INSTRUMENTED__;
} catch {
return false;
}
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/metrics/aggregator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export class MetricsAggregator implements MetricsAggregatorBase {
// that we store in memory.
private _bucketsTotalWeight;

// We adjust the type here to add the `unref()` part, as setInterval can technically return a number of a NodeJS.Timer.
private readonly _interval: ReturnType<typeof setInterval> & { unref?: () => void };

// SDKs are required to shift the flush interval by random() * rollup_in_seconds.
Expand Down

0 comments on commit 677ac31

Please sign in to comment.