Skip to content

Commit d739931

Browse files
committed
s/makeV2Callback/withStreamSpan
1 parent c87d527 commit d739931

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/browser/src/integrations/spanstreaming.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const spanStreamingIntegration = defineIntegration(((userOptions?: Partia
7171

7272
if (beforeSendSpan && !isV2BeforeSendSpanCallback(beforeSendSpan)) {
7373
client.getOptions().traceLifecycle = 'static';
74-
debug.warn(`${initialMessage} a beforeSendSpan callback using \`makeV2Callback\`! ${fallbackMsg}`);
74+
debug.warn(`${initialMessage} a beforeSendSpan callback using \`withStreamSpan\`! ${fallbackMsg}`);
7575
return;
7676
}
7777

packages/core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ export { flushIfServerless } from './utils/flushIfServerless';
314314
export { SDK_VERSION } from './utils/version';
315315
export { getDebugImagesForResources, getFilenameToDebugIdMap } from './utils/debug-ids';
316316
export { escapeStringForRegex } from './vendor/escapeStringForRegex';
317-
export { isV2BeforeSendSpanCallback, makeV2Callback } from './utils/beforeSendSpan';
317+
export { isV2BeforeSendSpanCallback, withStreamSpan } from './utils/beforeSendSpan';
318318
export { shouldIgnoreSpan, reparentChildSpans } from './utils/should-ignore-span';
319319

320320
export type { Attachment } from './types-hoist/attachment';

packages/core/src/utils/beforeSendSpan.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import { addNonEnumerableProperty } from './object';
88
* @example
99
*
1010
* Sentry.init({
11-
* beforeSendSpan: makeV2Callback((span) => {
11+
* beforeSendSpan: withStreamSpan((span) => {
1212
* return span;
1313
* }),
1414
* });
1515
*
1616
* @param callback
1717
* @returns
1818
*/
19-
export function makeV2Callback(callback: (span: SpanV2JSON) => SpanV2JSON): SpanV2CompatibleBeforeSendSpanCallback {
19+
export function withStreamSpan(callback: (span: SpanV2JSON) => SpanV2JSON): SpanV2CompatibleBeforeSendSpanCallback {
2020
addNonEnumerableProperty(callback, '_v2', true);
2121
// type-casting here because TS can't infer the type correctly
2222
return callback as SpanV2CompatibleBeforeSendSpanCallback;

0 commit comments

Comments
 (0)