romansp / miniprofiler.elasticsearch Goto Github PK
View Code? Open in Web Editor NEWElasticsearch.Net/NEST client for logging to MiniProfiler
License: MIT License
Elasticsearch.Net/NEST client for logging to MiniProfiler
License: MIT License
Hi again,
I was on my way to fork this repo, and add the missing constructors for the ProfiledElasticClient
and friends, when I noticed the reason you only have the one constructor is it's the only way you can force-enable DisableDirectStreaming(), which in turn is required to make the profiler addon useful beyond "yes, a request happened".
But it got me thinking. The first request I profiled with this library was immensely huge (partly why I wanted to profile it). So the miniprofiler UI was sluggish as it rendered the N requests I had made in their full length.
There are currently no options to this library to tweak this (from what I gather).
So I suggest the ability to:
only requests
, requests+responses
(default) or capture only responses
, capture nothing
.only-requests
, only-responses
and capture nothing
options could collapse the non-captured parts to a "NNN bytes" stringDisableDirectStreaming
to take full benefit of the plugin. If it's not enabled, it would be like setting capture nothing
(still providing timings - and possibly sizes? .. iirc ES had a bytes-sent/received value somewhere).As mentioned by @Mpdreamz in elastic/elasticsearch-net#865 (comment) investigate how all metrics can be included as individual timings to resulting profiling session.
The ES miniprofiler used to work for me but it no longer shows up. I can see the sql request being made but the ES column has disappeared.
All my ES request are made via the ProfiledElasticClient class.
Im running:
Elasticsearch.NET 2.5.5
NEST 2.5.5
MiniProfiler.Elasticsearch 4.0.0
MiniProfiler 3.2.0.157
Any ideas? It used to work a while back. I didn't notice when it stopped working... How can I debug?
This looks really cool!
When using Miniprofiler for EF f.ex., it "magically" just works by adding the proper services. I'm not entirely sure how Miniprofiler does this for EF.. I suspect EF has so many extension points, that it's possible.
Would it be possible to do the same with this project?
I'm thinking it should be possible to:
It could be ultimately awesome to just AddElasticSearch()
to the miniprofiler setup, and then automagically capturing requests :)
NuGet added support for packing README file together with the package: https://devblogs.microsoft.com/nuget/add-a-readme-to-your-nuget-package/
We should pack it with the next release.
Hi!
Is it possible to show the query that was requested including the index name?
Just like the sql profiling output.
Thanks!
MIniProfiler CustomTiming
has Errored
property that indicates if timing has been unsuccessful. We should set it to true when Elastic's IApiCallDetails.Success
is false
.
When using NEST 5.x clients, ProfiledElasticClient
constructor throws the exception:
System.MissingMethodException: 'Method not found: 'Void Nest.ElasticClient..ctor(Nest.IConnectionSettingsValues, Elasticsearch.Net.Connection.IConnection, Nest.INestSerializer, Elasticsearch.Net.Connection.ITransport)'.'
at StackExchange.Profiling.Elasticsearch.ProfiledElasticClient..ctor(ConnectionSettings configuration)
Because it's a runtime exception, it can lead to bugs which can be discovered very late in the development process.
Suggestion: Put a version block in NuGet manifest that prevents it from being installed on NEST 5.x projects until the actual issue is addressed.
Definitely needed after a proper first release.
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.