Skip to content

Netuitive/dropwizard-metrics

Repository files navigation

Netuitive Dropwizard Integration

Dropwizard is part Java framework and part Java library that assists in operating web services. The Netuitive Dropwizard integration uses a DropWizard.io netuitive reporter to send metrics to Netuitive's Linux agent.

Using the DropWizard Integration

  1. Include the appropriate Ananke library dependency. You'll also need a working StatsD (Netuitive StatsD or Etsy StatsD) integration.

  2. Add dropwizard-metrics to your POM. There's also additional dependency formats for other build managers here.

     <dependency>
       <groupId>com.netuitive</groupId>
       <artifactId>dropwizard-metrics</artifactId>
       <version>1.0.0</version>
       <type>pom</type>
     </dependency>
    
  3. Add the following to your Dropwizard config.yml file:

     metrics:
       frequency: 1 minute
       reporters:
           - type: netuitive
             host: netuitive-agent
             port: 8125
    

Testing with Docker Stack

Directory Purpose
src/test/docker Root directory for this test suite.
src/test/docker/docker-dropwizard-example Dropwizard example application for testing.
src/test/docker/docker-compose.yml docker-compose file used to define and launch test environment.

Runtime Environment Used for Testing

  • Docker version 1.10.3, build 20f81dd
  • docker-compose version 1.6.2, build 4d72027
  • VirtualBox Version 5.0.16 r105871

Docker Stack Defines Two Containers:

  • dropwizard
    • Example Dropwizard application with dropwizard-metrics-netuitive reporter (requires local gradle install to work).
    • Updated config.yml file to enable netuitive reporter.
  • netuitive-agent
    • Docker Linux agent to ship data to Netuitive. Note: some environment variables need to be updated to configure the agent.

Alt

Starting the Example Docker Environment

  1. Run the following to start the example application and Netuitive Docker agent:

     docker-compose up -d
    

Docker will build the dropwizard-metrics and example project within the container from source and run the Netuitive Docker agent alongside it.

Running the tests

  1. Change to the test docker directory, which contains a test stack definition for testing.

     cd src/test/docker;
    
  2. In that directory run:

     docker-compose up -d --build
    
  3. Now create and run your tests:

     ./run_tests.sh
    
  4. Now shut down the stack:

     docker-compose stop
    

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages