Upgrade some versions.
MODIFY
dd-java-agent/dd-java-agent.gradle
dd-java-agent/dd-java-agent.gradle
@@ -32,7 +32,7 @@ def includeShadowJar(subproject, jarname) {
mergeServiceFiles()
dependencies {
- exclude(dependency('org.projectlombok:lombok:1.16.20'))
+ exclude(dependency("org.projectlombok:lombok:$versions.lombok"))
}
// Prevents conflict with other SLF4J instances. Important for premain.
@@ -87,7 +87,7 @@ shadowJar {
mergeServiceFiles()
dependencies {
- exclude(dependency('org.projectlombok:lombok:1.16.20'))
+ exclude(dependency("org.projectlombok:lombok:$versions.lombok"))
}
}

MODIFY
dd-trace-java.gradle
dd-trace-java.gradle
@@ -4,15 +4,15 @@ buildscript {
}
dependencies {
classpath "io.franzbecker:gradle-lombok:1.13"
- classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.7.2"
- classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0"
- classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.13"
- classpath 'org.unbroken-dome.gradle-plugins:gradle-testsets-plugin:1.4.5'
+ classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.7.3"
+ classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1"
+ classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.14"
+ classpath 'org.unbroken-dome.gradle-plugins:gradle-testsets-plugin:1.5.0'
}
}
plugins {
- id 'com.gradle.build-scan' version '1.13'
+ id 'com.gradle.build-scan' version '1.14'
id 'com.github.sherter.google-java-format' version '0.6'
}
@@ -53,7 +53,7 @@ buildScan {
}
}
-ext.gradleWrapperVersion = '4.6'
+ext.gradleWrapperVersion = '4.7'
task wrapper(type: Wrapper) {
gradleVersion = gradleWrapperVersion
}

MODIFY
dd-trace-ot/src/test/groovy/datadog/opentracing/decorators/SpanDecoratorTest.groovy
dd-trace-ot/src/test/groovy/datadog/opentracing/decorators/SpanDecoratorTest.groovy
@@ -10,6 +10,8 @@ import io.opentracing.tag.StringTag
import io.opentracing.tag.Tags
import spock.lang.Specification
+import static datadog.opentracing.DDTracer.UNASSIGNED_DEFAULT_SERVICE_NAME
+
class SpanDecoratorTest extends Specification {
def tracer = new DDTracer(new LoggingWriter())
def span = SpanFactory.newSpanOf(tracer)
@@ -52,6 +54,26 @@ class SpanDecoratorTest extends Specification {
"other-service" | "other-service" | ["some-service": "new-service"]
}
+ def "set service name from servlet.context with context '#context'"() {
+ when:
+ span.setTag(DDTags.SERVICE_NAME, serviceName)
+ span.setTag("servlet.context", context)
+
+ then:
+ span.getServiceName() == expected
+
+ where:
+ context | serviceName | expected
+ "/" | UNASSIGNED_DEFAULT_SERVICE_NAME | UNASSIGNED_DEFAULT_SERVICE_NAME
+ "" | UNASSIGNED_DEFAULT_SERVICE_NAME | UNASSIGNED_DEFAULT_SERVICE_NAME
+ "/some-context" | UNASSIGNED_DEFAULT_SERVICE_NAME | "some-context"
+ "other-context" | UNASSIGNED_DEFAULT_SERVICE_NAME | "other-context"
+ "/" | "my-service" | "my-service"
+ "" | "my-service" | "my-service"
+ "/some-context" | "my-service" | "my-service"
+ "other-context" | "my-service" | "my-service"
+ }
+
def "set operation name"() {
when:
Tags.COMPONENT.set(span, component)

MODIFY
gradle/dependencies.gradle
gradle/dependencies.gradle
@@ -14,7 +14,8 @@ ext {
groovy : groovyVer,
junit : "4.12",
logback : "1.2.3",
- bytebuddy : "1.8.8",
+ lombok : "1.18.0",
+ bytebuddy : "1.8.12",
]
deps = [

MODIFY
gradle/java.gradle
gradle/java.gradle
@@ -7,8 +7,8 @@ targetCompatibility = 1.7
apply plugin: "io.franzbecker.gradle-lombok"
lombok { // optional: values below are the defaults
- version = "1.16.20"
- sha256 = "c5178b18caaa1a15e17b99ba5e4023d2de2ebc18b58cde0f5a04ca4b31c10e6d"
+ version = versions.lombok
+ sha256 = ""
}
apply plugin: "net.ltgt.errorprone"

MODIFY
gradle/wrapper/gradle-wrapper.jar
gradle/wrapper/gradle-wrapper.jar
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ

Upgrade some versions.