Skip to content

Commit

Permalink
chore: Add supportability metric when Azure Function mode is enabled (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tippmar-nr authored Jan 30, 2025
1 parent c02949f commit 0ab2e1b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,7 @@ private void CollectOneTimeMetrics()
ReportIfGCSamplerV2IsEnabled();
ReportIfAwsAccountIdProvided();
ReportIfAgentControlHealthEnabled();
ReportIfAzureFunctionModeIsEnabled();
}

public void CollectMetrics()
Expand Down Expand Up @@ -984,6 +985,14 @@ private void ReportIfAwsAccountIdProvided()
}
}

private void ReportIfAzureFunctionModeIsEnabled()
{
if (_configuration.AzureFunctionModeEnabled && _configuration.AzureFunctionModeDetected)
{
ReportSupportabilityCountMetric(MetricNames.SupportabilityAzureFunctionModeEnabled);
}
}

/// <summary>
/// FOR UNIT TESTING ONLY
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions src/Agent/NewRelic/Agent/Core/Metrics/MetricNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,7 @@ public static string GetSupportabilityInstallType(string installType)
public const string SupportabilityIgnoredInstrumentation = SupportabilityDotnetPs + "IgnoredInstrumentation";
public const string SupportabilityGCSamplerV2Enabled = SupportabilityDotnetPs + "GCSamplerV2/Enabled";
public const string SupportabilityAwsAccountIdProvided = SupportabilityDotnetPs + "AwsAccountId/Config";
public const string SupportabilityAzureFunctionModeEnabled = SupportabilityDotnetPs + "AzureFunctionMode/Enabled";

#endregion Supportability

Expand Down

0 comments on commit 0ab2e1b

Please sign in to comment.