Merge pull request #1404 from DataDog/tyler/ratpack-upgrade
This commit is contained in:
commit
c3d133a721
|
@ -8,13 +8,9 @@ muzzle {
|
|||
pass {
|
||||
group = "io.ratpack"
|
||||
module = 'ratpack-core'
|
||||
versions = "[1.4.0,)"
|
||||
}
|
||||
// Some maven dependencies are missing for pre 1.0 ratpack, so we can't assertInverse.
|
||||
fail {
|
||||
group = "io.ratpack"
|
||||
module = 'ratpack-core'
|
||||
versions = "[1.0,1.4.0)"
|
||||
versions = "[1.5.0,)"
|
||||
skipVersions += ["0.9.12", "0.9.13", "0.9.14",]
|
||||
assertInverse = true
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,9 +25,9 @@ testSets {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
main_java8CompileOnly group: 'io.ratpack', name: 'ratpack-core', version: '1.4.0'
|
||||
main_java8CompileOnly group: 'io.ratpack', name: 'ratpack-core', version: '1.5.0'
|
||||
|
||||
testCompile project(':dd-java-agent:instrumentation:netty-4.1')
|
||||
testCompile group: 'io.ratpack', name: 'ratpack-groovy-test', version: '1.4.0'
|
||||
testCompile group: 'io.ratpack', name: 'ratpack-groovy-test', version: '1.5.0'
|
||||
latestDepTestCompile group: 'io.ratpack', name: 'ratpack-groovy-test', version: '+'
|
||||
}
|
|
@ -9,6 +9,7 @@ import static net.bytebuddy.matcher.ElementMatchers.named;
|
|||
import static net.bytebuddy.matcher.ElementMatchers.takesArgument;
|
||||
|
||||
import com.google.auto.service.AutoService;
|
||||
import com.google.common.net.HostAndPort;
|
||||
import datadog.trace.agent.tooling.Instrumenter;
|
||||
import java.util.Map;
|
||||
import net.bytebuddy.asm.Advice;
|
||||
|
@ -58,9 +59,12 @@ public final class ContinuationInstrumentation extends Instrumenter.Default {
|
|||
block = BlockWrapper.wrapIfNeeded(block, activeSpan());
|
||||
}
|
||||
|
||||
public void muzzleCheck(final PathBinding binding) {
|
||||
public void muzzleCheck(final PathBinding binding, final HostAndPort host) {
|
||||
// This was added in 1.4. Added here to ensure consistency with other instrumentation.
|
||||
binding.getDescription();
|
||||
|
||||
// This is available in Guava 20 which was required starting in 1.5
|
||||
host.getHost();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,6 +7,7 @@ import static net.bytebuddy.matcher.ElementMatchers.named;
|
|||
import static net.bytebuddy.matcher.ElementMatchers.takesArgument;
|
||||
|
||||
import com.google.auto.service.AutoService;
|
||||
import com.google.common.net.HostAndPort;
|
||||
import datadog.trace.agent.tooling.Instrumenter;
|
||||
import datadog.trace.bootstrap.instrumentation.api.AgentSpan;
|
||||
import java.util.Map;
|
||||
|
@ -61,9 +62,12 @@ public final class DefaultExecutionInstrumentation extends Instrumenter.Default
|
|||
segment = ActionWrapper.wrapIfNeeded(segment, span);
|
||||
}
|
||||
|
||||
public void muzzleCheck(final PathBinding binding) {
|
||||
public void muzzleCheck(final PathBinding binding, final HostAndPort host) {
|
||||
// This was added in 1.4. Added here to ensure consistency with other instrumentation.
|
||||
binding.getDescription();
|
||||
|
||||
// This is available in Guava 20 which was required starting in 1.5
|
||||
host.getHost();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -50,7 +50,7 @@ public class RatpackServerDecorator extends HttpServerDecorator<Request, Request
|
|||
|
||||
@Override
|
||||
protected String peerHostIP(final Request request) {
|
||||
return request.getRemoteAddress().getHostText();
|
||||
return request.getRemoteAddress().getHost();
|
||||
}
|
||||
|
||||
@Override
|
|
@ -126,7 +126,7 @@ include ':dd-java-agent:instrumentation:play-ws-1'
|
|||
include ':dd-java-agent:instrumentation:play-ws-2'
|
||||
include ':dd-java-agent:instrumentation:play-ws-2.1'
|
||||
include ':dd-java-agent:instrumentation:rabbitmq-amqp-2.7'
|
||||
include ':dd-java-agent:instrumentation:ratpack-1.4'
|
||||
include ':dd-java-agent:instrumentation:ratpack-1.5'
|
||||
include ':dd-java-agent:instrumentation:rediscala-1.8.0'
|
||||
include ':dd-java-agent:instrumentation:reactor-core-3.1'
|
||||
include ':dd-java-agent:instrumentation:rmi'
|
||||
|
|
Loading…
Reference in New Issue