-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Telemetry-compatible tracing #22713
Telemetry-compatible tracing #22713
Conversation
Any reason why OpenTelemetry is getting replaced while it's a standard approach to get tracing? Are we as users of Next.js framework not allowed to get the Next.js internal traces? Using OpenTelemetry's Tracing 1.0 spec would potentially allow people to get Next.js traces with their tracing solution of their choice, e.g. AWS Xray, Google Trace etc instead of what the this PR seems to suggest only allowing Zipkin. I will have closer look at this later but it looks like the |
Hey @weyert! Thanks for leaving your thoughts. Do you mind if I ask: what is your use-case? This question is not asked to rebut your request, but rather to understand what your preferred outcome might look like. Most of the internal tracing is very specific to the Next.js internals - they are also very new - and I'm having trouble imagining what utility this brings to a Next.js user. Are you interested in tracking build times? Something else? |
My apologies for the late reply to your comment. I was more asking at out of curiosity but yes I thought it would be interesting to track build times during development and because I am already staring at JaegerUI... :) Not a major issue, though. My main request was to upgrade the @opentelemetry/api package version when it is used. |
53a7a31
to
f315561
Compare
Stats from current PRDefault Server Mode (Decrease detected ✓)General Overall increase
|
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
buildDuration | 13.9s | 13.9s | |
nodeModulesSize | 42.8 MB | 42.8 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.49 | 2.496 | |
/ avg req/sec | 1004.06 | 1001.68 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.717 | 1.738 | |
/error-in-render avg req/sec | 1455.88 | 1438.8 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
677f882d2ed8..a2e7.js gzip | 13.4 kB | 13.4 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-HASH.js gzip | 6.65 kB | 6.65 kB | ✓ |
webpack-HASH.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.8 kB | 59.8 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
amp-e3e9bc99..932c.js gzip | 536 B | 536 B | ✓ |
hooks-5023ef..3670.js gzip | 888 B | 888 B | ✓ |
index-3a2b03..c677.js gzip | 227 B | 227 B | ✓ |
link-177412b..043e.js gzip | 1.67 kB | 1.67 kB | ✓ |
routerDirect..1a66.js gzip | 303 B | 303 B | ✓ |
withRouter-9..1b7d.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.66 kB | 8.66 kB | ✓ |
Client Build Manifests
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
_buildManifest.js gzip | 347 B | 347 B | ✓ |
Overall change | 347 B | 347 B | ✓ |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
index.html gzip | 615 B | 613 B | -2 B |
link.html gzip | 621 B | 621 B | ✓ |
withRouter.html gzip | 608 B | 608 B | ✓ |
Overall change | 1.84 kB | 1.84 kB | -2 B |
Diffs
Diff for _buildManifest.js
@@ -1,19 +1,19 @@
self.__BUILD_MANIFEST = {
__rewrites: [],
- "/": ["static\u002Fchunks\u002Fpages\u002Findex-41b33258dcb27611e3a6.js"],
+ "/": ["static\u002Fchunks\u002Fpages\u002Findex-b1738b6c9dd4aa373c84.js"],
"/_error": [
- "static\u002Fchunks\u002Fpages\u002F_error-e3034768442652eac2c9.js"
+ "static\u002Fchunks\u002Fpages\u002F_error-6fc12bd74dc2417101e6.js"
],
- "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-7d414f857fa594e7cf86.js"],
+ "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-27f75ad11120c5cdedd1.js"],
"/hooks": [
- "static\u002Fchunks\u002Fpages\u002Fhooks-e732be88e7750c8b99f5.js"
+ "static\u002Fchunks\u002Fpages\u002Fhooks-1c83fdb5c77614f18817.js"
],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-1758aa74927b71637af8.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-3d75e6578a827afdc3f9.js"],
"/routerDirect": [
- "static\u002Fchunks\u002Fpages\u002FrouterDirect-b3467c130a6d01a76dae.js"
+ "static\u002Fchunks\u002Fpages\u002FrouterDirect-d1f18fd0349b020a8f6c.js"
],
"/withRouter": [
- "static\u002Fchunks\u002Fpages\u002FwithRouter-dd012cd4b201cd484e2c.js"
+ "static\u002Fchunks\u002Fpages\u002FwithRouter-34ceb7435fed1b6347dd.js"
],
sortedPages: [
"\u002F",
Diff for index.html
@@ -27,12 +27,12 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/_app-b9cf267ce11e4373e54e.js"
+ href="/_next/static/chunks/pages/_app-a24430c6b07ae4b780ba.js"
as="script"
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/index-41b33258dcb27611e3a6.js"
+ href="/_next/static/chunks/pages/index-b1738b6c9dd4aa373c84.js"
as="script"
/>
</head>
@@ -69,11 +69,11 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/_app-b9cf267ce11e4373e54e.js"
+ src="/_next/static/chunks/pages/_app-a24430c6b07ae4b780ba.js"
async=""
></script>
<script
- src="/_next/static/chunks/pages/index-41b33258dcb27611e3a6.js"
+ src="/_next/static/chunks/pages/index-b1738b6c9dd4aa373c84.js"
async=""
></script>
<script src="/_next/static/BUILD_ID/_buildManifest.js" async=""></script>
Diff for link.html
@@ -27,12 +27,12 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/_app-b9cf267ce11e4373e54e.js"
+ href="/_next/static/chunks/pages/_app-a24430c6b07ae4b780ba.js"
as="script"
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/link-1758aa74927b71637af8.js"
+ href="/_next/static/chunks/pages/link-3d75e6578a827afdc3f9.js"
as="script"
/>
</head>
@@ -74,11 +74,11 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/_app-b9cf267ce11e4373e54e.js"
+ src="/_next/static/chunks/pages/_app-a24430c6b07ae4b780ba.js"
async=""
></script>
<script
- src="/_next/static/chunks/pages/link-1758aa74927b71637af8.js"
+ src="/_next/static/chunks/pages/link-3d75e6578a827afdc3f9.js"
async=""
></script>
<script src="/_next/static/BUILD_ID/_buildManifest.js" async=""></script>
Diff for withRouter.html
@@ -27,12 +27,12 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/_app-b9cf267ce11e4373e54e.js"
+ href="/_next/static/chunks/pages/_app-a24430c6b07ae4b780ba.js"
as="script"
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/withRouter-dd012cd4b201cd484e2c.js"
+ href="/_next/static/chunks/pages/withRouter-34ceb7435fed1b6347dd.js"
as="script"
/>
</head>
@@ -69,11 +69,11 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/_app-b9cf267ce11e4373e54e.js"
+ src="/_next/static/chunks/pages/_app-a24430c6b07ae4b780ba.js"
async=""
></script>
<script
- src="/_next/static/chunks/pages/withRouter-dd012cd4b201cd484e2c.js"
+ src="/_next/static/chunks/pages/withRouter-34ceb7435fed1b6347dd.js"
async=""
></script>
<script src="/_next/static/BUILD_ID/_buildManifest.js" async=""></script>
Serverless Mode
General Overall increase ⚠️
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
buildDuration | 15.9s | 15.3s | -515ms |
nodeModulesSize | 42.8 MB | 42.8 MB |
Client Bundles (main, webpack, commons)
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
677f882d2ed8..a2e7.js gzip | 13.4 kB | 13.4 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-HASH.js gzip | 6.65 kB | 6.65 kB | ✓ |
webpack-HASH.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.8 kB | 59.8 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | N/A | N/A |
_error-8b758..aef6.js gzip | 3.46 kB | N/A | N/A |
amp-e3e9bc99..932c.js gzip | 536 B | N/A | N/A |
hooks-5023ef..3670.js gzip | 888 B | N/A | N/A |
index-3a2b03..c677.js gzip | 227 B | N/A | N/A |
link-177412b..043e.js gzip | 1.67 kB | N/A | N/A |
routerDirect..1a66.js gzip | 303 B | N/A | N/A |
withRouter-9..1b7d.js gzip | 302 B | N/A | N/A |
_app-fde3324..9dd1.js gzip | N/A | 1.28 kB | N/A |
_error-af59f..582f.js gzip | N/A | 3.46 kB | N/A |
amp-9716187d..0aa8.js gzip | N/A | 536 B | N/A |
hooks-107e90..74c7.js gzip | N/A | 888 B | N/A |
index-ac435c..ecf2.js gzip | N/A | 227 B | N/A |
link-c0d2c96..de48.js gzip | N/A | 1.67 kB | N/A |
routerDirect..dc9d.js gzip | N/A | 303 B | N/A |
withRouter-6..0e02.js gzip | N/A | 302 B | N/A |
Overall change | 8.66 kB | 8.66 kB | ✓ |
Client Build Manifests
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
_buildManifest.js gzip | 347 B | 347 B | ✓ |
Overall change | 347 B | 347 B | ✓ |
Serverless bundles
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
_error.js | 1.02 MB | 1.02 MB | ✓ |
404.html | 2.67 kB | 2.67 kB | ✓ |
500.html | 2.65 kB | 2.65 kB | ✓ |
amp.amp.html | 10.6 kB | 10.6 kB | ✓ |
amp.html | 1.86 kB | 1.86 kB | ✓ |
hooks.html | 1.92 kB | 1.92 kB | ✓ |
index.js | 1.02 MB | 1.02 MB | ✓ |
link.js | 1.08 MB | 1.08 MB | ✓ |
routerDirect.js | 1.07 MB | 1.07 MB | ✓ |
withRouter.js | 1.07 MB | 1.07 MB | ✓ |
Overall change | 5.27 MB | 5.27 MB | ✓ |
Webpack 5 Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
buildDuration | 16s | 15.7s | -307ms |
nodeModulesSize | 42.8 MB | 42.8 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.424 | 2.444 | |
/ avg req/sec | 1031.28 | 1022.76 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.626 | 1.603 | -0.02 |
/error-in-render avg req/sec | 1537.27 | 1559.96 | +22.69 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
597-2bc2376a..203d.js gzip | 13.3 kB | 13.3 kB | ✓ |
framework.HASH.js gzip | 39.3 kB | 39.3 kB | ✓ |
main-HASH.js gzip | 6.59 kB | 6.59 kB | ✓ |
webpack-HASH.js gzip | 954 B | 954 B | ✓ |
Overall change | 60.2 kB | 60.2 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.1 kB | 31.1 kB | ✓ |
Overall change | 31.1 kB | 31.1 kB | ✓ |
Client Pages
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
_app-aedc815..1421.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error-71ec2..1a96.js gzip | 3.38 kB | 3.38 kB | ✓ |
amp-33a09cb0..6745.js gzip | 536 B | 536 B | ✓ |
hooks-4e968a..f870.js gzip | 902 B | 902 B | ✓ |
index-5c6845..f75c.js gzip | 230 B | 230 B | ✓ |
link-99f0c6c..b84a.js gzip | 1.65 kB | 1.65 kB | ✓ |
routerDirect..bb56.js gzip | 306 B | 306 B | ✓ |
withRouter-7..2133.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.57 kB | 8.57 kB | ✓ |
Client Build Manifests Overall decrease ✓
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
_buildManifest.js gzip | 326 B | 322 B | -4 B |
Overall change | 326 B | 322 B | -4 B |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | divmain/next.js telemetry-compatible-tracing | Change | |
---|---|---|---|
index.html gzip | 586 B | 586 B | ✓ |
link.html gzip | 592 B | 592 B | ✓ |
withRouter.html gzip | 581 B | 579 B | -2 B |
Overall change | 1.76 kB | 1.76 kB | -2 B |
Diffs
Diff for _buildManifest.js
@@ -1,19 +1,19 @@
self.__BUILD_MANIFEST = {
__rewrites: [],
- "/": ["static\u002Fchunks\u002Fpages\u002Findex-3a2b03695551a802c677.js"],
+ "/": ["static\u002Fchunks\u002Fpages\u002Findex-ac435c89e537f4e6ecf2.js"],
"/_error": [
- "static\u002Fchunks\u002Fpages\u002F_error-8b758797fbfd831caef6.js"
+ "static\u002Fchunks\u002Fpages\u002F_error-af59f52346097a29582f.js"
],
- "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-e3e9bc9915cf2811932c.js"],
+ "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-9716187d43cb5ac80aa8.js"],
"/hooks": [
- "static\u002Fchunks\u002Fpages\u002Fhooks-5023ef2ff38488073670.js"
+ "static\u002Fchunks\u002Fpages\u002Fhooks-107e903cc2136d5974c7.js"
],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-177412b8418bdebf043e.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-c0d2c9648c4e376cde48.js"],
"/routerDirect": [
- "static\u002Fchunks\u002Fpages\u002FrouterDirect-73e91dc4f2667a6a1a66.js"
+ "static\u002Fchunks\u002Fpages\u002FrouterDirect-68414267e80493f2dc9d.js"
],
"/withRouter": [
- "static\u002Fchunks\u002Fpages\u002FwithRouter-98df0e7835d6b2911b7d.js"
+ "static\u002Fchunks\u002Fpages\u002FwithRouter-6e72b47076be15290e02.js"
],
sortedPages: [
"\u002F",
Diff for index.html
@@ -27,12 +27,12 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/_app-2a09aa2580945cbf4a98.js"
+ href="/_next/static/chunks/pages/_app-fde3324f7822e8719dd1.js"
as="script"
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/index-3a2b03695551a802c677.js"
+ href="/_next/static/chunks/pages/index-ac435c89e537f4e6ecf2.js"
as="script"
/>
</head>
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/",
"query": {},
- "buildId": "NDOzpFQu7HgW0AcEgT9dg",
+ "buildId": "2LeDstjS10piW3tRBvP_H",
"isFallback": false,
"gip": true
}
@@ -69,19 +69,19 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/_app-2a09aa2580945cbf4a98.js"
+ src="/_next/static/chunks/pages/_app-fde3324f7822e8719dd1.js"
async=""
></script>
<script
- src="/_next/static/chunks/pages/index-3a2b03695551a802c677.js"
+ src="/_next/static/chunks/pages/index-ac435c89e537f4e6ecf2.js"
async=""
></script>
<script
- src="/_next/static/NDOzpFQu7HgW0AcEgT9dg/_buildManifest.js"
+ src="/_next/static/2LeDstjS10piW3tRBvP_H/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/NDOzpFQu7HgW0AcEgT9dg/_ssgManifest.js"
+ src="/_next/static/2LeDstjS10piW3tRBvP_H/_ssgManifest.js"
async=""
></script>
</body>
Diff for link.html
@@ -27,12 +27,12 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/_app-2a09aa2580945cbf4a98.js"
+ href="/_next/static/chunks/pages/_app-fde3324f7822e8719dd1.js"
as="script"
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/link-177412b8418bdebf043e.js"
+ href="/_next/static/chunks/pages/link-c0d2c9648c4e376cde48.js"
as="script"
/>
</head>
@@ -48,7 +48,7 @@
"props": { "pageProps": {} },
"page": "/link",
"query": {},
- "buildId": "NDOzpFQu7HgW0AcEgT9dg",
+ "buildId": "2LeDstjS10piW3tRBvP_H",
"isFallback": false,
"gip": true
}
@@ -74,19 +74,19 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/_app-2a09aa2580945cbf4a98.js"
+ src="/_next/static/chunks/pages/_app-fde3324f7822e8719dd1.js"
async=""
></script>
<script
- src="/_next/static/chunks/pages/link-177412b8418bdebf043e.js"
+ src="/_next/static/chunks/pages/link-c0d2c9648c4e376cde48.js"
async=""
></script>
<script
- src="/_next/static/NDOzpFQu7HgW0AcEgT9dg/_buildManifest.js"
+ src="/_next/static/2LeDstjS10piW3tRBvP_H/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/NDOzpFQu7HgW0AcEgT9dg/_ssgManifest.js"
+ src="/_next/static/2LeDstjS10piW3tRBvP_H/_ssgManifest.js"
async=""
></script>
</body>
Diff for withRouter.html
@@ -27,12 +27,12 @@
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/_app-2a09aa2580945cbf4a98.js"
+ href="/_next/static/chunks/pages/_app-fde3324f7822e8719dd1.js"
as="script"
/>
<link
rel="preload"
- href="/_next/static/chunks/pages/withRouter-98df0e7835d6b2911b7d.js"
+ href="/_next/static/chunks/pages/withRouter-6e72b47076be15290e02.js"
as="script"
/>
</head>
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/withRouter",
"query": {},
- "buildId": "NDOzpFQu7HgW0AcEgT9dg",
+ "buildId": "2LeDstjS10piW3tRBvP_H",
"isFallback": false,
"gip": true
}
@@ -69,19 +69,19 @@
async=""
></script>
<script
- src="/_next/static/chunks/pages/_app-2a09aa2580945cbf4a98.js"
+ src="/_next/static/chunks/pages/_app-fde3324f7822e8719dd1.js"
async=""
></script>
<script
- src="/_next/static/chunks/pages/withRouter-98df0e7835d6b2911b7d.js"
+ src="/_next/static/chunks/pages/withRouter-6e72b47076be15290e02.js"
async=""
></script>
<script
- src="/_next/static/NDOzpFQu7HgW0AcEgT9dg/_buildManifest.js"
+ src="/_next/static/2LeDstjS10piW3tRBvP_H/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/NDOzpFQu7HgW0AcEgT9dg/_ssgManifest.js"
+ src="/_next/static/2LeDstjS10piW3tRBvP_H/_ssgManifest.js"
async=""
></script>
</body>
@@ -47,12 +46,9 @@ export default async function handleCache(params) { | |||
|
|||
// Otherwise just transform the file | |||
// return it to the user asap and write it in cache |
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 looks like the cache: MISS
attribute doesn't get set if it fails to read the cache, should we set this under the catch?
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.
I don't have an opinion one way or another, although it would be a behavior change distinct from what else is in the PR. Would it be alright to fix separately after this PR merges? I don't mind doing that.
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.
Yeah can be changed in a different PR if we want 👍
OpenTelemetry maintainer here just curious why you decided to drop otel in favor of a custom solution. Is there something we could have done that would have better met your needs? |
The main reason we've replaced OpenTelemetry is that users started reporting issues related to their custom OpenTelemetry setup even though it was not meant for use by users of Next.js, we added tracing to find slowdowns in the core framework. In order to make this particular PR work we'd have to add a global tracerprovider which would conflict with users their custom setups as well. So this solution was just a bit more lightweight/non-breaking for our particular use case. The OpenTelemetry library worked really well though so it's possible we'll add support for that as an export target in the future if useful. Just to reiterate these traces are only useful if you're working on the Next.js core given they track compile times and such. |
A number of changes here. I recommend viewing the diff with the whitespace flag enabled.
--require instrument.js
.TRACE_TARGET
: one ofCONSOLE
,ZIPKIN
, orTELEMETRY
; defaults toTELEMETRY
if unset or invalid.TRACE_ID
: an 8-byte hex-encoded value used as the Zipkin trace ID; if not provided, this value will be randomly generated and passed down to subprocesses.Other sundry:
setGlobal
, but I don't have a ready alternative. IsdistDir
strictly required when creating a new Telemetry object? I didn't dig too deep here.As noted, there are a lot of changes, so it'd be great if a reviewer could:
Closes #22570
Fixes #22574