title: Missing trace logs in custom workflow activity for Real-Time workflow
body: <p>I've written a custom workflow activity against CRM 2013. You don't need to understand what it does. The problem I have is that despite instantiating the <code>ITracingService</code>, any tracing content that I generate using the <code>Trace(...)</code> method is obfuscated at runtime <strong>for real-time workflows only</strong>. In other words, if I run my workflow asynchronously and (deliberately) throw an Exception, I get to see the trace log in the corresponding system job record. If I simply switch the workflow to be "real-time" (synchronous) then I still get an exception and I still get any custom <em>exception</em> text, but of course there is no corresponding <code>systemjob</code> generated for realtime workflows so, like a plug-in, I am seeking my Trace output in the downloadable log file that is presented when an exception occurs. In this case, my Traces are not visible but I get what appears to be Microsoft's trace log from (perhaps) the parent context that hosts the workflow - you can see that it is referencing the steps in my workflow process definition:</p>
  
  <pre><code>[Microsoft.Crm.ObjectModel: Microsoft.Crm.Extensibility.InternalOperationPlugin]
  [46f6cf4c-14ae-4f1e-98a1-eae99a37e95c: ExecuteWorkflow]
  Starting sync workflow 'MyTestWorkflow', Id: ca8782b1-7ca4-e311-a055-6c3be5be5f78
  Entering CreateStep1_step: 
  Entering CustomActivityStep2_step: 
  Sync workflow '__Test' terminated with error 'Unexpected exception from plug-in (Execute): My.Test.WF.DoSomething: System.NullReferenceException: Object reference not set to an instance of an object.'
  </code></pre>
  
  <p>In my assembly <code>My.Test.WF.DoSomething</code> I access the Tracing Service at invocation and immediately start writing via the <code>Trace()</code> method, e.g. </p>
  
  <pre><code>_trace.Trace("Starting Greg's custom code...");
  </code></pre>
  
  <p>This is only an example, but the point is, my tracing works when asynchronous but is "lost" when synchronous.</p>
  
  <p>Any ideas?</p>