Giter VIP home page Giter VIP logo

insight-plugin-mongodb's Introduction

This repository is no longer actively maintained by VMware, Inc.

This is a MongoDB plugin for Spring Insight

Spring Insight runs in the SpringSource tc Server. See http://www.springsource.org/insight for details. This plugin adds instrumentation to for web applications that use MongoDB (http://www.mongodb.org) through the MongoDB Java driver, which typically works outside the normal ORM flow.

What does it do?

It instruments calls to MongoDB from the Java driver. Typical calls on the DBCollection class are traced, as are the DB.command() calls that are not covered by these.

The DBCursor.next() call is traced but the information for each call is limited. For example, it does not provide the corresponding DBCollection (yet).

Some attempt is made to decode parameters and return values for common and MongoDB types we know about.

Installing the plugin

Get the code: git clone git://github.com/NogbadTheBad/insight-plugin-mongodb.git

Now build it:


cd insight-plugin-mongodb
mvn clean package

You’ll need to have tc Server Developer Edition installed. Let’s call the location of that tcServer.

Now copy the plugin jar to the right place under tcServer.


cp target/insight-plugin-mongodb-x.x.jar tcServer/spring-insight-instance/insight/collection-plugins

Running the plugin

  1. Start up Spring Insight Server as usual (see the Spring tc Server Developer Edition documentation) and make sure your WAR file is loaded. Start your application and make sure it’s running.
  2. Browse to http://localhost:8080/insight to see the Spring Insight dashboard. Click on the Administration button and then Collection Plug-ins under Reports and Statistics.
  3. If you can see the mongodb plugin it’s installed and running.
  4. Run through your application in a way you’re sure exercises MongoDB. Then go back to the Spring Insight dashboard to see the traces.

Have fun! And let me know what doesn’t work well.

Known issues

  1. The collection name is not available from DBCursor, so we can’t see which collection we’re calling next() on. This is going to be simply a matter of coercing DBCursor to give up a private instance field for which there is not accessor. (I’m sure I read somewhere how to do that.)

Rejected enhancements

  1. I thought that Morpia support belonged here at some point. But that’s less interesting now that GORM support for MongoDB is provided by a Grails Datastore and not by a contributed plugin (gorm-mongodb) that uses Morphia. YMMV, in which case feel free to add it.

Contact

Stephen Harrison (stephen [at] harrison [dot] org)
Merged and Updated to Insight 1.7.0 by the Insight Team

insight-plugin-mongodb's People

Contributors

cloudy-native avatar trevormarshall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

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.