AppOptics Dropwizard Support

Dropwizard integration with AppOptics

License

License

Categories

Categories

DropWizard Container Microservices Metrics Application Testing & Monitoring Monitoring
GroupId

GroupId

com.appoptics.metrics
ArtifactId

ArtifactId

dropwizard-metrics-appoptics
Last Version

Last Version

1.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

AppOptics Dropwizard Support
Dropwizard integration with AppOptics
Project URL

Project URL

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

Source Code Management

https://github.com/appoptics/dropwizard-metrics-appoptics

Download dropwizard-metrics-appoptics

How to add to project

<!-- https://jarcasting.com/artifacts/com.appoptics.metrics/dropwizard-metrics-appoptics/ -->
<dependency>
    <groupId>com.appoptics.metrics</groupId>
    <artifactId>dropwizard-metrics-appoptics</artifactId>
    <version>1.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.appoptics.metrics/dropwizard-metrics-appoptics/
implementation 'com.appoptics.metrics:dropwizard-metrics-appoptics:1.0.4'
// https://jarcasting.com/artifacts/com.appoptics.metrics/dropwizard-metrics-appoptics/
implementation ("com.appoptics.metrics:dropwizard-metrics-appoptics:1.0.4")
'com.appoptics.metrics:dropwizard-metrics-appoptics:jar:1.0.4'
<dependency org="com.appoptics.metrics" name="dropwizard-metrics-appoptics" rev="1.0.4">
  <artifact name="dropwizard-metrics-appoptics" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.appoptics.metrics', module='dropwizard-metrics-appoptics', version='1.0.4')
)
libraryDependencies += "com.appoptics.metrics" % "dropwizard-metrics-appoptics" % "1.0.4"
[com.appoptics.metrics/dropwizard-metrics-appoptics "1.0.4"]

Dependencies

compile (1)

Group / Artifact Type Version
com.appoptics.metrics : metrics-appoptics jar 1.0.5

provided (1)

Group / Artifact Type Version
io.dropwizard : dropwizard-metrics jar 1.2.9

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.easytesting : fest-assert-core jar 2.0M10

Project Modules

There are no modules declared in this project.

Overview

This project provides an easy way to send metrics from your Dropwizard project to AppOptics. It automatically includes the metrics-appoptics library and sets up the reporter based on your application YAML config. For more information on how you can use metrics-appoptics at runtime, please see some example usages.

Usage

There are two steps. First, you must add the dropwizard-metrics-appoptics Maven dependency to your POM file. Second, the application config YAML needs to be updated to configure the AppOptics Reporter, which will send your Metrics data to AppOptics.

First, add the dropwizard-metrics-appoptics dependency in your POM:

For Dropwizard 1.x and greater

Unfortunately we don't support versions prior to Dropwizard 1.x

Find the latest version here.

<dependency>
    <groupId>com.appoptics.metrics</groupId>
    <artifactId>dropwizard-metrics-appoptics</artifactId>
    <version>1.0.1</version>
</dependency>

Next, add a metrics configuration element to your YAML config file:

metrics:
  reporters:
    - type: appoptics
      token: "<AppOptics API Token>"
      tags:
        static:
          tier: webapp
        environment:
          host: NODE_NAME
          ...
      timeout: [optional (int), number of seconds, defaults to 5]
      prefix: [optional (string), prepended to metric names]
      name: [optional (string), name of the reporter]

That's it. Once your application starts, your metrics should soon appear in AppOptics.

The static tags are completely defined in the yaml file. The environment tags' names are also defined in the yaml file, but their values are determined by the environment variables at the time the AppOptics reporter is created. In this case, the environment variable with the name NODE_NAME would be queried and then assigned to the tag name host.

Alternative token config

If you wish to not have your token in the configuration, you can alternatively set it with the APPOPTICS_TOKEN environment variable.

Whitelist / Blacklist

By default, all expanded metrics (percentiles, rates) are submitted for each Timer, Histogram, and Meter. If you wish to whitelist only certain metrics, you can do so like this:

metrics:
  reporters:
    - type: appoptics
      token: "<AppOptics API Token>"
      tags: ...
      timeout: [optional (int), number of seconds, defaults to 5]
      prefix: [optional (string), prepended to metric names]
      name: [optional (string), name of the reporter]
      metricWhitelist:
      	- PCT_75
      	- PCT_98
      	- PCT_99
      	- RATE_MEAN
      	- RATE_1_MINUTE
      	- RATE_5_MINUTE

Similarly, if you wish to blacklist certain expanded metrics, you would do something similar to the above example, but replace metricWhitelist with metricBlacklist.

The full set of expanded metric names that you can specify are:

  • MEDIAN
  • PCT_75
  • PCT_95
  • PCT_98
  • PCT_99
  • PCT_999
  • COUNT
  • RATE_MEAN
  • RATE_1_MINUTE
  • RATE_5_MINUTE
  • RATE_15_MINUTE

Note that you cannot supply both metricWhitelist and metricBlacklist.

Contributors

com.appoptics.metrics

AppOptics

Seamless application performance management and infrastructure monitoring

Versions

Version
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0