Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Jun 19, 2024
1 parent c722213 commit 4cdadc4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/node/src/sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import {
startSession,
} from '@sentry/core';
import {
enhanceDscWithOpenTelemetryRootSpanName,
openTelemetrySetupCheck,
setOpenTelemetryContextAsyncContextStrategy,
setupDscHandler,
setupEventContextTrace,
} from '@sentry/opentelemetry';
import type { Client, Integration, Options } from '@sentry/types';
Expand Down Expand Up @@ -176,7 +176,7 @@ function _init(
validateOpenTelemetrySetup();
}

setupDscHandler(client);
enhanceDscWithOpenTelemetryRootSpanName(client);
setupEventContextTrace(client);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export { getDynamicSamplingContextFromSpan } from '@sentry/core';

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

export { setupDscHandler } from './utils/setupDscHandler';
export { enhanceDscWithOpenTelemetryRootSpanName } from './utils/enhanceDscWithOpenTelemetryRootSpanName';

export { getActiveSpan } from './utils/getActiveSpan';
export { startSpan, startSpanManual, startInactiveSpan, withActiveSpan, continueTrace } from './trace';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import { parseSpanDescription } from './parseSpanDescription';
import { spanHasName } from './spanTypes';

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

0 comments on commit 4cdadc4

Please sign in to comment.