Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
Node.js publishes
TracingChannelevents (start,end,asyncStart,asyncEnd,error) around units of work, and so can any library or app. devframe had no way to list those channels or show what they trace. This is PR 1 of 3 from plan 009 (#426): the core primitive and its wire contract. PR 2 adds the inspect tab, PR 3 traces devframe's own RPC and shared-state writes.What
ctx.tracingon every node context (scoped contexts included):register,list,record,stop,records,clear,onRecord.register()returns Node'sTracingChannel, so a producer declares and traces with one call.module.require,net.server.listen),register()calls, a newtracing.channelsfield onDevframeDefinitionand oninitHub/buildHuboptions, and ad-hocrecord()names.DevframeTraceRecord. A ring buffer keeps 500 records per channel.devframe:tracing:channels, streaming channeldevframe:tracing(one stream per recording channel, id published asstreamId), RPC actionsdevframe:tracing:record|stop|clear. Names live inDEVFRAME_EVENTSand the events reference.DF0081reports once wheretracingChannelis missing; every method is a no-op there andregister()returns a pass-through stand-in.One deviation from the plan: each recording gets a fresh stream id instead of reusing the channel name, because
streaming.start({ id })with an id that is still retained silently replaces the record. The plan doc gets this note in #426.Created with the help of an agent.