-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref: Remove some usages of dropUndefinedKeys()
#15781
base: develop
Are you sure you want to change the base?
Conversation
@@ -101,11 +100,11 @@ function _trackINP(): () => void { | |||
const routeName = spanToUse ? spanToJSON(spanToUse).description : getCurrentScope().getScopeData().transactionName; | |||
|
|||
const name = htmlTreeAsString(entry.target); | |||
const attributes: SpanAttributes = dropUndefinedKeys({ | |||
const attributes: SpanAttributes = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing possibly undefined here!
@@ -36,7 +35,7 @@ export function createCheckInEnvelope( | |||
} | |||
|
|||
if (dynamicSamplingContext) { | |||
headers.trace = dropUndefinedKeys(dynamicSamplingContext) as DynamicSamplingContext; | |||
headers.trace = dynamicSamplingContext as DynamicSamplingContext; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not care if there is something undefined in there, I believe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should not!
@@ -14,14 +13,14 @@ export function captureFeedback( | |||
|
|||
const feedbackEvent: FeedbackEvent = { | |||
contexts: { | |||
feedback: dropUndefinedKeys({ | |||
feedback: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not care about undefined fields
@@ -137,7 +137,7 @@ export function closeSession(session: Session, status?: Exclude<SessionStatus, ' | |||
* @returns a JSON object of the passed session | |||
*/ | |||
function sessionToJSON(session: Session): SerializedSession { | |||
return dropUndefinedKeys({ | |||
return { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is only called when we send the session, where this should be cleared out by JSON.stringify()
anyhow
@@ -98,12 +98,12 @@ export function makeNetworkReplayBreadcrumb( | |||
start: startTimestamp / 1000, | |||
end: endTimestamp / 1000, | |||
name: url, | |||
data: dropUndefinedKeys({ | |||
data: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be fine to contain undefined
@@ -113,15 +113,15 @@ function _instrumentNavigations(client: Client): void { | |||
routingSpan.end(); | |||
} | |||
|
|||
const navigationInfo = dropUndefinedKeys({ | |||
const navigationInfo = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attributes can be undefined, that should not change anything.
size-limit report 📦
|
@@ -36,7 +35,7 @@ export function createCheckInEnvelope( | |||
} | |||
|
|||
if (dynamicSamplingContext) { | |||
headers.trace = dropUndefinedKeys(dynamicSamplingContext) as DynamicSamplingContext; | |||
headers.trace = dynamicSamplingContext as DynamicSamplingContext; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should not!
In some places this should not really be needed, so we can skip this.
c2c7934
to
13a0d88
Compare
In some places this should not really be needed, so we can skip this.