Skip to content

Conversation

@mydea
Copy link
Member

@mydea mydea commented Jan 4, 2024

We allow the same formats as OpenTelemetry:

  • number (we handle both seconds and milliseconds)
  • Date
  • [seconds, nanoseconds]

@mydea mydea requested review from AbhiPrasad, Lms24 and lforst January 4, 2024 15:39
@mydea mydea self-assigned this Jan 4, 2024
* HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000.
* This is represented in HrTime format as [1609504210, 150000000].
*/
return input[0] + input[1] / 1e9;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is vendored we need to add license

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is only inspired, not copied - only the comment I took verbatim 🤔 but we can also move this to it's own file, then we can still add the licence even if it is adapted from there?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with these kind of things, better be safe than sorry - let's move to it's own file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 76.12 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 67.5 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 61.13 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 32.1 KB (+0.08% 🔺)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 30.49 KB (0%)
@sentry/browser - Webpack (gzipped) 22.21 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 73.57 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 65.21 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 31.4 KB (+0.1% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 23.36 KB (+0.27% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 204.41 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 94.29 KB (+0.07% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 69.23 KB (+0.2% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 34.37 KB (+0.13% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 67.9 KB (-0.02% 🔽)
@sentry/react - Webpack (gzipped) 22.23 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 84.57 KB (+0.05% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 49.17 KB (+0.07% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 16.73 KB (0%)

mydea added 3 commits January 5, 2024 10:09
We allow the same formats as OpenTelemetry:

* `number` (we handle both seconds and milliseconds)
* `Date`
* `[seconds, nanoseconds]`
@mydea mydea force-pushed the fn/spanTimestamps branch from fd06fbc to 86c5009 Compare January 5, 2024 09:15
}

function normalizeContext(context: TransactionContext): TransactionContext {
function normalizeContext(context: StartSpanOptions): TransactionContext {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a small comment explaining what is normalized and why things need normalization?

@mydea mydea merged commit 5def983 into develop Jan 5, 2024
@mydea mydea deleted the fn/spanTimestamps branch January 5, 2024 10:16
c298lee pushed a commit that referenced this pull request Jan 9, 2024
)

We allow the same formats as OpenTelemetry:

* `number` (we handle both seconds and milliseconds)
* `Date`
* `[seconds, nanoseconds]`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants