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
-
Include the appropriate Ananke library dependency. You'll also need a working StatsD (Netuitive StatsD or Etsy StatsD) integration.
-
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>
-
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 enablenetuitive
reporter.
- Example Dropwizard application with
netuitive-agent
- Docker Linux agent to ship data to Netuitive. Note: some environment variables need to be updated to configure the agent.
Starting the Example Docker Environment
-
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
-
Change to the test docker directory, which contains a test stack definition for testing.
cd src/test/docker;
-
In that directory run:
docker-compose up -d --build
-
Now create and run your tests:
./run_tests.sh
-
Now shut down the stack:
docker-compose stop