Windows Communication Foundation (WCF) is a framework for building service-oriented applications. New Relic for .NET can monitor both self-hosted and IIS-hosted WCF services, to give you a more complete view of your application stack. New Relic collects standard transaction data and WCF service request parameters from each WCF transaction.
Full WCF app installation is available in versions 18.104.22.168 or higher of the .NET agent. Earlier versions support only IIS-hosted WCF applications, and only in ASP.NET Compatibility Mode.
To install IIS-hosted WCF apps:
- Install the newest .NET agent. IIS-hosted WCF applications will be instrumented automatically.
- Ensure you give each WCF app a descriptive name.
Enable or disable ASP.NET Compatibility Mode depending on which type of events you would like to be instrumented:
- ASP.NET Compatibility Mode enabled
When ASP.NET Compatibility Mode is enabled, the .NET agent instruments ASP.NET pipeline events as well as WCF events. In this mode, the agent provides you with a full view of your application stack.
- ASP.NET Compatibility Mode disabled
When ASP.NET Compatibility Mode is disabled, the .NET agent only instruments WCF events. Any activity that occurs as part of the ASP.NET pipeline will not be captured, such as agent API calls that are made outside of a WCF transaction.
Cross application traces are not supported when ASP.NET Compatibility Mode is disabled.
While many WCF applications are hosted in IIS, WCF applications can also be hosted as a custom Windows Service, a console app, or a Windows Forms app.
To instrument self-hosted WCF applications, see Non-IIS apps installation.
Cross application traces are not supported for self-hosted WCF applications.
Collect service request parameters
You can collect the WCF service request parameters attached to each service method. Whenever a service method is called, WCF transmits the service request as a method name with attached parameters. The .NET agent can collect the parameters attached to these service requests to better understand an individual transaction trace.
The instrumentation of parameter names is disabled by default, because parameters can contain sensitive information like passwords or usernames. However, you can ignore sensitive fields by specifying them in
ignore elements. To enable parameter groups, see serviceRequestParameters.
For more help
Additional documentation resources include:
- Improved WCF Monitoring for your Enterprise (overview of WCF monitoring from a New Relic developer)
- .NET compatibility and requirements (installation requirements)
- .NET custom instrumentation (adding instrumentation for unsupported frameworks)
- Instrumenting custom apps (instrument non-IIS-hosted apps)