Skip to content

Commit

Permalink
Transaction id should be optional for correlation info (#13)
Browse files Browse the repository at this point in the history
* Provide unit tests for CorrelationInfo

Signed-off-by: Tom Kerkhove <[email protected]>

* Fix build issue

Signed-off-by: Tom Kerkhove <[email protected]>

* Transaction id should not be mandatory
  • Loading branch information
tomkerkhove authored Feb 5, 2020
1 parent 6915ae0 commit fd67003
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Arcus.Observability.Correlation/CorrelationInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using GuardNet;
using GuardNet;

namespace Arcus.Observability.Correlation
{
Expand All @@ -15,9 +14,6 @@ public CorrelationInfo(string operationId, string transactionId)
{
Guard.NotNullOrEmpty(operationId, nameof(operationId),
"Cannot create a correlation instance with a blank operation ID");
Guard.For<ArgumentException>(
() => transactionId == string.Empty,
"Cannot create correlation instance with a blank transaction ID, only 'null' or non-blank ID's are allowed");

OperationId = operationId;
TransactionId = transactionId;
Expand Down

0 comments on commit fd67003

Please sign in to comment.