Skip to content

Commit

Permalink
Clean up groovy assertions (#4805)
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Dec 6, 2021
1 parent 030d2e0 commit ce4cef7
Show file tree
Hide file tree
Showing 119 changed files with 2,537 additions and 2,537 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ class RestCamelTest extends AgentInstrumentationSpecification implements RetryOn
kind CLIENT
parentSpanId(span(0).spanId)
attributes {
"$SemanticAttributes.HTTP_METHOD.key" "GET"
"$SemanticAttributes.HTTP_STATUS_CODE.key" 200
"$SemanticAttributes.HTTP_METHOD" "GET"
"$SemanticAttributes.HTTP_STATUS_CODE" 200
"apache-camel.uri" "rest:https://get:api/%7Bmodule%7D/unit/%7BunitId%7D"
}
}
Expand All @@ -89,26 +89,26 @@ class RestCamelTest extends AgentInstrumentationSpecification implements RetryOn
kind SERVER
parentSpanId(span(1).spanId)
attributes {
"$SemanticAttributes.HTTP_SCHEME.key" "http"
"$SemanticAttributes.HTTP_HOST.key" "localhost:$port"
"$SemanticAttributes.HTTP_TARGET.key" "/api/firstModule/unit/unitOne"
"$SemanticAttributes.HTTP_STATUS_CODE.key" 200
"$SemanticAttributes.HTTP_USER_AGENT.key" String
"$SemanticAttributes.HTTP_FLAVOR.key" "1.1"
"$SemanticAttributes.HTTP_METHOD.key" "GET"
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.NET_PEER_PORT.key" Long
"${SemanticAttributes.HTTP_SERVER_NAME}" String
"${SemanticAttributes.NET_TRANSPORT}" IP_TCP
"$SemanticAttributes.HTTP_SCHEME" "http"
"$SemanticAttributes.HTTP_HOST" "localhost:$port"
"$SemanticAttributes.HTTP_TARGET" "/api/firstModule/unit/unitOne"
"$SemanticAttributes.HTTP_STATUS_CODE" 200
"$SemanticAttributes.HTTP_USER_AGENT" String
"$SemanticAttributes.HTTP_FLAVOR" "1.1"
"$SemanticAttributes.HTTP_METHOD" "GET"
"$SemanticAttributes.NET_PEER_IP" "127.0.0.1"
"$SemanticAttributes.NET_PEER_PORT" Long
"$SemanticAttributes.HTTP_SERVER_NAME" String
"$SemanticAttributes.NET_TRANSPORT" IP_TCP
}
}
it.span(3) {
name "/api/{module}/unit/{unitId}"
kind INTERNAL
parentSpanId(span(2).spanId)
attributes {
"$SemanticAttributes.HTTP_METHOD.key" "GET"
"$SemanticAttributes.HTTP_URL.key" "http:https://localhost:$port/api/firstModule/unit/unitOne"
"$SemanticAttributes.HTTP_METHOD" "GET"
"$SemanticAttributes.HTTP_URL" "http:https://localhost:$port/api/firstModule/unit/unitOne"
"apache-camel.uri" String
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class SingleServiceCamelTest extends AgentInstrumentationSpecification implement
kind SERVER
name "/camelService"
attributes {
"$SemanticAttributes.HTTP_METHOD.key" "POST"
"$SemanticAttributes.HTTP_URL.key" "${address.resolve("/camelService")}"
"$SemanticAttributes.HTTP_METHOD" "POST"
"$SemanticAttributes.HTTP_URL" "${address.resolve("/camelService")}"
"apache-camel.uri" "${address.resolve("/camelService")}".replace("localhost", "0.0.0.0")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ class TwoServicesWithDirectClientCamelTest extends AgentInstrumentationSpecifica
kind CLIENT
parentSpanId(span(0).spanId)
attributes {
"$SemanticAttributes.HTTP_METHOD.key" "POST"
"$SemanticAttributes.HTTP_URL.key" "http:https://localhost:$portOne/serviceOne"
"$SemanticAttributes.HTTP_STATUS_CODE.key" 200
"$SemanticAttributes.HTTP_METHOD" "POST"
"$SemanticAttributes.HTTP_URL" "http:https://localhost:$portOne/serviceOne"
"$SemanticAttributes.HTTP_STATUS_CODE" 200
"apache-camel.uri" "http:https://localhost:$portOne/serviceOne"
}
}
Expand All @@ -102,9 +102,9 @@ class TwoServicesWithDirectClientCamelTest extends AgentInstrumentationSpecifica
kind SERVER
parentSpanId(span(1).spanId)
attributes {
"$SemanticAttributes.HTTP_METHOD.key" "POST"
"$SemanticAttributes.HTTP_URL.key" "http:https://localhost:$portOne/serviceOne"
"$SemanticAttributes.HTTP_STATUS_CODE.key" 200
"$SemanticAttributes.HTTP_METHOD" "POST"
"$SemanticAttributes.HTTP_URL" "http:https://localhost:$portOne/serviceOne"
"$SemanticAttributes.HTTP_STATUS_CODE" 200
"apache-camel.uri" "http:https://0.0.0.0:$portOne/serviceOne"
}
}
Expand All @@ -113,9 +113,9 @@ class TwoServicesWithDirectClientCamelTest extends AgentInstrumentationSpecifica
kind CLIENT
parentSpanId(span(2).spanId)
attributes {
"$SemanticAttributes.HTTP_METHOD.key" "POST"
"$SemanticAttributes.HTTP_URL.key" "http:https://127.0.0.1:$portTwo/serviceTwo"
"$SemanticAttributes.HTTP_STATUS_CODE.key" 200
"$SemanticAttributes.HTTP_METHOD" "POST"
"$SemanticAttributes.HTTP_URL" "http:https://127.0.0.1:$portTwo/serviceTwo"
"$SemanticAttributes.HTTP_STATUS_CODE" 200
"apache-camel.uri" "http:https://127.0.0.1:$portTwo/serviceTwo"
}
}
Expand All @@ -124,27 +124,27 @@ class TwoServicesWithDirectClientCamelTest extends AgentInstrumentationSpecifica
kind SERVER
parentSpanId(span(3).spanId)
attributes {
"$SemanticAttributes.HTTP_METHOD.key" "POST"
"$SemanticAttributes.HTTP_STATUS_CODE.key" 200
"$SemanticAttributes.HTTP_SCHEME.key" "http"
"$SemanticAttributes.HTTP_HOST.key" "127.0.0.1:$portTwo"
"$SemanticAttributes.HTTP_TARGET.key" "/serviceTwo"
"$SemanticAttributes.NET_PEER_PORT.key" Number
"$SemanticAttributes.NET_PEER_IP.key" "127.0.0.1"
"$SemanticAttributes.HTTP_USER_AGENT.key" "Jakarta Commons-HttpClient/3.1"
"$SemanticAttributes.HTTP_FLAVOR.key" "1.1"
"${SemanticAttributes.HTTP_SERVER_NAME}" String
"${SemanticAttributes.NET_TRANSPORT}" IP_TCP
"${SemanticAttributes.HTTP_REQUEST_CONTENT_LENGTH}" Long
"$SemanticAttributes.HTTP_METHOD" "POST"
"$SemanticAttributes.HTTP_STATUS_CODE" 200
"$SemanticAttributes.HTTP_SCHEME" "http"
"$SemanticAttributes.HTTP_HOST" "127.0.0.1:$portTwo"
"$SemanticAttributes.HTTP_TARGET" "/serviceTwo"
"$SemanticAttributes.NET_PEER_PORT" Number
"$SemanticAttributes.NET_PEER_IP" "127.0.0.1"
"$SemanticAttributes.HTTP_USER_AGENT" "Jakarta Commons-HttpClient/3.1"
"$SemanticAttributes.HTTP_FLAVOR" "1.1"
"$SemanticAttributes.HTTP_SERVER_NAME" String
"$SemanticAttributes.NET_TRANSPORT" IP_TCP
"$SemanticAttributes.HTTP_REQUEST_CONTENT_LENGTH" Long
}
}
it.span(5) {
name "/serviceTwo"
kind INTERNAL
parentSpanId(span(4).spanId)
attributes {
"$SemanticAttributes.HTTP_METHOD.key" "POST"
"$SemanticAttributes.HTTP_URL.key" "http:https://127.0.0.1:$portTwo/serviceTwo"
"$SemanticAttributes.HTTP_METHOD" "POST"
"$SemanticAttributes.HTTP_URL" "http:https://127.0.0.1:$portTwo/serviceTwo"
"apache-camel.uri" "jetty:http:https://0.0.0.0:$portTwo/serviceTwo?arg=value"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ class CassandraTest extends AgentInstrumentationSpecification implements RetryOn
kind CLIENT
attributes {
"apache-camel.uri" "cql:https://$host:$port/test"
"$SemanticAttributes.DB_NAME.key" "test"
"$SemanticAttributes.DB_STATEMENT.key" "select * from test.users where id=? ALLOW FILTERING"
"$SemanticAttributes.DB_SYSTEM.key" "cassandra"
"$SemanticAttributes.DB_NAME" "test"
"$SemanticAttributes.DB_STATEMENT" "select * from test.users where id=? ALLOW FILTERING"
"$SemanticAttributes.DB_SYSTEM" "cassandra"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,24 +97,24 @@ abstract class AbstractDubboTest extends InstrumentationSpecification {
kind CLIENT
childOf span(0)
attributes {
"${SemanticAttributes.RPC_SYSTEM.key}" "dubbo"
"${SemanticAttributes.RPC_SERVICE.key}" "org.apache.dubbo.rpc.service.GenericService"
"${SemanticAttributes.RPC_METHOD.key}" "\$invoke"
"${SemanticAttributes.NET_PEER_NAME.key}" "localhost"
"${SemanticAttributes.NET_PEER_PORT.key}" Long
"$SemanticAttributes.RPC_SYSTEM" "dubbo"
"$SemanticAttributes.RPC_SERVICE" "org.apache.dubbo.rpc.service.GenericService"
"$SemanticAttributes.RPC_METHOD" "\$invoke"
"$SemanticAttributes.NET_PEER_NAME" "localhost"
"$SemanticAttributes.NET_PEER_PORT" Long
}
}
span(2) {
name "io.opentelemetry.instrumentation.apachedubbo.v2_7.api.HelloService/hello"
kind SERVER
childOf span(1)
attributes {
"${SemanticAttributes.RPC_SYSTEM.key}" "dubbo"
"${SemanticAttributes.RPC_SERVICE.key}" "io.opentelemetry.instrumentation.apachedubbo.v2_7.api.HelloService"
"${SemanticAttributes.RPC_METHOD.key}" "hello"
"${SemanticAttributes.NET_PEER_IP.key}" String
"${SemanticAttributes.NET_PEER_NAME.key}" { it == null || it instanceof String }
"${SemanticAttributes.NET_PEER_PORT.key}" Long
"$SemanticAttributes.RPC_SYSTEM" "dubbo"
"$SemanticAttributes.RPC_SERVICE" "io.opentelemetry.instrumentation.apachedubbo.v2_7.api.HelloService"
"$SemanticAttributes.RPC_METHOD" "hello"
"$SemanticAttributes.NET_PEER_IP" String
"$SemanticAttributes.NET_PEER_NAME" { it == null || it instanceof String }
"$SemanticAttributes.NET_PEER_PORT" Long
}
}
}
Expand Down Expand Up @@ -168,24 +168,24 @@ abstract class AbstractDubboTest extends InstrumentationSpecification {
kind CLIENT
childOf span(0)
attributes {
"${SemanticAttributes.RPC_SYSTEM.key}" "dubbo"
"${SemanticAttributes.RPC_SERVICE.key}" "org.apache.dubbo.rpc.service.GenericService"
"${SemanticAttributes.RPC_METHOD.key}" "\$invokeAsync"
"${SemanticAttributes.NET_PEER_NAME.key}" "localhost"
"${SemanticAttributes.NET_PEER_PORT.key}" Long
"$SemanticAttributes.RPC_SYSTEM" "dubbo"
"$SemanticAttributes.RPC_SERVICE" "org.apache.dubbo.rpc.service.GenericService"
"$SemanticAttributes.RPC_METHOD" "\$invokeAsync"
"$SemanticAttributes.NET_PEER_NAME" "localhost"
"$SemanticAttributes.NET_PEER_PORT" Long
}
}
span(2) {
name "io.opentelemetry.instrumentation.apachedubbo.v2_7.api.HelloService/hello"
kind SERVER
childOf span(1)
attributes {
"${SemanticAttributes.RPC_SYSTEM.key}" "dubbo"
"${SemanticAttributes.RPC_SERVICE.key}" "io.opentelemetry.instrumentation.apachedubbo.v2_7.api.HelloService"
"${SemanticAttributes.RPC_METHOD.key}" "hello"
"${SemanticAttributes.NET_PEER_IP.key}" String
"${SemanticAttributes.NET_PEER_NAME.key}" { it == null || it instanceof String }
"${SemanticAttributes.NET_PEER_PORT.key}" Long
"$SemanticAttributes.RPC_SYSTEM" "dubbo"
"$SemanticAttributes.RPC_SERVICE" "io.opentelemetry.instrumentation.apachedubbo.v2_7.api.HelloService"
"$SemanticAttributes.RPC_METHOD" "hello"
"$SemanticAttributes.NET_PEER_IP" String
"$SemanticAttributes.NET_PEER_NAME" { it == null || it instanceof String }
"$SemanticAttributes.NET_PEER_PORT" Long
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ class AwsLambdaSqsMessageHandlerTest extends LibraryInstrumentationSpecification
name("my_function")
kind SERVER
attributes {
"${SemanticAttributes.FAAS_EXECUTION.key}" "1-22-333"
"$SemanticAttributes.FAAS_EXECUTION" "1-22-333"
}
}
span(1) {
name("queue1 process")
kind CONSUMER
parentSpanId(span(0).spanId)
attributes {
"${SemanticAttributes.MESSAGING_SYSTEM.key}" "AmazonSQS"
"${SemanticAttributes.MESSAGING_OPERATION.key}" "process"
"$SemanticAttributes.MESSAGING_SYSTEM" "AmazonSQS"
"$SemanticAttributes.MESSAGING_OPERATION" "process"
}
hasLink("5759e988bd862e3fe1be46a994272793", "53995c3f42cd8ad8")
hasLink("5759e988bd862e3fe1be46a994272793", "53995c3f42cd8ad9")
Expand All @@ -77,10 +77,10 @@ class AwsLambdaSqsMessageHandlerTest extends LibraryInstrumentationSpecification
kind CONSUMER
parentSpanId(span(1).spanId)
attributes {
"${SemanticAttributes.MESSAGING_SYSTEM.key}" "AmazonSQS"
"${SemanticAttributes.MESSAGING_OPERATION.key}" "process"
"${SemanticAttributes.MESSAGING_MESSAGE_ID.key}" "message1"
"${SemanticAttributes.MESSAGING_DESTINATION.key}" "queue1"
"$SemanticAttributes.MESSAGING_SYSTEM" "AmazonSQS"
"$SemanticAttributes.MESSAGING_OPERATION" "process"
"$SemanticAttributes.MESSAGING_MESSAGE_ID" "message1"
"$SemanticAttributes.MESSAGING_DESTINATION" "queue1"
}
hasLink("5759e988bd862e3fe1be46a994272793", "53995c3f42cd8ad8")
}
Expand All @@ -89,10 +89,10 @@ class AwsLambdaSqsMessageHandlerTest extends LibraryInstrumentationSpecification
kind CONSUMER
parentSpanId(span(1).spanId)
attributes {
"${SemanticAttributes.MESSAGING_SYSTEM.key}" "AmazonSQS"
"${SemanticAttributes.MESSAGING_OPERATION.key}" "process"
"${SemanticAttributes.MESSAGING_MESSAGE_ID.key}" "message2"
"${SemanticAttributes.MESSAGING_DESTINATION.key}" "queue1"
"$SemanticAttributes.MESSAGING_SYSTEM" "AmazonSQS"
"$SemanticAttributes.MESSAGING_OPERATION" "process"
"$SemanticAttributes.MESSAGING_MESSAGE_ID" "message2"
"$SemanticAttributes.MESSAGING_DESTINATION" "queue1"
}
hasLink("5759e988bd862e3fe1be46a994272793", "53995c3f42cd8ad9")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ class TracingRequestApiGatewayWrapperTest extends TracingRequestWrapperTestBase
attributes {
"$ResourceAttributes.FAAS_ID.key" "arn:aws:lambda:us-east-1:123456789:function:test"
"$ResourceAttributes.CLOUD_ACCOUNT_ID.key" "123456789"
"$SemanticAttributes.FAAS_EXECUTION.key" "1-22-333"
"$SemanticAttributes.FAAS_TRIGGER.key" "http"
"$SemanticAttributes.HTTP_METHOD.key" "GET"
"$SemanticAttributes.HTTP_USER_AGENT.key" "Test Client"
"$SemanticAttributes.HTTP_URL.key" "http:https://localhost:123/hello/world?a=b&c=d"
"$SemanticAttributes.HTTP_STATUS_CODE.key" 200
"$SemanticAttributes.FAAS_EXECUTION" "1-22-333"
"$SemanticAttributes.FAAS_TRIGGER" "http"
"$SemanticAttributes.HTTP_METHOD" "GET"
"$SemanticAttributes.HTTP_USER_AGENT" "Test Client"
"$SemanticAttributes.HTTP_URL" "http:https://localhost:123/hello/world?a=b&c=d"
"$SemanticAttributes.HTTP_STATUS_CODE" 200
}
}
}
Expand All @@ -138,8 +138,8 @@ class TracingRequestApiGatewayWrapperTest extends TracingRequestWrapperTestBase
attributes {
"$ResourceAttributes.FAAS_ID.key" "arn:aws:lambda:us-east-1:123456789:function:test"
"$ResourceAttributes.CLOUD_ACCOUNT_ID.key" "123456789"
"$SemanticAttributes.FAAS_EXECUTION.key" "1-22-333"
"$SemanticAttributes.FAAS_TRIGGER.key" "http"
"$SemanticAttributes.FAAS_EXECUTION" "1-22-333"
"$SemanticAttributes.FAAS_TRIGGER" "http"
}
}
}
Expand All @@ -166,8 +166,8 @@ class TracingRequestApiGatewayWrapperTest extends TracingRequestWrapperTestBase
attributes {
"$ResourceAttributes.FAAS_ID.key" "arn:aws:lambda:us-east-1:123456789:function:test"
"$ResourceAttributes.CLOUD_ACCOUNT_ID.key" "123456789"
"$SemanticAttributes.FAAS_EXECUTION.key" "1-22-333"
"$SemanticAttributes.FAAS_TRIGGER.key" "http"
"$SemanticAttributes.FAAS_EXECUTION" "1-22-333"
"$SemanticAttributes.FAAS_TRIGGER" "http"
}
}
}
Expand All @@ -194,8 +194,8 @@ class TracingRequestApiGatewayWrapperTest extends TracingRequestWrapperTestBase
attributes {
"$ResourceAttributes.FAAS_ID.key" "arn:aws:lambda:us-east-1:123456789:function:test"
"$ResourceAttributes.CLOUD_ACCOUNT_ID.key" "123456789"
"$SemanticAttributes.FAAS_EXECUTION.key" "1-22-333"
"$SemanticAttributes.FAAS_TRIGGER.key" "http"
"$SemanticAttributes.FAAS_EXECUTION" "1-22-333"
"$SemanticAttributes.FAAS_TRIGGER" "http"
}
}
}
Expand All @@ -222,8 +222,8 @@ class TracingRequestApiGatewayWrapperTest extends TracingRequestWrapperTestBase
attributes {
"$ResourceAttributes.FAAS_ID.key" "arn:aws:lambda:us-east-1:123456789:function:test"
"$ResourceAttributes.CLOUD_ACCOUNT_ID.key" "123456789"
"$SemanticAttributes.FAAS_EXECUTION.key" "1-22-333"
"$SemanticAttributes.FAAS_TRIGGER.key" "http"
"$SemanticAttributes.FAAS_EXECUTION" "1-22-333"
"$SemanticAttributes.FAAS_TRIGGER" "http"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class TracingRequestStreamWrapperPropagationTest extends LibraryInstrumentationS
name("my_function")
kind SERVER
attributes {
"${SemanticAttributes.FAAS_EXECUTION.key}" "1-22-333"
"$SemanticAttributes.FAAS_EXECUTION" "1-22-333"
}
}
}
Expand Down Expand Up @@ -125,7 +125,7 @@ class TracingRequestStreamWrapperPropagationTest extends LibraryInstrumentationS
status ERROR
errorEvent(IllegalArgumentException, "bad argument")
attributes {
"${SemanticAttributes.FAAS_EXECUTION.key}" "1-22-333"
"$SemanticAttributes.FAAS_EXECUTION" "1-22-333"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class TracingRequestStreamWrapperTest extends LibraryInstrumentationSpecificatio
attributes {
"$ResourceAttributes.FAAS_ID.key" "arn:aws:lambda:us-east-1:123456789:function:test"
"$ResourceAttributes.CLOUD_ACCOUNT_ID.key" "123456789"
"${SemanticAttributes.FAAS_EXECUTION.key}" "1-22-333"
"$SemanticAttributes.FAAS_EXECUTION" "1-22-333"
}
}
}
Expand Down Expand Up @@ -109,7 +109,7 @@ class TracingRequestStreamWrapperTest extends LibraryInstrumentationSpecificatio
attributes {
"$ResourceAttributes.FAAS_ID.key" "arn:aws:lambda:us-east-1:123456789:function:test"
"$ResourceAttributes.CLOUD_ACCOUNT_ID.key" "123456789"
"${SemanticAttributes.FAAS_EXECUTION.key}" "1-22-333"
"$SemanticAttributes.FAAS_EXECUTION" "1-22-333"
}
}
}
Expand Down
Loading

0 comments on commit ce4cef7

Please sign in to comment.