com.expedia.www:haystack-logback-metrics-appender

A logback appender that sends an error count to a graphite endpoint

License

License

Categories

Categories

Logback Application Layer Libs Logging Metrics Application Testing & Monitoring Monitoring
GroupId

GroupId

com.expedia.www
ArtifactId

ArtifactId

haystack-logback-metrics-appender
Last Version

Last Version

1.0.6
Release Date

Release Date

Type

Type

jar
Description

Description

com.expedia.www:haystack-logback-metrics-appender
A logback appender that sends an error count to a graphite endpoint
Source Code Management

Source Code Management

http://github.com/ExpediaDotCom/haystack-logback-metrics-appender

Download haystack-logback-metrics-appender

How to add to project

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

Dependencies

compile (5)

Group / Artifact Type Version
com.expedia.www : haystack-metrics jar 2.0.1
com.netflix.servo : servo-core jar 0.12.17
com.netflix.servo : servo-graphite jar 0.12.17
ch.qos.logback : logback-core jar 1.2.3
ch.qos.logback : logback-classic jar 1.2.3

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-all jar 1.9.5

Project Modules

There are no modules declared in this project.

Coverage Status Build Status

haystack-logback-metrics-appender

A logback appender that sends an error count to a graphite endpoint

Overview

To facilitate counting errors and alarming when they occur, this package contains a Logback Appender that sends a Graphite plaintext protocol message to a Graphite endpoint. The intent of this Appender is to make it easier to alarm on error messages, using the Grafana alert notifications, or a similar metrics-based mechanism.

Metric Message Format

Graphite plain text protocol messages are of the form <name> <value> <timestamp> where <name> is typically a period-delimited String, <value> is a number (either integer or floating point) and <timestamp> is a Linux epoch style number (milliseconds since January 1, 1970, midnight GMT). The format of the <name> created by EmitToGraphiteLogbackAppender is used in the data.influxdb.templates array here and is of the following format:

haystack.errors.<subsystem>.<fully-qualified-class-name>.<server>.<lineNumber>.<ERROR_TYPE>_<suffix>

where

  • <subsystem> is the name of the subsystem (like pipes, collector, etc.).
  • <fully-qualified-class-name> is something like com-foo-MyClass (com.foo is the package, MyClass is the name of the class, and all the periods in the package have been replaced by hyphens).
  • <server> is the name of the server where the error occurred.
  • <lineNumber> is the line number in MyClass.java or MyClass.scala where the call to log the error was made.
  • ERROR_TYPE is either ERROR or FATAL.
  • <suffix> is TODO list the metric suffixes added by Servo.

Building

Simply run mvn clean package from the root directory of the cloned repository.

Releases

  1. Decide what kind of version bump is necessary, based on Semantic Versioning conventions. In the items below, the version number you select will be referred to as x.y.z.
  2. Update the pom.xml, changing the version element to <version>x.y.z-SNAPSHOT</version>. Note the -SNAPSHOT suffix.
  3. Make your code changes, including unit tests. This package requires 100% unit test code coverage for the build to succeed.
  4. Update the ReleaseNotes.md file with details of your changes.
  5. Create a pull request with your changes.
  6. Ask for a review of the pull request; when it is approved, the Travis CI build will upload the resulting jar file to the SonaType Staging Repository.
  7. Tag the build with the version number: from a command line, executed in the root directory of the project:
git tag x.y.z
git push --tags

This will cause the jar file to be released to the SonaType Release Repository.

com.expedia.www

Expedia.com

Versions

Version
1.0.6
1.0.5
1.0.4
1.0.2
0.1.15
0.1.14
0.1.13
0.1.12
0.1.11
0.1.10
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0