Skip to content

Commit 9b5bcb5

Browse files
committed
linting fixes
1 parent 5bbbc97 commit 9b5bcb5

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

packages/core/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export {
6363
convertIntegrationFnToClass,
6464
} from './integration';
6565
export { FunctionToString, InboundFilters, LinkedErrors } from './integrations';
66+
export { applyScopeDataToEvent } from './utils/applyScopeDataToEvent';
6667
export { prepareEvent } from './utils/prepareEvent';
6768
export { createCheckInEnvelope } from './checkin';
6869
export { hasTracingEnabled } from './utils/hasTracingEnabled';

packages/node/src/integrations/hapi/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ function sendErrorToSentry(errorData: object): void {
3838
export const hapiErrorPlugin = {
3939
name: 'SentryHapiErrorPlugin',
4040
version: SDK_VERSION,
41+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
4142
register: async function (serverArg: Record<any, any>) {
4243
const server = serverArg as unknown as Server;
4344

@@ -61,6 +62,7 @@ export const hapiErrorPlugin = {
6162
export const hapiTracingPlugin = {
6263
name: 'SentryHapiTracingPlugin',
6364
version: SDK_VERSION,
65+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6466
register: async function (serverArg: Record<any, any>) {
6567
const server = serverArg as unknown as Server;
6668

@@ -122,6 +124,7 @@ export const hapiTracingPlugin = {
122124

123125
export type HapiOptions = {
124126
/** Hapi server instance */
127+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
125128
server?: Record<any, any>;
126129
};
127130

packages/node/test/integrations/requestdata.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as http from 'http';
2-
import type { RequestDataIntegrationOptions} from '@sentry/core';
2+
import type { RequestDataIntegrationOptions } from '@sentry/core';
3+
import { applyScopeDataToEvent } from '@sentry/core';
34
import { getCurrentScope } from '@sentry/core';
45
import { RequestData, getCurrentHub } from '@sentry/core';
56
import type { Event, EventProcessor, PolymorphicRequest } from '@sentry/types';
@@ -68,7 +69,7 @@ describe('`RequestData` integration', () => {
6869

6970
sentryRequestMiddleware(req, res, next);
7071

71-
await getCurrentScope().applyToEvent(event, {});
72+
applyScopeDataToEvent(event, getCurrentScope().getScopeData());
7273
void requestDataEventProcessor(event, {});
7374

7475
const passedOptions = addRequestDataToEventSpy.mock.calls[0][2];
@@ -97,7 +98,7 @@ describe('`RequestData` integration', () => {
9798

9899
wrappedGCPFunction(req, res);
99100

100-
await getCurrentScope().applyToEvent(event, {});
101+
applyScopeDataToEvent(event, getCurrentScope().getScopeData());
101102
void requestDataEventProcessor(event, {});
102103

103104
const passedOptions = addRequestDataToEventSpy.mock.calls[0][2];

packages/opentelemetry/src/custom/scope.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ export class OpenTelemetryScope extends Scope {
9090
return this._addBreadcrumb(breadcrumb, maxBreadcrumbs);
9191
}
9292

93-
/** Add a breadcrumb to this scope. */
94-
protected _addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {
95-
return super.addBreadcrumb(breadcrumb, maxBreadcrumbs);
96-
}
97-
9893
/** @inheritDoc */
9994
public getScopeData(): ScopeData {
10095
const data = super.getScopeData();
@@ -104,6 +99,11 @@ export class OpenTelemetryScope extends Scope {
10499
return data;
105100
}
106101

102+
/** Add a breadcrumb to this scope. */
103+
protected _addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {
104+
return super.addBreadcrumb(breadcrumb, maxBreadcrumbs);
105+
}
106+
107107
/**
108108
* @inheritDoc
109109
*/

0 commit comments

Comments
 (0)