From 5ac206e1d21ddffdad53ac27b4731faf7309cf3c Mon Sep 17 00:00:00 2001 From: Phil Denis Date: Mon, 3 Jan 2022 00:28:30 -0700 Subject: [PATCH] HFLL-4001: fixing NoSuchMethodError due to incompatibility with dd-trace-java v0.87+ --- metrics-datadog/pom.xml | 5 +++-- .../metrics/datadog/transport/UdpTransport.java | 5 +++-- pom.xml | 10 +++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/metrics-datadog/pom.xml b/metrics-datadog/pom.xml index 616aa649..29b595cd 100644 --- a/metrics-datadog/pom.xml +++ b/metrics-datadog/pom.xml @@ -4,7 +4,7 @@ org.coursera metrics-datadog-parent - 2.0.0-RC1 + 2.0.0-RC2 ../pom.xml 4.0.0 @@ -30,6 +30,7 @@ com.datadoghq java-dogstatsd-client + 2.13.0 junit @@ -49,7 +50,7 @@ com.alibaba dns-cache-manipulator - 1.5.1 + 1.6.4 test diff --git a/metrics-datadog/src/main/java/org/coursera/metrics/datadog/transport/UdpTransport.java b/metrics-datadog/src/main/java/org/coursera/metrics/datadog/transport/UdpTransport.java index 6f8df698..d652109b 100644 --- a/metrics-datadog/src/main/java/org/coursera/metrics/datadog/transport/UdpTransport.java +++ b/metrics-datadog/src/main/java/org/coursera/metrics/datadog/transport/UdpTransport.java @@ -1,6 +1,7 @@ package org.coursera.metrics.datadog.transport; import com.timgroup.statsd.NonBlockingStatsDClient; +import com.timgroup.statsd.NonBlockingStatsDClientBuilder; import com.timgroup.statsd.StatsDClient; import com.timgroup.statsd.StatsDClientErrorHandler; import org.coursera.metrics.datadog.model.DatadogCounter; @@ -156,7 +157,7 @@ public void send() { // Visible for testing. static Callable staticAddressResolver(final String host, final int port) { try { - return NonBlockingStatsDClient.staticAddressResolution(host, port); + return NonBlockingStatsDClientBuilder.staticAddressResolution(host, port); } catch(final Exception e) { LOG.error("Error during constructing statsd address resolver.", e); throw new RuntimeException(e); @@ -165,6 +166,6 @@ static Callable staticAddressResolver(final String host, final in // Visible for testing. static Callable volatileAddressResolver(final String host, final int port) { - return NonBlockingStatsDClient.volatileAddressResolution(host, port); + return NonBlockingStatsDClientBuilder.volatileAddressResolution(host, port); } } diff --git a/pom.xml b/pom.xml index 9b4f7c4a..9c4c581f 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.coursera metrics-datadog-parent - 2.0.0-RC1 + 2.0.0-RC2 pom Datadog Metrics Parent https://github.com/coursera/metrics-datadog @@ -27,9 +27,9 @@ - scm:git:git@github.com:coursera/metrics-datadog.git - scm:git:git@github.com:coursera/metrics-datadog.git - scm:git@github.com:coursera/metrics-datadog.git + scm:git:git@github.com:PasonSystems/metrics-datadog.git + scm:git:git@github.com:PasonSystems/metrics-datadog.git + scm:git@github.com:PasonSystems/metrics-datadog.git @@ -159,7 +159,7 @@ com.datadoghq java-dogstatsd-client - 2.6.1 + 2.13.0 junit