Skip to content

Commit

Permalink
fix merge commit
Browse files Browse the repository at this point in the history
  • Loading branch information
russcam committed Mar 25, 2021
1 parent a53c65d commit 97aa519
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Elastic.Apm/Model/Transaction.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information

Expand Down Expand Up @@ -116,7 +116,6 @@ internal Transaction(
// If an activity was created, reuse its id
Id = _activity.SpanId.ToHexString();
TraceId = _activity.TraceId.ToHexString();
_traceState = _activity.TraceStateString;

var idBytesFromActivity = new Span<byte>(new byte[16]);
_activity.TraceId.CopyTo(idBytesFromActivity);
Expand Down Expand Up @@ -190,7 +189,9 @@ internal Transaction(
ActivityTraceId.CreateFromString(distributedTracingData.TraceId.AsSpan()),
ActivitySpanId.CreateFromString(distributedTracingData.ParentId.AsSpan()),
distributedTracingData.FlagRecorded ? ActivityTraceFlags.Recorded : ActivityTraceFlags.None);
_activity.TraceStateString = distributedTracingData.TraceState;

if (distributedTracingData.HasTraceState)
_activity.TraceStateString = distributedTracingData.TraceState.ToTextHeader();
}
catch (Exception e)
{
Expand Down

0 comments on commit 97aa519

Please sign in to comment.