Skip to content

Commit

Permalink
use field access in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz committed Sep 10, 2024
1 parent 1298275 commit 2822c46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Elastic.Apm/Report/PayloadSenderV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public PayloadSenderV2(
_metadata.Labels.Add(globalLabelKeyValue.Key, globalLabelKeyValue.Value);
_cachedActivationMethod = _metadata.Service?.Agent.ActivationMethod;

if (isEnabled)
if (_isEnabled)
ResetActivationMethodIfKnownBrokenApmServer();

if (configuration.MaxQueueEventCount < configuration.MaxBatchEventCount)
Expand Down Expand Up @@ -128,7 +128,7 @@ public PayloadSenderV2(

SetUpFilters(TransactionFilters, SpanFilters, ErrorFilters, apmServerInfo, logger);

if (isEnabled)
if (_isEnabled)
StartWorkLoop();
}

Expand Down

0 comments on commit 2822c46

Please sign in to comment.