Skip to content

Commit

Permalink
Merge pull request #103 from kanderson250/Java-11-support
Browse files Browse the repository at this point in the history
Update Dropwizard Version
  • Loading branch information
kanderson250 authored May 10, 2023
2 parents 430d061 + 05d7e8c commit 0c5fb0f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.idea
out/
build
.DS_Store
.DS_Store
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2023-05-09
- Update to io.dropwizard:dropwizard-metrics 4.0.0.
- Breaking change: this version no longer supports any Java version below Java 11.

## [0.9.0] - 2023-05-09
- Update to io.dropwizard:dropwizard-metrics 2.1.6.
- Update to io.dropwizard.metrics:metrics-core 4.2.18.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ please visit [the exporter specs documentation repo](https://github.com/newrelic
Add required `build.gradle` dependencies to your project:

```
implementation("com.newrelic.telemetry:dropwizard-metrics-newrelic:0.9.0")
implementation("com.newrelic.telemetry:dropwizard-metrics-newrelic:1.0.0")
implementation("com.newrelic.telemetry:telemetry-core:0.15.0")
implementation("com.newrelic.telemetry:telemetry-http-okhttp:0.15.0")
```
Expand Down Expand Up @@ -142,7 +142,7 @@ public class MyApplication extends Application<MyConfig> {

### Dropwizard Metrics Reporter

If you have a dropwizard project and have at least `dropwizard-core` 1.1.X,
If you have a dropwizard project and have at least `dropwizard-core` 2.1.6,
then you can perform the following steps to automatically report metrics to
New Relic.

Expand All @@ -169,7 +169,7 @@ in New Relic.
[javadoc-url]: https://www.javadoc.io/doc/com.newrelic.telemetry/dropwizard-metrics-newrelic

### Building
To compile, run the tests and build the jars:
This project requires Java 11. To compile, run the tests and build the jars:

`$ ./gradlew build`

Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ googleJavaFormat {
dependencies {
api("io.dropwizard.metrics:metrics-core:4.2.18")
api("com.newrelic.telemetry:telemetry-core:0.15.0")
implementation("io.dropwizard:dropwizard-metrics:2.1.6")
implementation("io.dropwizard:dropwizard-metrics:4.0.0")
implementation("com.newrelic.telemetry:telemetry-http-okhttp:0.15.0")

testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.4.2")
Expand All @@ -51,8 +51,8 @@ jar.apply {
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withSourcesJar()
withJavadocJar()
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
releaseVersion = 0.9.0
releaseVersion = 1.0.0

# set this to true to enable using a local sonatype (for debugging publishing issues)
# (start a local sonatype in docker with this command: $ docker run -d -p 8081:8081 --name nexus sonatype/nexus3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
import com.newrelic.telemetry.OkHttpPoster;
import com.newrelic.telemetry.SenderConfiguration;
import com.newrelic.telemetry.metrics.MetricBatchSender;
import io.dropwizard.metrics.BaseReporterFactory;
import io.dropwizard.metrics.common.BaseReporterFactory;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import java.net.MalformedURLException;
import java.net.URI;
import java.util.EnumSet;
import java.util.Map;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;

@JsonTypeName("newrelic")
public class NewRelicReporterFactory extends BaseReporterFactory {
Expand Down

0 comments on commit 0c5fb0f

Please sign in to comment.