Git Product home page Git Product logo

miniprofiler.elasticsearch's People

Contributors

danbrad avatar romansp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

miniprofiler.elasticsearch's Issues

Ability to avoid capturing large respones and requests

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:

  • Via configuration, being able to choose between: Capture only requests, requests+responses (default) or capture only responses, capture nothing.
  • The only-requests, only-responses and capture nothing options could collapse the non-captured parts to a "NNN bytes" string
  • In practice, the capturing still happens, but this plugin will only render the parts chosen
  • A constructor that accepts preconfigured settings - so that the user will have to enable DisableDirectStreaming 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).

ES profile does not show up anymore

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.

http://imgur.com/a/SNNZG

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?

Possible to support just hooking ES clients, without a special profiled client?

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:

  • If the user (me) is using dependency injection to inject the ElasticSearch client, this can be replaced / tweaked
  • If the HttpClient ElasticSearch.Net is using comes from the outside, from a HttpClientFactory, a custom HttpMessageHandler could be used to track responses

It could be ultimately awesome to just AddElasticSearch() to the miniprofiler setup, and then automagically capturing requests :)

Display of the Elastic Query

Hi!
Is it possible to show the query that was requested including the index name?
Just like the sql profiling output.
Thanks!

Runtime exception with NEST 5.x

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.