Skip to content

Commit 9c64c0a

Browse files
fixes to health logs
1 parent 265c2ac commit 9c64c0a

4 files changed

Lines changed: 43 additions & 1 deletion

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "2.0",
3+
"functionTimeout": "01:00:00",
4+
"logging": {
5+
"applicationInsights": {
6+
"samplingSettings": {
7+
"isEnabled": true,
8+
"excludedTypes": "Request"
9+
},
10+
"enableLiveMetricsFilters": true
11+
},
12+
"logLevel": {
13+
"HealthChecks": "Error",
14+
"HealthChecks.Extensions": "Error",
15+
"Function.health": "Error"
16+
}
17+
}
18+
}

application/CohortManager/src/Functions/ParticipantManagementServices/RemoveDummyGPCode/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"profiles": {
33
"ManageServiceNowParticipant": {
44
"commandName": "Project",
5-
"commandLineArgs": "--port 9092",
5+
"commandLineArgs": "--port 9093",
66
"launchBrowser": false
77
}
88
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "2.0",
3+
"functionTimeout": "01:00:00",
4+
"logging": {
5+
"applicationInsights": {
6+
"samplingSettings": {
7+
"isEnabled": true,
8+
"excludedTypes": "Request"
9+
},
10+
"enableLiveMetricsFilters": true
11+
},
12+
"logLevel": {
13+
"HealthChecks": "Error",
14+
"HealthChecks.Extensions": "Error",
15+
"Function.health": "Error"
16+
}
17+
}
18+
}

application/CohortManager/src/Functions/Shared/Common/HealthCheckTelemetryFilter.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ private static bool IsHealthCheckTelemetry(ITelemetry item)
2727
{
2828
if (item is RequestTelemetry request)
2929
{
30+
if (request.Properties.TryGetValue("FullName", out var fullName) &&
31+
fullName.Equals("Functions.health", StringComparison.OrdinalIgnoreCase))
32+
{
33+
return true;
34+
}
35+
3036
return request.Name?.Equals("health", StringComparison.OrdinalIgnoreCase) == true ||
3137
request.Url?.AbsolutePath.Contains("/health", StringComparison.OrdinalIgnoreCase) == true;
3238
}

0 commit comments

Comments
 (0)