Skip to content

Commit 259f829

Browse files
committed
fix formatting
1 parent 8470cec commit 259f829

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { ClientRequest, IncomingMessage, RequestOptions, ServerResponse } from 'node:http';
21
import { diag } from '@opentelemetry/api';
32
import type { HttpInstrumentationConfig } from '@opentelemetry/instrumentation-http';
43
import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
5-
import { Span, hasSpansEnabled } from '@sentry/core';
6-
import { defineIntegration, getClient } from '@sentry/core';
4+
import type { Span } from '@sentry/core';
5+
import { defineIntegration, getClient, hasSpansEnabled } from '@sentry/core';
6+
import type { ClientRequest, IncomingMessage, RequestOptions, ServerResponse } from 'node:http';
77
import { generateInstrumentOnce } from '../../otel/instrument';
88
import type { NodeClient } from '../../sdk/client';
99
import type { HTTPModuleRequestIncomingMessage } from '../../transports/http-module';
@@ -137,7 +137,9 @@ export const instrumentOtelHttp = generateInstrumentOnce<HttpInstrumentationConf
137137
export function _shouldInstrumentSpans(options: HttpOptions, clientOptions: Partial<NodeClientOptions> = {}): boolean {
138138
// If `spans` is passed in, it takes precedence
139139
// Else, we by default emit spans, unless `skipOpenTelemetrySetup` is set to `true` or spans are not enabled
140-
return typeof options.spans === 'boolean' ? options.spans : !clientOptions.skipOpenTelemetrySetup && hasSpansEnabled(clientOptions);
140+
return typeof options.spans === 'boolean'
141+
? options.spans
142+
: !clientOptions.skipOpenTelemetrySetup && hasSpansEnabled(clientOptions);
141143
}
142144

143145
/**

packages/node/src/integrations/node-fetch/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { UndiciInstrumentationConfig } from '@opentelemetry/instrumentation-undici';
22
import { UndiciInstrumentation } from '@opentelemetry/instrumentation-undici';
3-
import { IntegrationFn, hasSpansEnabled } from '@sentry/core';
4-
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, defineIntegration, getClient } from '@sentry/core';
3+
import type { IntegrationFn } from '@sentry/core';
4+
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, defineIntegration, getClient, hasSpansEnabled } from '@sentry/core';
55
import { generateInstrumentOnce } from '../../otel/instrument';
66
import type { NodeClient } from '../../sdk/client';
77
import type { NodeClientOptions } from '../../types';

0 commit comments

Comments
 (0)