Skip to content

Enable tracing within the cli and builder framework - #12894

Merged
LukeSheard merged 6 commits into
mainfrom
lukeps/clitracing
Feb 11, 2025
Merged

LukeSheard merged 6 commits into
mainfrom
lukeps/clitracing

Conversation

@LukeSheard

@LukeSheard LukeSheard commented Jan 22, 2025 •

Copy link
Copy Markdown
Contributor

To enable open telemetry and metric aggregation on our builder layers, I've added a port of the next.js tracing implementation which is compatible with our open telemetry ingestion.

This allows us to construct build spans across the CLI & zero-config builder framework and we'll eventually be able to reconstruct these into telemetry spans on the backend.

@changeset-bot

changeset-bot Bot commented Jan 22, 2025 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 109ce38

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@vercel/build-utils Minor
@vercel/next Minor
vercel Minor
@vercel/client Patch
@vercel/gatsby-plugin-vercel-builder Patch
@vercel/node Patch
@vercel/static-build Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

LukeSheard commented Feb 3, 2025 •

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

basic tracing support

output in root of output directory

Generate traceId

tag spans

Add changeset

Fix trace

Use exported builder names
Comment thread packages/build-utils/src/trace/trace.ts Outdated

const duration = Date.now() - this._start;
// durations are reported in microseconds
const duration = (Date.now() - this._start) * 1000;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should use process.hrtime

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ack

timneutkens
timneutkens previously approved these changes Feb 11, 2025
JSON.stringify(reporter.events)
);
} catch (err) {
output.error('Failed to write diagnostics trace file');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
output.error('Failed to write diagnostics trace file');
output.error(`Failed to write diagnostics trace file: ${diagnosticsOutputPath}`);

@LukeSheard
LukeSheard enabled auto-merge February 11, 2025 16:30
@LukeSheard
LukeSheard disabled auto-merge February 11, 2025 16:45
@LukeSheard
LukeSheard merged commit cc0b719 into main Feb 11, 2025
@LukeSheard
LukeSheard deleted the lukeps/clitracing branch February 11, 2025 16:49
LukeSheard pushed a commit that referenced this pull request Feb 11, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @vercel/[email protected]

### Minor Changes

- Support process tracing
([#12894](#12894))

## [email protected]

### Minor Changes

- Support process tracing
([#12894](#12894))

### Patch Changes

- Fixed bug where rewrites would be applied twice in some cases
([#13040](#13040))

- Updated dependencies
\[[`cc0b7194b119f72f59f77f9fba7e7a1188dac03c`](cc0b719),
[`7e1ee69be35db77d7692c07f5eab255ce24399de`](7e1ee69),
[`1f1186f26c6189c36098c76e3acda69ccb1790e0`](1f1186f),
[`6a4c779704d777e11370a19df5bcba168dd6dd48`](6a4c779)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- Support process tracing
([#12894](#12894))

### Patch Changes

- Fixed bug where rewrites would be applied twice in some cases
([#13040](#13040))

- pin fixtures and set up auto updates
([#12979](#12979))

## @vercel/[email protected]

### Minor Changes

- Add support for custom server entrypoint in React Router apps
([#13043](#13043))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`cc0b7194b119f72f59f77f9fba7e7a1188dac03c`](cc0b719)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`cc0b7194b119f72f59f77f9fba7e7a1188dac03c`](cc0b719)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`cc0b7194b119f72f59f77f9fba7e7a1188dac03c`](cc0b719)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
QuietCraftsmanship pushed a commit to QuietCraftsmanship/Vercel that referenced this pull request Jul 6, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @vercel/[email protected]

### Minor Changes

- Support process tracing
([#12894](vercel/vercel#12894))

## [email protected]

### Minor Changes

- Support process tracing
([#12894](vercel/vercel#12894))

### Patch Changes

- Fixed bug where rewrites would be applied twice in some cases
([#13040](vercel/vercel#13040))

- Updated dependencies
\[[`90dd70d026529fe592da78492536a83658432283`](vercel/vercel@90dd70d),
[`0d025a1fe736563b876df7619e750e1552ac2ad3`](vercel/vercel@0d025a1),
[`b4110af6ee40e3c0f617f38e1194c0ac6b8852e3`](vercel/vercel@b4110af),
[`a3b803f90bd4fd3e81a52b44e118923ef7a110ad`](vercel/vercel@a3b803f)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- Support process tracing
([#12894](vercel/vercel#12894))

### Patch Changes

- Fixed bug where rewrites would be applied twice in some cases
([#13040](vercel/vercel#13040))

- pin fixtures and set up auto updates
([#12979](vercel/vercel#12979))

## @vercel/[email protected]

### Minor Changes

- Add support for custom server entrypoint in React Router apps
([#13043](vercel/vercel#13043))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`90dd70d026529fe592da78492536a83658432283`](vercel/vercel@90dd70d)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`90dd70d026529fe592da78492536a83658432283`](vercel/vercel@90dd70d)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`90dd70d026529fe592da78492536a83658432283`](vercel/vercel@90dd70d)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

This branch was successfully deployed

1 active deployment
Preview — 109ce386 Deployed Feb 11, 2025 by vercel[bot]
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.

5 participants