Skip to content

Commit beac576

Browse files
Changes to add tracelog for Featureflag exceptions (#4809)
* Changes to tracelog Featueflag exceptions * Addressing review comments * Convertring the trace to error * nit changes --------- Co-authored-by: Dmitrii Bobreshev <[email protected]>
1 parent d9da7ec commit beac576

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Agent.Worker/TestResults/Utils/FeatureFlagService.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ public bool GetFeatureFlagState(string featureFlagName, Guid serviceInstanceId)
4444
}
4545
_executionContext.Debug(StringUtil.Format("{0} is off", featureFlagName));
4646
}
47-
catch
47+
catch(Exception ex)
4848
{
49-
_executionContext.Debug(StringUtil.Format("Failed to get FF {0} Value.", featureFlagName));
49+
var exceptionMessage = StringUtil.Format("Failed to get FF {0} Value. Error: {1}", featureFlagName, ex.ToString());
50+
_executionContext.Warning(exceptionMessage);
51+
Trace.Error(exceptionMessage);
5052
}
5153
return false;
5254
}

0 commit comments

Comments
 (0)