Add missing tag verification
MODIFY
dd-java-agent/instrumentation/akka-http-10.0/src/lagomTest/groovy/LagomTest.groovy
dd-java-agent/instrumentation/akka-http-10.0/src/lagomTest/groovy/LagomTest.groovy
@@ -77,6 +77,10 @@ class LagomTest extends AgentTestRunner {
childOf span(0)
operationName 'trace.annotation'
resourceName 'EchoServiceImpl.tracedMethod'
+ tags {
+ "$Tags.COMPONENT" "trace"
+ defaultTags()
+ }
}
}
}

MODIFY
dd-java-agent/instrumentation/google-http-client/src/test/groovy/AbstractGoogleHttpClientTest.groovy
dd-java-agent/instrumentation/google-http-client/src/test/groovy/AbstractGoogleHttpClientTest.groovy
@@ -4,6 +4,7 @@ import com.google.api.client.http.HttpResponse
import com.google.api.client.http.javanet.NetHttpTransport
import datadog.trace.agent.test.base.HttpClientTest
import datadog.trace.api.DDSpanTypes
+import datadog.trace.instrumentation.api.Tags
import datadog.trace.instrumentation.googlehttpclient.GoogleHttpClientDecorator
import spock.lang.Shared
@@ -59,6 +60,17 @@ abstract class AbstractGoogleHttpClientTest extends HttpClientTest<GoogleHttpCli
resourceName "$method $uri.path"
spanType DDSpanTypes.HTTP_CLIENT
errored true
+ tags {
+ "$Tags.COMPONENT" "google-http-client"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.PEER_HOSTNAME" "localhost"
+ "$Tags.PEER_PORT" Integer
+ "$Tags.HTTP_URL" String
+ "$Tags.HTTP_METHOD" String
+ "$Tags.HTTP_STATUS" Integer
+ "$Tags.ERROR" true
+ defaultTags()
+ }
}
}
}

MODIFY
dd-java-agent/instrumentation/hibernate/core-3.3/src/test/groovy/CriteriaTest.groovy
dd-java-agent/instrumentation/hibernate/core-3.3/src/test/groovy/CriteriaTest.groovy
@@ -61,6 +61,15 @@ class CriteriaTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(2)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
}
}

MODIFY
dd-java-agent/instrumentation/hibernate/core-3.3/src/test/groovy/QueryTest.groovy
dd-java-agent/instrumentation/hibernate/core-3.3/src/test/groovy/QueryTest.groovy
@@ -66,6 +66,15 @@ class QueryTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(2)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
}
if (!requiresTransaction) {
@@ -99,6 +108,15 @@ class QueryTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(1)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -184,6 +202,15 @@ class QueryTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(2)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
}
}

