File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,9 @@ export function withScope(callback: (scope: Scope) => void): ReturnType<Hub['wit
168
168
* The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its
169
169
* finished child spans will be sent to Sentry.
170
170
*
171
+ * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call
172
+ * `startTransaction` directly on the hub.
173
+ *
171
174
* @param context Properties of the new `Transaction`.
172
175
* @param customSamplingContext Information given to the transaction sampling function (along with context-dependent
173
176
* default values). See {@link Options.tracesSampler}.
@@ -178,5 +181,11 @@ export function startTransaction(
178
181
context : TransactionContext ,
179
182
customSamplingContext ?: CustomSamplingContext ,
180
183
) : ReturnType < Hub [ 'startTransaction' ] > {
181
- return getCurrentHub ( ) . startTransaction ( { ...context } , customSamplingContext ) ;
184
+ return getCurrentHub ( ) . startTransaction (
185
+ {
186
+ metadata : { source : 'custom' } ,
187
+ ...context ,
188
+ } ,
189
+ customSamplingContext ,
190
+ ) ;
182
191
}
You can’t perform that action at this time.
0 commit comments