mishrsud / mvc-mini-profiler

Automatically exported from code.google.com/p/mvc-mini-profiler
0 stars 0 forks source link

Feature Request: WCF/Webservice Logging #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Feature Request: Many sites that use third party webservices would benefit from 
being able to see all webservice requests and the time they took (possibly the 
xml of the request and response?). 

Also, in the case of my world we have a very heavy WCF middle tier that handles 
all our sql. I noticed you were doing ajax logging. Could that technique be 
ported to work over WCF so we could see the sql in our middle tier up on the 
frontend website? 

Awesome tool! Thanks!
Paul 

Original issue reported on code.google.com by paullem...@gmail.com on 15 Jun 2011 at 3:21

GoogleCodeExporter commented 8 years ago

Original comment by nrcraver on 20 Jun 2011 at 12:02

GoogleCodeExporter commented 8 years ago
I do not oppose this ... 

we simply have no resources to work on it

Original comment by sam.saff...@gmail.com on 15 Aug 2011 at 1:07

GoogleCodeExporter commented 8 years ago
Sam, if you can describe how it can be done I would be interested in 
implementing it as it fits my current requirements...

Original comment by davidjoh...@gmail.com on 23 Sep 2011 at 4:34

GoogleCodeExporter commented 8 years ago
Hi David,

If you grab the source code there's a naive implementation (and example in the 
main MVC example project) in there now. I'll try and flesh it out and document 
this weekend - have been flat out with my day job since committing this.

Original comment by m...@developer.geek.nz on 24 Sep 2011 at 7:35

GoogleCodeExporter commented 8 years ago
Someone just added this question on stackoverflow. I answered it and might have 
good value to this topic. 
http://stackoverflow.com/questions/7530027/mvcminiprofiler-profiling-web-app-and
-lower-layers

Original comment by paullem...@gmail.com on 26 Sep 2011 at 1:36

GoogleCodeExporter commented 8 years ago
Great answer and well discovered! We'll pull some of it into the documentation 
here if you don't mind.

Currently the version in that project is very alpha quality and doesn't cover a 
few scenarios or edge cases. Hopefully I'll get a fuller version and 
documentation up soon which we can distribute via NuGet.

Original comment by m...@developer.geek.nz on 26 Sep 2011 at 8:06

GoogleCodeExporter commented 8 years ago
None of the SQL profiling information is sent over from the server to the 
client.  It appears to be due to the fact that the SQL related field in 
MiniProfiler (i.e.  SqlProfiler, _sqlExecutionCounts, etc. are not serialized.  
This produces bugs on the front-end since "HasSqlTimings" is true but none of 
the info is there.  In particular, it results in the javascript error:  

Uncaught TypeError: Cannot read property 'top' of null

Original comment by kirk.w...@gmail.com on 24 Feb 2012 at 6:15

GoogleCodeExporter commented 8 years ago
I got this functionality working now by making two changes:

1) MiniProfiler.cs: AddProfilerResults
Synchronized the HasSqlTimings property to the profile root.  Added this line 
to the end of the method:

profiler.HasSqlTimings = profiler.HasSqlTimings | 
externalProfiler.HasSqlTimings;

(not sure if there's a better approach)

2) MiniProfiler.IDbProfiler.cs
Made the private readonly field _sqlExecutionCounts not readonly
and exposed a property for it so it can participate in serialization:

[DataMember]
public Dictionary<string, int> SqlExecutionCounts
{
    get { return _sqlExecutionCounts; }
    set { _sqlExecutionCounts = value; }
}

Once you make these changes, the SQL results should appear property as it would 
when not using the WCF extension.

Original comment by kirk.w...@gmail.com on 24 Feb 2012 at 6:55

GoogleCodeExporter commented 8 years ago
Why not fork the project and create a pull request. 

Original comment by paullem...@gmail.com on 24 Feb 2012 at 7:16

GoogleCodeExporter commented 8 years ago
I confess I've never done that before, Paul.  But I'd be happy to try.  I've 
got the repo cloned locally with my changes committed.  Is there an FAQ or 
anything for how to accomplish the last part (the "pull request")?

Original comment by kirk.w...@gmail.com on 24 Feb 2012 at 7:28

GoogleCodeExporter commented 8 years ago
I believe there isn't a formal "pull request" function within code.google. Just 
message  Sam and put in your project url and ask to be pulled for this. 

Original comment by paullem...@gmail.com on 24 Feb 2012 at 7:41

GoogleCodeExporter commented 8 years ago
one moment, are we double persisting information after this change, is it not 
already available in other persisted objects? 

Original comment by sam.saff...@gmail.com on 2 Mar 2012 at 12:20

GoogleCodeExporter commented 8 years ago
I'm not sure -- in my testing, that info wasn't coming over across the wire to 
the WCF client.  When I made it serializable, it was.   Do you know how else 
that data would be coming over?

Original comment by kirk.w...@gmail.com on 2 Mar 2012 at 12:22

GoogleCodeExporter commented 8 years ago
Do you mind moving this to http://community.miniprofiler.com ... killing off 
google issues

Original comment by sam.saff...@gmail.com on 27 Apr 2012 at 11:41