Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Long committed Aug 8, 2023
1 parent 337f403 commit b6db8bc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Activities/Internal/EventSource/ActivityEventSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public ActivityEventSender(ActivityEventSource eventSource, IExecutionContext ex

public void SendActivityMetric(Activity activity)
{
if (m_options.Value.DisableActivityEventSender || !m_eventSource.IsEnabled())
if (!m_options.Value.ActivityEventSenderEnabled || !m_eventSource.IsEnabled())
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Activities/Option/ActivityOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public class ActivityOption
/// <summary>
/// Disable ActivityEventSender so Activity metric is only sent via ActivityMetricsSender
/// </summary>
public bool DisableActivityEventSender { get; set; }
public bool ActivityEventSenderEnabled { get; set; } = true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void LogActivityEndEvent_DisableByOption_CreatesNoEvent(EventSourcesEvent
contextMock.Setup(c => c.ServiceName).Returns("TestService");

Mock<IOptions<ActivityOption>> mockOptions = new();
ActivityOption activityOption = new() { DisableActivityEventSender = true };
ActivityOption activityOption = new() { ActivityEventSenderEnabled = false };
mockOptions.Setup(m => m.Value).Returns(activityOption);

ActivityEventSender logEventSource = new(
Expand Down

0 comments on commit b6db8bc

Please sign in to comment.