MODIFY
dd-java-agent/instrumentation/hibernate/core-3.3/src/test/groovy/SessionTest.groovy
dd-java-agent/instrumentation/hibernate/core-3.3/src/test/groovy/SessionTest.groovy
@@ -81,6 +81,15 @@ class SessionTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(2)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -146,6 +155,15 @@ class SessionTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(1)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
span(3) {
serviceName "hibernate"
@@ -227,6 +245,15 @@ class SessionTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(1)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
span(3) {
serviceName "hibernate"
@@ -244,6 +271,15 @@ class SessionTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(3)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
}
@@ -372,6 +408,15 @@ class SessionTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(1)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
span(3) {
serviceName "hibernate"
@@ -473,6 +518,15 @@ class SessionTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(2)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -515,6 +569,9 @@ class SessionTest extends AbstractHibernateTest {
span(0) {
serviceName "unnamed-java-app"
operationName "overlapping Sessions"
+ tags {
+ defaultTags()
+ }
}
span(1) {
serviceName "hibernate"
@@ -556,11 +613,29 @@ class SessionTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(3)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
span(5) {
serviceName "h2"
spanType "sql"
childOf span(3)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
span(6) {
serviceName "hibernate"

MODIFY
dd-java-agent/instrumentation/hibernate/core-4.0/src/test/groovy/CriteriaTest.groovy
dd-java-agent/instrumentation/hibernate/core-4.0/src/test/groovy/CriteriaTest.groovy
@@ -61,6 +61,15 @@ class CriteriaTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(2)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
}
}

MODIFY
dd-java-agent/instrumentation/hibernate/core-4.0/src/test/groovy/QueryTest.groovy
dd-java-agent/instrumentation/hibernate/core-4.0/src/test/groovy/QueryTest.groovy
@@ -66,6 +66,15 @@ class QueryTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(2)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
}
if (!requiresTransaction) {
@@ -99,6 +108,15 @@ class QueryTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(1)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -184,6 +202,15 @@ class QueryTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(2)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
}
}

MODIFY
dd-java-agent/instrumentation/hibernate/core-4.0/src/test/groovy/SessionTest.groovy
dd-java-agent/instrumentation/hibernate/core-4.0/src/test/groovy/SessionTest.groovy
@@ -81,6 +81,15 @@ class SessionTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(2)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -160,6 +169,15 @@ class SessionTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(1)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
span(3) {
serviceName "hibernate"
@@ -177,6 +195,15 @@ class SessionTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(3)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
}
@@ -305,6 +332,15 @@ class SessionTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(1)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
span(3) {
serviceName "hibernate"
@@ -406,6 +442,15 @@ class SessionTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(2)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -448,6 +493,9 @@ class SessionTest extends AbstractHibernateTest {
span(0) {
serviceName "unnamed-java-app"
operationName "overlapping Sessions"
+ tags {
+ defaultTags()
+ }
}
span(1) {
serviceName "hibernate"
@@ -489,11 +537,29 @@ class SessionTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(3)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
span(5) {
serviceName "h2"
spanType "sql"
childOf span(3)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
span(6) {
serviceName "hibernate"
@@ -547,6 +613,15 @@ class SessionTest extends AbstractHibernateTest {
serviceName "h2"
spanType "sql"
childOf span(9)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "h2"
+ "$Tags.DB_INSTANCE" "db1"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.h2.jdbc.JdbcPreparedStatement"
+ defaultTags()
+ }
}
span(11) {
serviceName "hibernate"

MODIFY
dd-java-agent/instrumentation/hibernate/core-4.3/src/test/groovy/ProcedureCallTest.groovy
dd-java-agent/instrumentation/hibernate/core-4.3/src/test/groovy/ProcedureCallTest.groovy
@@ -104,6 +104,15 @@ class ProcedureCallTest extends AgentTestRunner {
serviceName "hsqldb"
spanType "sql"
childOf span(2)
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCCallableStatement"
+ defaultTags()
+ }
}
}
}

MODIFY
dd-java-agent/instrumentation/hibernate/core-4.3/src/test/groovy/SpringJpaTest.groovy
dd-java-agent/instrumentation/hibernate/core-4.3/src/test/groovy/SpringJpaTest.groovy
import datadog.trace.agent.test.AgentTestRunner
+import datadog.trace.instrumentation.api.Tags
import org.springframework.context.annotation.AnnotationConfigApplicationContext
import spock.lang.Shared
import spring.jpa.Customer
@@ -31,6 +32,15 @@ class SpringJpaTest extends AgentTestRunner {
serviceName "hsqldb"
resourceName "select customer0_.id as id1_0_, customer0_.firstName as firstNam2_0_, customer0_.lastName as lastName3_0_ from Customer customer0_"
spanType "sql"
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -51,6 +61,15 @@ class SpringJpaTest extends AgentTestRunner {
serviceName "hsqldb"
resourceName "call next value for hibernate_sequence"
spanType "sql"
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -59,6 +78,15 @@ class SpringJpaTest extends AgentTestRunner {
serviceName "hsqldb"
resourceName ~/insert into Customer \(.*\) values \(.*, \?, \?\)/
spanType "sql"
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -76,6 +104,15 @@ class SpringJpaTest extends AgentTestRunner {
serviceName "hsqldb"
resourceName "select customer0_.id as id1_0_0_, customer0_.firstName as firstNam2_0_0_, customer0_.lastName as lastName3_0_0_ from Customer customer0_ where customer0_.id=?"
spanType "sql"
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
}
trace(1, 1) {
@@ -83,6 +120,15 @@ class SpringJpaTest extends AgentTestRunner {
serviceName "hsqldb"
resourceName "update Customer set firstName=?, lastName=? where id=?"
spanType "sql"
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -100,6 +146,15 @@ class SpringJpaTest extends AgentTestRunner {
serviceName "hsqldb"
resourceName "select customer0_.id as id1_0_, customer0_.firstName as firstNam2_0_, customer0_.lastName as lastName3_0_ from Customer customer0_ where customer0_.lastName=?"
spanType "sql"
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -115,6 +170,15 @@ class SpringJpaTest extends AgentTestRunner {
serviceName "hsqldb"
resourceName "select customer0_.id as id1_0_0_, customer0_.firstName as firstNam2_0_0_, customer0_.lastName as lastName3_0_0_ from Customer customer0_ where customer0_.id=?"
spanType "sql"
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
}
trace(1, 1) {
@@ -122,6 +186,15 @@ class SpringJpaTest extends AgentTestRunner {
serviceName "hsqldb"
resourceName "delete from Customer where id=?"
spanType "sql"
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
}
}

MODIFY
dd-java-agent/instrumentation/rabbitmq-amqp-2.7/src/test/groovy/RabbitMQTest.groovy
dd-java-agent/instrumentation/rabbitmq-amqp-2.7/src/test/groovy/RabbitMQTest.groovy
@@ -107,6 +107,9 @@ class RabbitMQTest extends AgentTestRunner {
trace(1, 5) {
span(0) {
operationName "parent"
+ tags {
+ defaultTags()
+ }
}
// reverse order
rabbitSpan(it, 1, "basic.publish $exchangeName -> $routingKey", false, span(0))

MODIFY
dd-java-agent/instrumentation/spring-data-1.8/src/test/groovy/SpringJpaTest.groovy
dd-java-agent/instrumentation/spring-data-1.8/src/test/groovy/SpringJpaTest.groovy
@@ -28,6 +28,9 @@ class SpringJpaTest extends AgentTestRunner {
trace(0, 1) {
span(0) {
operationName "toString test"
+ tags {
+ defaultTags()
+ }
}
}
}
@@ -64,6 +67,15 @@ class SpringJpaTest extends AgentTestRunner {
serviceName "hsqldb"
spanType "sql"
childOf(span(0))
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -91,6 +103,15 @@ class SpringJpaTest extends AgentTestRunner {
serviceName "hsqldb"
spanType "sql"
childOf(span(0))
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -118,11 +139,29 @@ class SpringJpaTest extends AgentTestRunner {
serviceName "hsqldb"
spanType "sql"
childOf(span(0))
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
span(2) { //update
serviceName "hsqldb"
spanType "sql"
childOf(span(0))
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -148,6 +187,15 @@ class SpringJpaTest extends AgentTestRunner {
serviceName "hsqldb"
spanType "sql"
childOf(span(0))
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
}
}
@@ -173,11 +221,29 @@ class SpringJpaTest extends AgentTestRunner {
serviceName "hsqldb"
spanType "sql"
childOf(span(0))
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
span(2) { // delete
serviceName "hsqldb"
spanType "sql"
childOf(span(0))
+ tags {
+ "$Tags.COMPONENT" "java-jdbc-prepared_statement"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.DB_TYPE" "hsqldb"
+ "$Tags.DB_INSTANCE" "test"
+ "$Tags.DB_USER" "sa"
+ "span.origin.type" "org.hsqldb.jdbc.JDBCPreparedStatement"
+ defaultTags()
+ }
}
}
}

MODIFY
dd-java-agent/instrumentation/trace-annotation/src/test/groovy/ConfiguredTraceAnnotationsTest.groovy
dd-java-agent/instrumentation/trace-annotation/src/test/groovy/ConfiguredTraceAnnotationsTest.groovy
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.utils.ConfigUtils
+import datadog.trace.instrumentation.api.Tags
import datadog.trace.instrumentation.trace_annotation.TraceAnnotationsInstrumentation
import dd.test.trace.annotation.SayTracedHello
@@ -40,6 +41,10 @@ class ConfiguredTraceAnnotationsTest extends AgentTestRunner {
span(0) {
resourceName "AnnotationTracedCallable.call"
operationName "trace.annotation"
+ tags {
+ "$Tags.COMPONENT" "trace"
+ defaultTags()
+ }
}
}
}

MODIFY
dd-java-agent/instrumentation/trace-annotation/src/test/groovy/TraceAnnotationsTest.groovy
dd-java-agent/instrumentation/trace-annotation/src/test/groovy/TraceAnnotationsTest.groovy
@@ -310,6 +310,10 @@ class TraceAnnotationsTest extends AgentTestRunner {
span(0) {
resourceName "SayTracedHello\$1.call"
operationName "trace.annotation"
+ tags {
+ "$Tags.COMPONENT" "trace"
+ defaultTags()
+ }
}
}
}
@@ -331,11 +335,19 @@ class TraceAnnotationsTest extends AgentTestRunner {
span(0) {
resourceName "SayTracedHello\$1.call"
operationName "trace.annotation"
+ tags {
+ "$Tags.COMPONENT" "trace"
+ defaultTags()
+ }
}
trace(1, 1) {
span(0) {
resourceName "TraceAnnotationsTest\$1.call"
operationName "trace.annotation"
+ tags {
+ "$Tags.COMPONENT" "trace"
+ defaultTags()
+ }
}
}
}

MODIFY
dd-java-agent/instrumentation/trace-annotation/src/test/groovy/TraceConfigTest.groovy
dd-java-agent/instrumentation/trace-annotation/src/test/groovy/TraceConfigTest.groovy
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.utils.ConfigUtils
+import datadog.trace.instrumentation.api.Tags
import datadog.trace.instrumentation.trace_annotation.TraceConfigInstrumentation
import java.util.concurrent.Callable
@@ -38,6 +39,10 @@ class TraceConfigTest extends AgentTestRunner {
span(0) {
resourceName "ConfigTracedCallable.call"
operationName "trace.annotation"
+ tags {
+ "$Tags.COMPONENT" "trace"
+ defaultTags()
+ }
}
}
}

MODIFY
dd-java-agent/instrumentation/twilio/src/test/groovy/test/TwilioClientTest.groovy
dd-java-agent/instrumentation/twilio/src/test/groovy/test/TwilioClientTest.groovy
@@ -139,6 +139,9 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "test"
errored false
parent()
+ tags {
+ defaultTags()
+ }
}
span(1) {
serviceName "twilio-sdk"
@@ -193,6 +196,9 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "test"
errored false
parent()
+ tags {
+ defaultTags()
+ }
}
span(1) {
serviceName "twilio-sdk"
@@ -269,6 +275,9 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "test"
errored false
parent()
+ tags {
+ defaultTags()
+ }
}
span(1) {
serviceName "twilio-sdk"
@@ -292,6 +301,15 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "POST /?/Accounts/abc/Messages.json"
spanType DDSpanTypes.HTTP_CLIENT
errored false
+ tags {
+ "$Tags.COMPONENT" "apache-httpclient"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.PEER_HOSTNAME" String
+ "$Tags.HTTP_URL" String
+ "$Tags.HTTP_METHOD" String
+ "$Tags.HTTP_STATUS" Integer
+ defaultTags()
+ }
}
}
}
@@ -368,6 +386,9 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "test"
errored false
parent()
+ tags {
+ defaultTags()
+ }
}
span(1) {
serviceName "twilio-sdk"
@@ -391,6 +412,15 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "POST /?/Accounts/abc/Messages.json"
spanType DDSpanTypes.HTTP_CLIENT
errored false
+ tags {
+ "$Tags.COMPONENT" "apache-httpclient"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.PEER_HOSTNAME" String
+ "$Tags.HTTP_URL" String
+ "$Tags.HTTP_METHOD" String
+ "$Tags.HTTP_STATUS" Integer
+ defaultTags()
+ }
}
span(3) {
serviceName "twilio-sdk"
@@ -398,6 +428,16 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "POST /?/Accounts/abc/Messages.json"
spanType DDSpanTypes.HTTP_CLIENT
errored true
+ tags {
+ "$Tags.COMPONENT" "apache-httpclient"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.PEER_HOSTNAME" String
+ "$Tags.HTTP_URL" String
+ "$Tags.HTTP_METHOD" String
+ "$Tags.HTTP_STATUS" Integer
+ "$Tags.ERROR" true
+ defaultTags()
+ }
}
}
}
@@ -482,6 +522,9 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "test"
errored false
parent()
+ tags {
+ defaultTags()
+ }
}
span(1) {
serviceName "twilio-sdk"
@@ -523,6 +566,15 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "POST /?/Accounts/abc/Messages.json"
spanType DDSpanTypes.HTTP_CLIENT
errored false
+ tags {
+ "$Tags.COMPONENT" "apache-httpclient"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.PEER_HOSTNAME" String
+ "$Tags.HTTP_URL" String
+ "$Tags.HTTP_METHOD" String
+ "$Tags.HTTP_STATUS" Integer
+ defaultTags()
+ }
}
span(4) {
serviceName "twilio-sdk"
@@ -530,6 +582,16 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "POST /?/Accounts/abc/Messages.json"
spanType DDSpanTypes.HTTP_CLIENT
errored true
+ tags {
+ "$Tags.COMPONENT" "apache-httpclient"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ "$Tags.PEER_HOSTNAME" String
+ "$Tags.HTTP_URL" String
+ "$Tags.HTTP_METHOD" String
+ "$Tags.HTTP_STATUS" Integer
+ "$Tags.ERROR" true
+ defaultTags()
+ }
}
}
}
@@ -574,6 +636,9 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "test"
errored false
parent()
+ tags {
+ defaultTags()
+ }
}
span(1) {
serviceName "twilio-sdk"
@@ -581,6 +646,12 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "api.v2010.account.MessageCreator.create"
spanType DDSpanTypes.HTTP_CLIENT
errored true
+ tags {
+ "$Tags.COMPONENT" "twilio-sdk"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ errorTags(ApiException, "Testing Failure")
+ defaultTags()
+ }
}
}
}
@@ -667,6 +738,9 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "test"
errored false
parent()
+ tags {
+ defaultTags()
+ }
}
span(1) {
serviceName "twilio-sdk"
@@ -755,6 +829,9 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "test"
errored false
parent()
+ tags {
+ defaultTags()
+ }
}
span(1) {
serviceName "twilio-sdk"
@@ -762,6 +839,12 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "api.v2010.account.MessageCreator.createAsync"
spanType DDSpanTypes.HTTP_CLIENT
errored true
+ tags {
+ "$Tags.COMPONENT" "twilio-sdk"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ errorTags(ApiException, "Testing Failure")
+ defaultTags()
+ }
}
span(2) {
serviceName "twilio-sdk"
@@ -769,6 +852,12 @@ class TwilioClientTest extends AgentTestRunner {
resourceName "api.v2010.account.MessageCreator.create"
spanType DDSpanTypes.HTTP_CLIENT
errored true
+ tags {
+ "$Tags.COMPONENT" "twilio-sdk"
+ "$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
+ errorTags(ApiException, "Testing Failure")
+ defaultTags()
+ }
}
}
}

Add missing tag verification