Skip to content
Discussion options

You must be logged in to vote

Short version: this is expected when OTel metric recording happens inside a route that Next.js is trying to prerender. The line you linked is the SDK passing Date.now() as the measurement timestamp to the metric storage. That timestamp is part of the OTel data model, so Next.js is flagging your render as dynamic - it is not evidence that telemetry and partial prefetching can never coexist.

this._writableMetricStorage.record(value, attributes, context, Date.now());

Do not patch that to performance.now(): performance.now() is a monotonic offset, not epoch milliseconds, so it would break metric timestamps and aggregation. If you only need a duration, measure it with performance.now() in your…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Sion-Coop
Comment options

Answer selected by Sion-Coop
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants