Skip to content

Commit bd15745

Browse files
authored
Skip some errors from being sent to telemetry (#8003)
## Summary of changes Skips a few errors that are `Ignored` in Error Tracking and shouldn't really be sent to telemetry as we can't act on them. ## Reason for change Nothing we can really do about these. ## Implementation details Marked as `ErrorSkipTelemetry` ## Test coverage N/A ## Other details <!-- Fixes #{issue} --> I guess one thing we do lose here is whether we _want_ to see how often these happen? <!-- ⚠️ Note: Where possible, please obtain 2 approvals prior to merging. Unless CODEOWNERS specifies otherwise, for external teams it is typically best to have one review from a team member, and one review from apm-dotnet. Trivial changes do not require 2 reviews. MergeQueue is NOT enabled in this repository. If you have write access to the repo, the PR has 1-2 approvals (see above), and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #apm-dotnet channel in Slack. -->
1 parent 291ef8e commit bd15745

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tracer/src/Datadog.Trace/AgentProcessManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public static void Initialize()
7070
var azureAppServiceSettings = new ImmutableAzureAppServiceSettings(GlobalConfigurationSource.Instance, NullConfigurationTelemetry.Instance);
7171
if (azureAppServiceSettings.IsUnsafeToTrace)
7272
{
73-
Log.Error("The Azure Site Extension doesn't have the required parameters to work. The API_KEY is likely missing. The trace_agent and dogstatsd process will not be started. Check your app configuration and restart the app service to try again.");
73+
Log.ErrorSkipTelemetry("The Azure Site Extension doesn't have the required parameters to work. The API_KEY is likely missing. The trace_agent and dogstatsd process will not be started. Check your app configuration and restart the app service to try again.");
7474
return;
7575
}
7676

tracer/src/Datadog.Trace/Ci/Coverage/Util/CoverageUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private static bool TryCombineAndGetTotalCoverage(string? inputFolder, out Globa
7373
var jsonFiles = Directory.GetFiles(inputFolder, "*.json", SearchOption.TopDirectoryOnly);
7474
if (jsonFiles.Length == 0)
7575
{
76-
Log.Error("'{InputFolder}' doesn't contain any json file.", inputFolder);
76+
Log.ErrorSkipTelemetry("'{InputFolder}' doesn't contain any json file.", inputFolder);
7777
return false;
7878
}
7979

tracer/src/Datadog.Trace/Configuration/ImmutableAzureAppServiceSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public ImmutableAzureAppServiceSettings(IConfigurationSource? source, IConfigura
5656

5757
if (string.IsNullOrEmpty(apiKey))
5858
{
59-
Log.Error("The Azure Site Extension will not work if you have not configured DD_API_KEY.");
59+
Log.ErrorSkipTelemetry("The Azure Site Extension will not work if you have not configured DD_API_KEY.");
6060
IsUnsafeToTrace = true;
6161
}
6262

0 commit comments

Comments
 (0)