From 27483d6d1ebe747a5bc1a541bf91592b1af90fa4 Mon Sep 17 00:00:00 2001 From: Kate Anderson Date: Fri, 31 Mar 2023 14:19:18 -0700 Subject: [PATCH 1/5] Update io.dropwizard:dropwizard-metrics to latest release and its dependencies --- .gitignore | 1 + build.gradle.kts | 8 ++++---- .../metrics/newrelic/NewRelicReporterFactory.java | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index caa4513..e196248 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .idea out/ build +*.DS_Store diff --git a/build.gradle.kts b/build.gradle.kts index 3337c02..6278a61 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -33,9 +33,9 @@ googleJavaFormat { } dependencies { - api("io.dropwizard.metrics:metrics-core:4.2.9") + 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.1") + 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") @@ -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() } diff --git a/src/main/java/com/codahale/metrics/newrelic/NewRelicReporterFactory.java b/src/main/java/com/codahale/metrics/newrelic/NewRelicReporterFactory.java index 3340904..133aa42 100644 --- a/src/main/java/com/codahale/metrics/newrelic/NewRelicReporterFactory.java +++ b/src/main/java/com/codahale/metrics/newrelic/NewRelicReporterFactory.java @@ -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 { From 26eff1cd3c0ffc34e1b643faf30420a35f5b98f9 Mon Sep 17 00:00:00 2001 From: Kate Anderson Date: Thu, 6 Apr 2023 16:33:53 -0700 Subject: [PATCH 2/5] Update README, CHANGELOG, and project version --- CHANGELOG.md | 5 +++++ README.md | 6 +++--- gradle.properties | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ae9952..02986b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ 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] - 2022-09-21 +- Update to io.dropwizard:dropwizard-metrics 4.0.0. +- Update to io.dropwizard.metrics:metrics-core 4.2.18. +- Breaking change: this version no longer supports any Java version below Java 11. + ## [0.8.0] - 2022-09-21 - Update to telemetry SDK 0.15.0. diff --git a/README.md b/README.md index 210d516..c8bc153 100644 --- a/README.md +++ b/README.md @@ -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.8.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") ``` @@ -142,7 +142,7 @@ public class MyApplication extends Application { ### Dropwizard Metrics Reporter -If you have a dropwizard project and have at least `dropwizard-core` 0.7.X, +If you have a dropwizard project and have at least `dropwizard-core` 1.1.0, then you can perform the following steps to automatically report metrics to New Relic. @@ -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` diff --git a/gradle.properties b/gradle.properties index 1066f5a..f30ea15 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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) From 59fd2bd3fb381ad48cab48c934093c2897f13ad2 Mon Sep 17 00:00:00 2001 From: Kate Anderson Date: Tue, 9 May 2023 15:03:36 -0700 Subject: [PATCH 3/5] Correct dropwizard-core dependency reference to v.2.1.6 in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c8bc153..bf8b6f1 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ public class MyApplication extends Application { ### Dropwizard Metrics Reporter -If you have a dropwizard project and have at least `dropwizard-core` 1.1.0, +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. From fa7ec02f5128702ed5ae54f0a9b3e43030b97edc Mon Sep 17 00:00:00 2001 From: Kate Anderson Date: Tue, 9 May 2023 17:32:02 -0700 Subject: [PATCH 4/5] Update CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02986b5..1d93b65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ 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] - 2022-09-21 +## [1.0.0] - 2022-05-09 - Update to io.dropwizard:dropwizard-metrics 4.0.0. - Update to io.dropwizard.metrics:metrics-core 4.2.18. - Breaking change: this version no longer supports any Java version below Java 11. From 95db8883ee292511087fa147371bd74b5e6408e1 Mon Sep 17 00:00:00 2001 From: Kate Anderson Date: Wed, 10 May 2023 14:06:41 -0700 Subject: [PATCH 5/5] Update CHANGELOG --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d93b65..0bb60df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,8 @@ 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] - 2022-05-09 +## [1.0.0] - 2023-05-09 - Update to io.dropwizard:dropwizard-metrics 4.0.0. -- Update to io.dropwizard.metrics:metrics-core 4.2.18. - Breaking change: this version no longer supports any Java version below Java 11. ## [0.8.0] - 2022-09-21