Skip to content

Commit 4a57c05

Browse files
committed
clarify comment
1 parent b808fcc commit 4a57c05

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/tracing/src/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ type SentryTracestateData = {
160160
* @returns the base64-encoded header value
161161
*/
162162
export function computeTracestateValue(data: SentryTracestateData): string {
163-
// `JSON.stringify` will drop keys with undefined values, but not ones with null values
163+
// `JSON.stringify` will drop keys with undefined values, but not ones with null values, so this prevents
164+
// `environment` and `release` from being dropped if they haven't been set by `Sentry.init`
164165
data.environment = data.environment || null;
165166
data.release = data.release || null;
166167

0 commit comments

Comments
 (0)