You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
In v8.32, the WCF Instrumentation started to use the WCF Message Header to extract DT and CAT payloads. This enabled NetTCP binding support which is a headerless transport type (unlike HTTP).
In pulling the headers, the agent uses GetHeader and relies on a try/catch to deal with any problems in doing so.
The try catch was designed to swallow failures for when the header value wasn't a string. However, the catch also fires when the header is not found in the message. This occurs when CAT/DT is not being used.
Though this solution is functionally correct, it causes interference with a customers logging mechanism due to the catch being fired.
Customer recommended us to use the FindHeader method to determine if the header is present, first.
try
{
var headerIdx = context.IncomingMessageHeaders.FindHeader(key, string.Empty);
if (headerIdx != -1)
{
headerValue = context.IncomingMessageHeaders.GetHeader<string>(headerIdx);
}
}
catch
{
}
This results in fewer exceptions that are caught and removes any interference with customer logging tools.
Expected Behavior
No extra log messages are captured by customer app due to not finding headers.
Steps to Reproduce
??
The text was updated successfully, but these errors were encountered:
Description
In v8.32, the WCF Instrumentation started to use the WCF Message Header to extract DT and CAT payloads. This enabled NetTCP binding support which is a headerless transport type (unlike HTTP).
In pulling the headers, the agent uses
GetHeader
and relies on a try/catch to deal with any problems in doing so.The try catch was designed to swallow failures for when the header value wasn't a string. However, the catch also fires when the header is not found in the message. This occurs when CAT/DT is not being used.
Though this solution is functionally correct, it causes interference with a customers logging mechanism due to the catch being fired.
Customer recommended us to use the
FindHeader
method to determine if the header is present, first.This results in fewer exceptions that are caught and removes any interference with customer logging tools.
Expected Behavior
No extra log messages are captured by customer app due to not finding headers.
Steps to Reproduce
??
The text was updated successfully, but these errors were encountered: