dropwizard-metrics-netuitive

Netuitive Reporter for Dropwizard

License

License

Categories

Categories

DropWizard Container Microservices Net Metrics Application Testing & Monitoring Monitoring
GroupId

GroupId

com.netuitive
ArtifactId

ArtifactId

dropwizard-metrics-netuitive
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

zip
Description

Description

dropwizard-metrics-netuitive
Netuitive Reporter for Dropwizard
Project URL

Project URL

https://github.com/Netuitive/dropwizard-metrics
Source Code Management

Source Code Management

https://github.com/Netuitive/dropwizard-metrics.git

Download dropwizard-metrics-netuitive

Dependencies

compile (4)

Group / Artifact Type Version
io.dropwizard : dropwizard-core jar 0.9.2
com.netuitive : ananke jar 0.1.25
com.netuitive : iris jar 0.1.30
org.projectlombok : lombok jar 1.16.2

test (2)

Group / Artifact Type Version
org.testng : testng jar 6.8.8
org.mockito : mockito-core jar 1.9.5

Project Modules

There are no modules declared in this project.

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
    
com.netuitive

Netuitive

Netuitive Inc.

Versions

Version
1.1.0