Skip to content

Commit

Permalink
Readme, release and CI build updates
Browse files Browse the repository at this point in the history
  • Loading branch information
llinder committed Jan 23, 2017
1 parent af3f6ef commit 1499702
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 20 deletions.
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[![CircleCI](https://circleci.com/gh/SmartThingsOSS/springboot-dropwizard-metrics.svg?style=svg)](https://circleci.com/gh/SmartThingsOSS/springboot-dropwizard-metrics)
[![Download](https://api.bintray.com/packages/smartthingsoss/maven/smartthings.springboot-dropwizard-metrics/images/download.svg) ](https://bintray.com/smartthingsoss/maven/smartthings.springboot-dropwizard-metrics/_latestVersion)


# springboot-dropwizard-metrics
Spring Boot auto configuration libraries for adding Dropwizard metrics
collection and reporting to Spring Boot projects.

## Reporters

### Datadog

Configures Coursera Dropwizard Datadog reporter using Spring Boot
configuration.

#### Configuration
```yaml
metrics:
datadog:
interval: 1 # interval in which metrics are reported
host:
ec2-host: false
prefix: my-app # Datadog metric prefix
expansions: # Datadog expansion enum list (use ALL for all expansions)
tags: # Datadog tag list
includes: # regex list of metrics to include.
excludes: # regex list of metric names to exclude.
transport:
type: # on of 'http' or 'statsd'
# HTTP
api-key: # Datadog API key
connection-timeout: # connection timeout in milliseconds
socket-timeout: # socket timeout in milliseconds
# Statsd
statsd-port:
statsd-host:
statsd-prefix:
prefix:

```

## Collection

### InstrumentedFilter

Configures the Dropwizard InstrumentedFilter and adds it to
Spring Boot as a FilterRegistrationBean.

#### Configuration
```yaml
metrics:
servlet:
name-prefix: 'instrumented' # metric prefix
```

## Building from source

```bash
$ ./gradlew check
```

## Artifacts

### Library Releases

Releases are uploaded to [Bintray](https://dl.bintray.com/smartthingsoss/maven/smartthings)

### Library Snapshots

Snapshot are uploaded to [SmartThings Artifactory](https://smartthings.artifactoryonline.com/smartthings/libs-snapshot-local)

6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Release Process

This repo uses semantic versions and derives the version from git tags.

To build a new release create a github tag with `vN.M.L`. This will trigger
CircleCI to start a new release build and publish artifacts to Bintray.
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ ext {
shortMessage = grgit.head().shortMessage
}

group 'smartthings.springboot.metrics'

allprojects {

group 'smartthings.springboot.metrics'

repositories {
mavenCentral()
jcenter()
Expand Down
13 changes: 7 additions & 6 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ test:

deployment:
snapshot:
owner: SmartThingsOSS
branch: master
commands:
- ./gradlew publish -PsmartThingsArtifactoryUserName=$ARTIFACTORY_USERNAME -PsmartThingsArtifactoryPassword=$ARTIFACTORY_PASSWORD
- ./gradlew publish -PsmartThingsUserName=$ARTIFACTORY_USERNAME -PsmartThingsPassword=$ARTIFACTORY_PASSWORD

# TODO use tag based release
# release:
# branch: release
# commands:
# - ./gradlew bintrayUpload
release:
owner: SmartThingsOSS
tag: /v\d+\.\d+\.\d+/
commands:
- ./gradlew bintray

26 changes: 14 additions & 12 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,22 @@ task printProperties {
}

if (isSnapshot) {
publishing {
publications {
main(MavenPublication) {
from components.java
artifact sourceJar
if (project.hasProperty('smartThingsUserName')) {
publishing {
publications {
main(MavenPublication) {
from components.java
artifact sourceJar
}
}
}
repositories {
maven {
credentials {
username smartThingsUserName
password smartThingsPassword
repositories {
maven {
credentials {
username smartThingsUserName
password smartThingsPassword
}
url "https://smartthings.artifactoryonline.com/smartthings/libs-snapshot-local"
}
url "https://smartthings.artifactoryonline.com/smartthings/libs-snapshot-local"
}
}
}
Expand Down

0 comments on commit 1499702

Please sign in to comment.