Skip to content
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

src: emit 'params' instead of 'data' for NodeTracing.dataCollected #24949

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/inspector/tracing_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class InspectorTraceWriter : public node::tracing::AsyncTraceWriter {
return;
json_writer_.reset();
std::ostringstream result(
"{\"method\":\"NodeTracing.dataCollected\",\"data\":",
"{\"method\":\"NodeTracing.dataCollected\",\"params\":",
std::ostringstream::ate);
result << stream_.str();
result << "}";
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-inspector-tracing-domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async function test() {
await generateTrace();
JSON.stringify(await post('NodeTracing.stop', { traceConfig }));
session.disconnect();
assert(traceNotification.data.value.length > 0);
assert(traceNotification.params.value.length > 0);
assert(tracingComplete);
clearInterval(interval);
console.log('Success');
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-trace-events-dynamic-enable.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ async function test() {
const events = [];
let tracingComplete = false;
session.on('NodeTracing.dataCollected', (n) => {
assert.ok(n && n.data && n.data.value);
events.push(...n.data.value); // append the events.
assert.ok(n && n.params && n.params.value);
events.push(...n.params.value); // append the events.
});
session.on('NodeTracing.tracingComplete', () => tracingComplete = true);

Expand Down