Skip to content

Commit 4cdadc4

Browse files
committed
rename method
1 parent c722213 commit 4cdadc4

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

packages/node/src/sdk/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import {
1212
startSession,
1313
} from '@sentry/core';
1414
import {
15+
enhanceDscWithOpenTelemetryRootSpanName,
1516
openTelemetrySetupCheck,
1617
setOpenTelemetryContextAsyncContextStrategy,
17-
setupDscHandler,
1818
setupEventContextTrace,
1919
} from '@sentry/opentelemetry';
2020
import type { Client, Integration, Options } from '@sentry/types';
@@ -176,7 +176,7 @@ function _init(
176176
validateOpenTelemetrySetup();
177177
}
178178

179-
setupDscHandler(client);
179+
enhanceDscWithOpenTelemetryRootSpanName(client);
180180
setupEventContextTrace(client);
181181
}
182182

packages/opentelemetry/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export { getDynamicSamplingContextFromSpan } from '@sentry/core';
2121

2222
export { isSentryRequestSpan } from './utils/isSentryRequest';
2323

24-
export { setupDscHandler } from './utils/setupDscHandler';
24+
export { enhanceDscWithOpenTelemetryRootSpanName } from './utils/enhanceDscWithOpenTelemetryRootSpanName';
2525

2626
export { getActiveSpan } from './utils/getActiveSpan';
2727
export { startSpan, startSpanManual, startInactiveSpan, withActiveSpan, continueTrace } from './trace';

packages/opentelemetry/src/utils/setupDscHandler.ts renamed to packages/opentelemetry/src/utils/enhanceDscWithOpenTelemetryRootSpanName.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import { parseSpanDescription } from './parseSpanDescription';
44
import { spanHasName } from './spanTypes';
55

66
/**
7-
* Setup a DSC handler on the passed client, ensuring that the transaction name is inferred from the span correctly.
7+
* Setup a DSC handler on the passed client,
8+
* ensuring that the transaction name is inferred from the span correctly.
89
*/
9-
export function setupDscHandler(client: Client): void {
10+
export function enhanceDscWithOpenTelemetryRootSpanName(client: Client): void {
1011
client.on('createDsc', (dsc, rootSpan) => {
1112
// We want to overwrite the transaction on the DSC that is created by default in core
1213
// The reason for this is that we want to infer the span name, not use the initial one

0 commit comments

Comments
 (0)