Skip to content

Commit a5c0430

Browse files
authored
feat(core): Make runWithAsyncContext public API (#7817)
1 parent 0e20bb5 commit a5c0430

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/core/src/hub.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,9 +589,11 @@ export function setAsyncContextStrategy(strategy: AsyncContextStrategy | undefin
589589
}
590590

591591
/**
592-
* @private Private API with no semver guarantees!
592+
* Runs the supplied callback in its own async context. Async Context strategies are defined per SDK.
593593
*
594-
* Runs the supplied callback in its own async context.
594+
* @param callback The callback to run in its own async context
595+
* @param options Options to pass to the async context strategy
596+
* @returns The result of the callback
595597
*/
596598
export function runWithAsyncContext<T>(callback: (hub: Hub) => T, options: RunWithAsyncContextOptions = {}): T {
597599
const registry = getMainCarrier();

0 commit comments

Comments
 (0)