Skip to content

Commit

Permalink
notice: The transactionTracer.stackTraceThreshold setting has been de…
Browse files Browse the repository at this point in the history
…precated and no longer has any effect. (#1896)
  • Loading branch information
jaffinito authored Sep 8, 2023
1 parent 392391a commit 20ab0e7
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 24 deletions.
1 change: 0 additions & 1 deletion src/Agent/Configuration/newrelic.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
</attributes>
<transactionTracer enabled="true"
transactionThreshold="apdex_f"
stackTraceThreshold="500"
recordSql="obfuscated"
explainEnabled="false"
explainThreshold="500" />
Expand Down
1 change: 1 addition & 0 deletions src/Agent/NewRelic/Agent/Core/Config/Configuration.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,7 @@
<xs:attribute name="stackTraceThreshold" type="xs:int" default="500">
<xs:annotation>
<xs:documentation>
Deprecated: The transactionTracer.stackTraceThreshold setting has been deprecated and no longer has any effect. This setting will be removed in a future major release.
The threshold (in milliseconds) for when to collect a stack trace for a SQL call.
In other words, when SQL statements exceed this threshold, then capture and send to New Relic the current stack trace. This is helpful for pinpointing where long SQL calls originate from.
</xs:documentation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,6 @@ private RecordSqlConfigurationItem GetServerOverrideOrLocalRecordSqlConfiguratio
return new RecordSqlConfigurationItem(localRecordSqlString, LocalConfigSource);
}

public virtual TimeSpan TransactionTracerStackThreshold { get { return ServerOverrides((TimeSpanExtensions.FromSeconds(_serverConfiguration.RpmConfig.TransactionTracerStackThreshold)), TimeSpan.FromMilliseconds(_localConfiguration.transactionTracer.stackTraceThreshold)); } }
public virtual int TransactionTracerMaxStackTraces { get { return _localConfiguration.transactionTracer.maxStackTrace; } }
public virtual IEnumerable<Regex> RequestPathExclusionList
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,6 @@ public ReportedConfiguration(IConfiguration configuration)
[JsonProperty("transaction_tracer.record_sql_source")]
public string TransactionTracerRecordSqlSource => _configuration.TransactionTracerRecordSqlSource;

[JsonProperty("transaction_tracer.stack_trace_threshold")]
public TimeSpan TransactionTracerStackThreshold => _configuration.TransactionTracerStackThreshold;

[JsonProperty("transaction_tracer.max_stack_traces")]
public int TransactionTracerMaxStackTraces => _configuration.TransactionTracerMaxStackTraces;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ public interface IConfiguration
int TransactionTracerMaxSegments { get; }
string TransactionTracerRecordSql { get; }
string TransactionTracerRecordSqlSource { get; }
TimeSpan TransactionTracerStackThreshold { get; }
int TransactionTracerMaxStackTraces { get; }
IEnumerable<long> TrustedAccountIds { get; }
bool ServerSideConfigurationEnabled { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1287,22 +1287,6 @@ public void BrowserMonitoringJavaScriptAgentLoaderTypeSetToDefaultRum()
Assert.AreEqual("rum", _defaultConfig.BrowserMonitoringJavaScriptAgentLoaderType);
}

[TestCase(500, null, ExpectedResult = 500)]
[TestCase(1, null, ExpectedResult = 1)]
[TestCase(0, null, ExpectedResult = 0)]
[TestCase(500, 0.5, ExpectedResult = 500)]
[TestCase(500, 0.0, ExpectedResult = 0)]
[TestCase(0, 0.5, ExpectedResult = 500)]
[TestCase(1, 0.2, ExpectedResult = 200)]
[TestCase(-300, null, ExpectedResult = -300)]
public int TransactionTracerStackThresholdServerOverridesLocal(int local, double? server)
{
_localConfig.transactionTracer.stackTraceThreshold = local;
_serverConfig.RpmConfig.TransactionTracerStackThreshold = server;

return _defaultConfig.TransactionTracerStackThreshold.Milliseconds;
}

[Test]
public void ThreadProfilingIgnoreMethodFromXmlDecodesIntoListOfStrings()
{
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 20ab0e7

Please sign in to comment.