Skip to content

Trace Events JS API doesn't work w/o CLI args #24944

@kjin

Description

@kjin
  • Version: 10.9+, 11+
  • Platform: macOS, Ubuntu
  • Subsystem: trace_events

The Trace Events JS API isn't functional if none of --trace-events-enabled or --trace-event-categories is passed as a CLI argument. In other words, traces are never written when this program is run without command line arguments:

const trace_events = require('trace_events');
const tracing = trace_events.createTracing({ categories: ['v8', 'node', 'node.perf', 'node.async_hooks'] });
tracing.enable();
tracing.disable();

In Node 10.8 in earlier this code works as intended, and a trace file is created.

Metadata

Metadata

Assignees

No one assigned

    Labels

    regressionIssues related to regressions.trace_eventsIssues and PRs related to V8, Node.js core, and userspace code trace events.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions