From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <sattard@atlassian.com>
Date: Fri, 26 Oct 2018 15:35:13 +1100
Subject: fix: expose tracing::Agent and use tracing::TracingController instead
 of v8::TracingController

diff --git a/src/api/environment.cc b/src/api/environment.cc
index 2c4acbc4fa0eca3b7c6d03b997445633646446e7..53b07052e43a09f29f863ee1b2287bdebe7b7a7f 100644
--- a/src/api/environment.cc
+++ b/src/api/environment.cc
@@ -472,6 +472,10 @@ MultiIsolatePlatform* GetMultiIsolatePlatform(IsolateData* env) {
   return env->platform();
 }
 
+node::tracing::Agent* CreateAgent() {
+  return new node::tracing::Agent();
+}
+
 MultiIsolatePlatform* CreatePlatform(
     int thread_pool_size,
     node::tracing::TracingController* tracing_controller) {
diff --git a/src/node.h b/src/node.h
index 34a16feaed229a59181e1b2e48b0e111d5b0b2a6..a649f52403659fd18898e1e813f97e32f33784e7 100644
--- a/src/node.h
+++ b/src/node.h
@@ -125,6 +125,7 @@ namespace node {
 
 namespace tracing {
 
+class Agent;
 class TracingController;
 
 }
@@ -522,6 +523,8 @@ NODE_DEPRECATED("Use GetMultiIsolatePlatform(env) instead",
 NODE_EXTERN MultiIsolatePlatform* GetMultiIsolatePlatform(Environment* env);
 NODE_EXTERN MultiIsolatePlatform* GetMultiIsolatePlatform(IsolateData* env);
 
+NODE_EXTERN node::tracing::Agent* CreateAgent();
+
 // Legacy variants of MultiIsolatePlatform::Create().
 NODE_DEPRECATED("Use variant taking a v8::TracingController* pointer instead",
     NODE_EXTERN MultiIsolatePlatform* CreatePlatform(
