Skip to content

Commit 2a95a39

Browse files
committed
Add JSDoc for _getBaggageWithSentryValues function
1 parent 50e0d19 commit 2a95a39

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/tracing/src/span.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,17 @@ export class Span implements SpanInterface {
356356
}
357357

358358
/**
359+
* Collects and adds data to the passed baggage object.
360+
*
361+
* Note: This function does not explicitly check if the passed baggage object is allowed
362+
* to be modified. Implicitly, `setBaggageValue` will not make modification to the object
363+
* if it was already set immutable.
364+
*
365+
* After adding the data, the baggage object is set immutable to prevent further modifications.
359366
*
360367
* @param baggage
361-
* @returns
368+
*
369+
* @returns modified and immutable maggage object
362370
*/
363371
private _getBaggageWithSentryValues(baggage: Baggage = createBaggage({})): Baggage {
364372
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any

0 commit comments

Comments
 (0)