-
Notifications
You must be signed in to change notification settings - Fork 54
The parameters to the Event method do not match the parameters to the WriteEvent method - error #97
Comments
Which SDK do you use? Can you share list of NuGets with versions. What type is your application? |
Sure, Its classic WCF hosten by Windows Service |
I've been going over the WCF ETW provider and can't seem to find a scenario that would trigger this error, nor have I been able to reproduce it so far. It could possibly come from any other Also, from looking at the Besides compiling for .NET 4.0, are you running this on a machine that only has .net 4.0, or does it have a newer version? |
Update: Found the issue. PR with fix coming up. It should only be coming up when a telemetry module failed, so there's definitely an exception that we're trying to log and failing. |
@norek Once you test the new version with the fix, can you let us know if a) it fully fixes the issue for you, and b) what exception is being recorded in the ETW events that's causing request tracking to fail in your case? Sounds like there's an underlying issue and I'd like to get to the bottom of it ASAP 😄 |
hi, thanks for quick fix.
|
@norek: Thanks. I actually managed to code yet another bug into my In the meantime, since it seems you can repro this in the debugger, could you try this? Disable the 'Just my Code" option so that the output window contains all the errors, and then reproduce the problem in the debugger, and then send me a copy of the log? (tomasr @ microsoft). That should tell us at least what exception was triggered.... |
Hi, i investigate problem deeper, i clone you project and attach in debug mode. I find two issues.
After this fix , all request are tracked perfectly. Look at this, it is good solution? I should write some tests to it. What about this DisposedException? |
@norek Thanks for the report. I've made a couple of changes to prevent this, though the interesting bit here is that this should only happen in two cases: Either we're trying to track the same request object twice (which shouldn't happen) or the user code added a Protocol property to the request already. We certainly don't want to fail on the second case, but the first one is interesting, and have not figured out a way to repro it yet. I wonder if by any chance you might have the behavior registered twice? (once in config, and also the |
Hi, No i dont have any configuration in config file applied. I have only attribute |
Can you try the latest version and see if that one works better for you? I think I've cleared out all the issues you ran into.... |
Yup, it looks like everything its working perfectly, THANKS! |
I'm getting the same error, but not on WCF. This is an ASP.NET Core app targeted at 4.61. I turned off Just My Code and got this:
At first I thought it had to do with a custom telemetry logger that I wrote so I could swap out Application Insights if I needed to. But I took that out and now I don't reference any TelemetryClients anywhere in the app and I still get this error. Am I missing something? Like a DLL? :) I just don't know what I'm supposed to have in there. I brought in all the Nuget packages if wanted. Do you want me to move this to another issue? |
I believe I may have found the problem. This was originally and ASP.NET MVC Core app that I retargeted to 4.61. As such, the call in So I ripped out the packages for the web and just left the ones for ASP.NET Core installed. Now I get this:
|
And so, I retargeted every project in my solution (!) to
I hope these comments help someone, but I'm going to try to proceed with Just My Code enabled and hope someone responds to this. Thanks in advance. |
Hi @nhwilly I think there is a mix of many issues:
Seem to be CLR problem explained here microsoft/ApplicationInsights-dotnet-server#608
Is this only happens with Application Insights enabled? I doubt we use it in Application Insights so may be something with the code or configuration of your app.
Same here...
This error saying that some counters will not be collected while running locally. You can remove those from standard configuration to get rid of this message. However it is not harmful at all. Let me know if it helps or you need more details. |
@SergeyKanzhelev Thanks for the quick response. What kicked this off was me starting out with Unfortunately, most of the documentation/posts regarding targeting multiple frameworks seem to reference the json project format, but eventually I did figure out how to target multiple frameworks. That's allowed me to get everything back working again, by targeting the AI Core package for the ASP.NET site and the AI Web package for Azure Functions. Ditto for my own libraries. So, the good news is that the I am still getting the p.s. I am having some difficulty with AI in Azure Functions. Should I post that in this repo or on theirs? |
@nhwilly I think this repo is the best for Azure Functions questions related to Application Insights https://github.com/Azure/azure-webjobs-sdk/issues |
Thanks. According to their repo, stackoverflow id preferred. I posted it here: https://stackoverflow.com/questions/45292109/azure-functions-application-insights-custom-telemetry-eventsource-instance |
Hi, I cant see all requests on azure dashboard. When i attached debuger to service i discovered this message in Output Window:
Case study:
I have newest version of SDK. .NET 4.0.
The text was updated successfully, but these errors were encountered: