Repository navigation
Inject default Vercel tracing for Next.js builds without an instrumentation file #148
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
Open
kakadiadarpan
wants to merge
26
commits into
nextjs:main
Choose a base branch
from
kakadiadarpan:darpan/inject-instrumentation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,215
−1
Open
Changes from 8 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
b23c3be
Inject default Vercel tracing when Next can compile it
kakadiadarpan 3d06132
Test the default Vercel tracing inject gates
kakadiadarpan 82eec17
Gate default tracing on VERCEL_DEFAULT_TRACING_ENABLED and cap the AP…
kakadiadarpan 5210af2
Inject default tracing when the app has no @opentelemetry/api
kakadiadarpan 74a538a
Add changeset for default Vercel tracing
kakadiadarpan 05e9e14
Name the default tracing service after the Vercel project
kakadiadarpan 80ca841
Drop the Next.js support check from the tracing inject
kakadiadarpan cf92f68
Only log tracing inject skips with VERCEL_BUILDER_DEBUG
kakadiadarpan 3e760ee
Move the default tracing gates to the modifyConfig call site
kakadiadarpan d798036
Drop the pageExtensions fallback from the tracing inject
kakadiadarpan 25c81dc
Simplify the @opentelemetry/api version check
kakadiadarpan df02835
Inline and explain the @opentelemetry/api copy filter
kakadiadarpan d0b51ed
Inline the single-use wrapper resolve and entry push helpers
kakadiadarpan 14eaa52
Skip the tracing inject when a parent folder has an instrumentation file
kakadiadarpan f7f7191
Name the tracing wrapper instrumentation.mjs
kakadiadarpan 50069b5
Import @vercel/otel only on Node.js in the tracing wrapper
kakadiadarpan a8a24e6
Ship a pinned @opentelemetry/api 1.9.0 with the tracing inject
kakadiadarpan 800c462
Require a pinned 1.9 API in the build image and skip nested copies
kakadiadarpan b15183d
Rename injectInstrumentation to instrumentationInject
kakadiadarpan 8e8ced9
Use instrumentationInject in the changeset
kakadiadarpan 19859c7
Say which @opentelemetry/api copy @vercel/otel uses on webpack
kakadiadarpan 611e429
Skip the tracing inject when instrumentationInject already has entries
kakadiadarpan 5ed6ee5
Skip the tracing inject when a copied package has runtime dependencies
kakadiadarpan b1f8d1f
Keep a failing @vercel/otel from failing every request
kakadiadarpan e505572
Build the tracing tree in a temp folder and rename it into place
kakadiadarpan 3ff6296
Turn off runtime fetch spans when default tracing is injected
kakadiadarpan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@next-community/adapter-vercel": patch | ||
| --- | ||
|
|
||
| Inject default Vercel tracing into Next.js builds that have no instrumentation file. When the build enables it, the adapter copies `@vercel/otel` from the build image into `.vercel/otel/` and points `injectInstrumentation` at a wrapper there. Any failed check skips the inject without failing the build. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.