diff --git a/src/Elastic.Apm/Api/Tracer.cs b/src/Elastic.Apm/Api/Tracer.cs index cb0110d5c..dce255cc9 100644 --- a/src/Elastic.Apm/Api/Tracer.cs +++ b/src/Elastic.Apm/Api/Tracer.cs @@ -78,13 +78,12 @@ private Transaction StartTransactionInternal(string name, string type, Distribut ) { var currentConfig = _configurationProvider.CurrentSnapshot; - var retVal = new Transaction(_logger, name, type, new Sampler(currentConfig.TransactionSampleRate), distributedTracingData - , _sender, currentConfig, CurrentExecutionSegmentsContainer, _apmServerInfo, _breakdownMetricsProvider, ignoreActivity, timestamp, id, + var transaction = new Transaction(_logger, name, type, new Sampler(currentConfig.TransactionSampleRate), distributedTracingData, + _sender, currentConfig, CurrentExecutionSegmentsContainer, _apmServerInfo, _breakdownMetricsProvider, ignoreActivity, timestamp, id, traceId: traceId, links: links, current: current); - retVal.Context.Service = _service; - _logger?.Debug()?.Log("Starting {TransactionValue}", retVal); - return retVal; + _logger?.Debug()?.Log("Starting {TransactionValue}", transaction); + return transaction; } public void CaptureTransaction(string name, string type, Action action, DistributedTracingData distributedTracingData = null, IEnumerable links = null)