Feature Idea: Cross application tracing in Windows hosted WCF Services


I have several WCF services hosted as windows services and they are accessible over HTTP. I am not using custom instrumentation. All applications running on IIS are appearing in the service maps but windows hosted WCF services are not apparing in Serivice maps. Is there a way to enable cross application tracing in winodws hosted WCF service with out using custom instrumentation?

I have tried to add the below in app.config file but it is not working.

<add key="NewRelic.CrossApplicationTracer" value="true"/>

New Relic edit

  • I want this, too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.

Hi @swarup.jinugu - To enable cross application tracing on WCF services you have to have ASP.Net compatibility enabled.

@stefan_garnham Thanks for the reply. My WCF services are self hosted and from the documentation you sent, it sounds like Cross Application Tracing is not supported in self hosted WCF applications.

@swarup.jinugu -

You are correct. Cross app tracing is not supported for self-hosted WCF apps.

As @stefan_garnham rightly pointed out, CAT for WCF is only supported when hosted in IIS with asp.net compatibility mode enabled.

But I will make a feature request on your behalf!

1 Like

That would be fentastic @Tjd. Thank you!

@Tjd Can you provide some more information on why this is not technically supported? Just wanted to know if there is any other way to have these monitored may be via http headers etc…This has become high priority for me hence looking for a solution. Can you also suggest when this may be added to new relic?

@swarup.jinugu -

Our CAT information is transported to the request and back from the response via http headers. The agent requires that the HttpContext object be present to do this. HttpContext is not present for self-hosted WCF applications. In this case the agent does use OperationContext for keeping track of various bits of information but CAT info in OperationContext is not yet supported.

I really don’t know when CAT support for self hosted apps might be coming.

I wish I had more positive news.

1 Like

@Tjd You mentioned you would open a feature request for this. I’m not able to locate that request, can you provide a link?

If necessary, I could provide assistance on how to pull headers out of OperationContext. We do this internally today to track actual client ips for traffic coming through our load balancer (we pull the true client ip out of the X-Forwarded-For header).

1 Like

HI there @Jason_Nus -

Nice to see you back in the Explorers Hub.

We did file an internal Feature Idea back when this was first raised. At the time, we did not track feature ideas in the community, so I will add the poll and make sure this gets back in front of the team as it is still a feature idea.

I appreciate also the offer of help. I don’t know where this is on the product roadmap at the moment, so I can’t say when/if someone will reach out, but I will definitely pass it along.