Comments (7)
Hi @vmelamed
The readme explains how to configure dependency tracking in detail.
But yes, if you don't want to use the Profiler + ApplicationInsights.config, and want to use code, then doing what you mention is the right way.
Let me know if you have any other questions...
from applicationinsights-sdk-labs.
I was hoping for code configuration not config file configuration?
Thanks
from applicationinsights-sdk-labs.
Sorry, replied initially before I figured out what you were asking and edited the comment too late!
But yes, if you don't want to use the Profiler + ApplicationInsights.config, and want to use code, then simply adding the endpoint behavior is the right way to do it.
from applicationinsights-sdk-labs.
Thanks! This worked but: when I configure the server/client with WebHttpBinding it throws exception (see below), which by looking at the code, is understandable - there is no soapAction for webHttp. Am I doing something wrong here? Any suggestions?
ArgumentNullException
Message = Value cannot be null.
Parameter name: key
ParamName = key
InnerException = <null>
TargetSite = (Method): Void RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
Source = mscorlib
HResult = 0x80004003
IsTransient = False
Data = (System.Collections.ListDictionaryInternal, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
StackTrace =
Server stack trace:
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at Microsoft.ApplicationInsights.Wcf.Implementation.ClientContract.TryLookupByAction(String soapAction, ClientOperation& operation) in C:\Projects\GitRepos\ApplicationInsights-SDK-Labs\WCF\Shared\Implementation\ClientContract.cs:line 31
at Microsoft.ApplicationInsights.Wcf.Implementation.ClientTelemetryChannelBase.StartSendTelemetry(Message request, String method) in C:\Projects\GitRepos\ApplicationInsights-SDK-Labs\WCF\Shared\Implementation\ClientTelemetryChannelBase.cs:line 184
at Microsoft.ApplicationInsights.Wcf.Implementation.ClientTelemetryRequestChannel.Request(Message message, TimeSpan timeout) in C:\Projects\GitRepos\ApplicationInsights-SDK-Labs\WCF\Shared\Implementation\ClientTelemetryRequestChannel.cs:line 47
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at vm.Aspects.Wcf.TestServer.IRequestResponse.GetStrings(Int32 numberOfStrings)
at vm.Aspects.Wcf.TestServer.RequestResponseClient.GetStrings(Int32 numberOfStrings) in C:\Projects\GitRepos\vm\Aspects\Test\vm.Aspects.Wcf.TestServer\IRequestResponse.Client.cs:line 238
at vm.Aspects.Wcf.TestServer.Program.Main(String[] args) in C:\Projects\GitRepos\vm\Aspects\Test\vm.Aspects.Wcf.TestServer\Program.cs:line 117
RemoteStackTrace =
Server stack trace:
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at Microsoft.ApplicationInsights.Wcf.Implementation.ClientContract.TryLookupByAction(String soapAction, ClientOperation& operation) in C:\Projects\GitRepos\ApplicationInsights-SDK-Labs\WCF\Shared\Implementation\ClientContract.cs:line 31
at Microsoft.ApplicationInsights.Wcf.Implementation.ClientTelemetryChannelBase.StartSendTelemetry(Message request, String method) in C:\Projects\GitRepos\ApplicationInsights-SDK-Labs\WCF\Shared\Implementation\ClientTelemetryChannelBase.cs:line 184
at Microsoft.ApplicationInsights.Wcf.Implementation.ClientTelemetryRequestChannel.Request(Message message, TimeSpan timeout) in C:\Projects\GitRepos\ApplicationInsights-SDK-Labs\WCF\Shared\Implementation\ClientTelemetryRequestChannel.cs:line 47
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
from applicationinsights-sdk-labs.
Thanks for reporting! I will investigate.
I am a bit curious as to what the expected results would be?
At the very least, it definitely should not fail, but I'd want to also make the output useful, and I'm wondering if the core HTTP dependency tracing wouldn't actually do a better job altogether here, in which case it might be better to just ignore those requests and let the core HTTP dependency tracking deal with them.
Thoughts?
from applicationinsights-sdk-labs.
In the last couple of days I played with WCF+AI and was thinking about your question. You are right that there is a bit of overlap between the two dependencies but then again WCF is not only about HTTP and you can see net.tcp or net.pipe client calls just as well and this is nice. Even on HTTP protocols it feels a little more natural to see the WCF language in the event.
This was the promise of WCF (sigh, not quite fulfilled) to be able to add new transports, serialization etc. protocols and still have the same business logic codebase, right? Related to that is why I would like to have a fine control on which clients write events to AI. In particular, I really would like to track the client calls, performance etc. to third party API-s.
from applicationinsights-sdk-labs.
I've been looking at this and I think I know how to work this, but need to setup a more extensive escenario to test my ideas.
I also want to see if I can detect Web-based contracts and just ignore them, as another alternative (in which case, the standard HTTP-based dependency tracking would log them only once).
from applicationinsights-sdk-labs.
Related Issues (20)
- When will the official launch of App insights SDK for WCF application will be done HOT 17
- Binding problem with ClientTelemetry HOT 2
- Is hosting app responsible for calling Flush() when ends? HOT 3
- Add NIC placeholder for custom performance counters HOT 1
- UserAgent Initializer overrides User.Id HOT 1
- Update WCF SDK to AppInsights v2.5.1 HOT 2
- Dependency Error Tracking HOT 1
- Dependency Target Name HOT 3
- Wcf Service calling another Wcf service loose track HOT 4
- Some Telemetry is sent twice (By WCF package and Web?) HOT 2
- Quertion about MyGet repo
- Has this repo been abandoned ? Please communicate + myget issues HOT 4
- Majority of WCF requests missing
- Unable to track any dependencies
- Status: Alive or Dead HOT 1
- Question: Exceptions logging HOT 1
- apply the wcf telemetry on two environments, One is getting the API operation contract logging, but another env didn't log properly HOT 6
- Question: Does this project support framework 4.7.x? HOT 1
- Random ArgumentNullException when invoking operations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from applicationinsights-sdk-labs.