csainty / glimpse.ravendb Goto Github PK
View Code? Open in Web Editor NEWRavenDb Profiling plugin for Glimpse
Home Page: http://csainty.github.com/Glimpse.RavenDb
License: MIT License
RavenDb Profiling plugin for Glimpse
Home Page: http://csainty.github.com/Glimpse.RavenDb
License: MIT License
I've got my code setup such that the config file determines if it setups an embeddable document store or a standard client connection. It'd be really awesome if this project supported both of those, using the generic IDocumentStore type instead of just the Raven.Client.DocumentStore type.
This is related to the Glimpse.RavenDb.Profiler
. When I execute a particular query, I get the below error.
An exception of type 'System.NullReferenceException' occurred in Glimpse.AspNet.dll but was not handled in user code
Additional information: Object reference not set to an instance of an object.
at Glimpse.AspNet.AspNetFrameworkProvider.get_HttpRequestStore()
at Glimpse.Core.Framework.Factory.<>c__DisplayClass2.<InstantiateTimerStrategy>b__1()
at Glimpse.RavenDb.Profiler.DurationOnTimeline(String message, DateTime startTime, TimeSpan duration) in c:\Projects\Glimpse.RavenDb\Glimpse.RavenDb\Profiler.cs:line 112
at Glimpse.RavenDb.Profiler.EndRequest(Object sender, RequestResultArgs e) in c:\Projects\Glimpse.RavenDb\Glimpse.RavenDb\Profiler.cs:line 92
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at Raven.Client.Connection.HttpJsonRequestFactory.InvokeLogRequest(IHoldProfilingInformation sender, Func`1 generateRequestResult)
at Raven.Client.Connection.HttpJsonRequest.ReadJsonInternal(Func`1 getResponse)
at Raven.Client.Connection.HttpJsonRequest.ReadResponseJson()
at Raven.Client.Connection.ServerClient.DirectQuery(String index, IndexQuery query, OperationMetadata operationMetadata, String[] includes, Boolean metadataOnly, Boolean includeEntries)
at Raven.Client.Connection.ServerClient.<>c__DisplayClass62.<Query>b__61(OperationMetadata u)
at Raven.Client.Connection.ReplicationInformer.TryOperation[T](Func`2 operation, OperationMetadata operationMetadata, OperationMetadata primaryOperationMetadata, Boolean avoidThrowing, T& result, Boolean& wasTimeout)
Not much more clue is given - any idea what is wrong? Is this a bug in the profiler? If I switch off the RavenDB profiler, it works fine so I'm assuming it is.
Feel free to ask for further information to replicate the issue, and I will provide.
Kind Regards,
Karl
The Profiler.AttachTo
interface only accepts a DocumentStore
. This means that when using the ShardedDocumentStore
it can not be attached to the Glimpse profiler.
(ShardedDocumentStore
instances do hold the individual shard instances of the DocumentStore
but those aren't initialized and the requests do run through them that way, so that workaround won't work.)
The AttachTo
interface should instead take a parameter of the more generic interface of IDocumentStore
. That way both ShardedDocumentStore
and DocumentStore
types will work.
The title sums it up pretty well.
Hi
I have installed Glimpse.RavenDb.
I note that RavenDb requests made inside normal page are registered in Glimpse
RavenDb requests made inside ajax call page are not registered in Glimpse.
Have you any idea about this?
Many thanks
I keep getting "Value cannot be null. Parameter name: httpContext" exceptions, with the following stack trace:
at System.Web.HttpContextWrapper..ctor(HttpContext httpContext)
at Glimpse.Core.Extensibility.GlimpseTimer.get_Context()
at Glimpse.Core.Extensibility.GlimpseTimer.get_TimerMetadata()
at Glimpse.Core.Extensibility.GlimpseTimer.Start(String message, String category, String description)
at Glimpse.RavenDb.Profiler.BeginRequest(Object sender, WebRequestEventArgs e) in C:\Projects\Glimpse.RavenDb\Glimpse.RavenDb\Profiler.cs:line 206
FYI, in order to use Raven Client 2.5.0.0 you must use a binding redirect in your web.config...
I've been running this plugin on a web app which now runs some tasks in the background via Quartz.Net.
The tasks' dependencies are injected from our IoC container, and one the dependencies is a IDocumentSession.
Since these tasks run in the background there is no http context, and opening a session crashes with the following stack trace:
System.NullReferenceException: Object reference not set to an instance of an object.
at Glimpse.AspNet.AspNetFrameworkProvider.get_HttpRequestStore()
at Glimpse.Core.Framework.Factory.<>c__DisplayClass2.b__1()
at Glimpse.RavenDb.Profiler.PointOnTimeline(String message) in c:\Projects\Glimpse.RavenDb\Glimpse.RavenDb\Profiler.cs:line 107
at Glimpse.RavenDb.Profiler.TrackSession(InMemoryDocumentSessionOperations session) in c:\Projects\Glimpse.RavenDb\Glimpse.RavenDb\Profiler.cs:line 86
at Raven.Client.DocumentStoreBase.AfterSessionCreated(InMemoryDocumentSessionOperations session)
at Raven.Client.Document.DocumentStore.AfterSessionCreated(InMemoryDocumentSessionOperations session)
at Raven.Client.Document.DocumentStore.OpenSession(OpenSessionOptions options)
at Raven.Client.Document.DocumentStore.OpenSession()
My expectation would be for glimpse to be "mute" when running outside of an http request, and I'd very much would like to avoid having to set another document store with no profiling just for the background tasks.
Is this a bug? Is there a way to avoid this and keep the profiler set up?
Just installed nuget package 1.3, explicitely registered my (embedded) store to glimpse and the ravendb tab definitely stays blank. The glimpse timeline only shows one event "Session created" in the RavenDb category.
I'm using the latest stable RavenDb release (499).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.