Skip to content

Commit ccd0461

Browse files
committed
fix: exported http integration options to be used by other SDKs
1 parent 3ac7ad1 commit ccd0461

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

packages/node/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { httpIntegration } from './integrations/http';
1+
export { httpIntegration, type HttpOptions as HttpIntegrationOptions } from './integrations/http';
22
export { nativeNodeFetchIntegration } from './integrations/node-fetch';
33
export { fsIntegration } from './integrations/fs';
44
export { expressIntegration, expressErrorHandler, setupExpressErrorHandler } from './integrations/tracing/express';

packages/node/src/integrations/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const INTEGRATION_NAME = 'Http';
2020

2121
const INSTRUMENTATION_NAME = '@opentelemetry_sentry-patched/instrumentation-http';
2222

23-
interface HttpOptions {
23+
export interface HttpOptions {
2424
/**
2525
* Whether breadcrumbs should be recorded for outgoing requests.
2626
* Defaults to true

packages/remix/src/server/integrations/http.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import type { IntegrationFn } from '@sentry/core';
2-
import { httpIntegration as originalHttpIntegration } from '@sentry/node';
3-
4-
type HttpOptions = Parameters<typeof originalHttpIntegration>[0];
2+
import { httpIntegration as originalHttpIntegration, type HttpIntegrationOptions } from '@sentry/node';
53

64
/**
75
* The http integration instruments Node's internal http and https modules.
86
* It creates breadcrumbs and spans for outgoing HTTP requests which will be attached to the currently active span.
97
*/
10-
export const httpIntegration = ((options: HttpOptions = {}) => {
8+
export const httpIntegration = ((options: HttpIntegrationOptions = {}) => {
119
return originalHttpIntegration({
1210
...options,
1311
// We disable incoming request spans here, because otherwise we'd end up with duplicate spans.

packages/sveltekit/src/server/integrations/http.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import type { IntegrationFn } from '@sentry/core';
2-
import { httpIntegration as originalHttpIntegration } from '@sentry/node';
3-
4-
type HttpOptions = Parameters<typeof originalHttpIntegration>[0];
2+
import { httpIntegration as originalHttpIntegration, type HttpIntegrationOptions } from '@sentry/node';
53

64
/**
75
* The http integration instruments Node's internal http and https modules.
@@ -12,7 +10,7 @@ type HttpOptions = Parameters<typeof originalHttpIntegration>[0];
1210
* (You likely don't need this!)
1311
*
1412
*/
15-
export const httpIntegration = ((options: HttpOptions = {}) => {
13+
export const httpIntegration = ((options: HttpIntegrationOptions = {}) => {
1614
/*
1715
* This is a slightly modified version of the original httpIntegration: We avoid creating
1816
* incoming request spans because:

0 commit comments

Comments
 (0)