Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public <C> void injectContext(Context context, final C request, CarrierSetter<C>
public AgentSpan onClose(final AgentSpan span, final Status status) {

span.setTag("status.code", status.getCode().name());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about leaving both? Suppressing a tag is a breaking change. I would also discuss with IDM about that

span.setTag("grpc.status.code", status.getCode().name());
span.setTag("status.description", status.getDescription());

// TODO why is there a mismatch between client / server for calling the onError method?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public <RespT, ReqT> AgentSpan onCall(final AgentSpan span, ServerCall<ReqT, Res

public AgentSpan onStatus(final AgentSpan span, final Status status) {
span.setTag("status.code", status.getCode().name());
span.setTag("grpc.status.code", status.getCode().name());
span.setTag("status.description", status.getDescription());
return span.setError(
SERVER_ERROR_STATUSES.get(status.getCode().value()), ErrorPriorities.HTTP_SERVER_DECORATOR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ abstract class ArmeriaGrpcStreamingTest extends VersionedNamingTestBase {
"$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
"$Tags.RPC_SERVICE" "example.Greeter"
"status.code" "OK"
"grpc.status.code" "OK"
"request.type" "example.Helloworld\$Response"
"response.type" "example.Helloworld\$Response"
peerServiceFrom(Tags.RPC_SERVICE)
Expand Down Expand Up @@ -213,6 +214,7 @@ abstract class ArmeriaGrpcStreamingTest extends VersionedNamingTestBase {
"$Tags.COMPONENT" "armeria-grpc-server"
"$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER
"status.code" "OK"
"grpc.status.code" "OK"
defaultTags(true)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ abstract class ArmeriaGrpcTest extends VersionedNamingTestBase {
"$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
"$Tags.RPC_SERVICE" "example.Greeter"
"status.code" "OK"
"grpc.status.code" "OK"
"request.type" "example.Helloworld\$Request"
"response.type" "example.Helloworld\$Response"
if ({ isDataStreamsEnabled() }) {
Expand Down Expand Up @@ -219,6 +220,7 @@ abstract class ArmeriaGrpcTest extends VersionedNamingTestBase {
"$Tags.COMPONENT" "armeria-grpc-server"
"$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER
"status.code" "OK"
"grpc.status.code" "OK"
if ({ isDataStreamsEnabled() }) {
"$DDTags.PATHWAY_HASH" { String }
}
Expand Down Expand Up @@ -316,6 +318,7 @@ abstract class ArmeriaGrpcTest extends VersionedNamingTestBase {
"$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
"$Tags.RPC_SERVICE" "example.Greeter"
"status.code" "${status.code.name()}"
"grpc.status.code" "${status.code.name()}"
"status.description" description
"request.type" "example.Helloworld\$Request"
"response.type" "example.Helloworld\$Response"
Expand All @@ -339,6 +342,7 @@ abstract class ArmeriaGrpcTest extends VersionedNamingTestBase {
"$Tags.COMPONENT" "armeria-grpc-server"
"$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER
"status.code" "${status.code.name()}"
"grpc.status.code" "${status.code.name()}"
"status.description" description
"canceled" { true } // 1.0.0 handles cancellation incorrectly so accesting any value
if (status.cause != null) {
Expand Down Expand Up @@ -427,6 +431,7 @@ abstract class ArmeriaGrpcTest extends VersionedNamingTestBase {
"$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
"$Tags.RPC_SERVICE" "example.Greeter"
"status.code" status.code.name()
"grpc.status.code" status.code.name()
if (status.description != null) {
"status.description" status.description
}
Expand All @@ -453,6 +458,7 @@ abstract class ArmeriaGrpcTest extends VersionedNamingTestBase {
"$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER
errorTags error.class, error.message
"status.code" "${status.code.name()}"
"grpc.status.code" "${status.code.name()}"
"status.description" { it == null || String}
"canceled" { true } // 1.0.0 handles cancellation incorrectly so accesting any value
if ({ isDataStreamsEnabled() }) {
Expand Down Expand Up @@ -567,6 +573,7 @@ abstract class ArmeriaGrpcTest extends VersionedNamingTestBase {
"$Tags.COMPONENT" "armeria-grpc-server"
"$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER
"status.code" "OK"
"grpc.status.code" "OK"
if ({ isDataStreamsEnabled() }) {
"$DDTags.PATHWAY_HASH" { String }
}
Expand Down Expand Up @@ -642,6 +649,7 @@ abstract class ArmeriaGrpcTest extends VersionedNamingTestBase {
"$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
"$Tags.RPC_SERVICE" "example.Greeter"
"status.code" "OK"
"grpc.status.code" "OK"
"request.type" "example.Helloworld\$Request"
"response.type" "example.Helloworld\$Response"
if ({ isDataStreamsEnabled() }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ abstract class PubSubTest extends VersionedNamingTestBase {
"response.type" { String }
"$Tags.RPC_SERVICE" { String }
"status.code" { String }
"grpc.status.code" { String }
if ({ isDataStreamsEnabled() }) {
"$DDTags.PATHWAY_HASH" { String }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ public <C> void injectContext(Context context, final C request, CarrierSetter<C>
}

public AgentSpan onClose(final AgentSpan span, final Status status) {

span.setTag("status.code", status.getCode().name());
span.setTag("grpc.status.code", status.getCode().name());
span.setTag("status.description", status.getDescription());

// TODO why is there a mismatch between client / server for calling the onError method?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public <RespT, ReqT> AgentSpan onCall(final AgentSpan span, ServerCall<ReqT, Res

public AgentSpan onStatus(final AgentSpan span, final Status status) {
span.setTag("status.code", status.getCode().name());
span.setTag("grpc.status.code", status.getCode().name());
span.setTag("status.description", status.getDescription());
return span.setError(
SERVER_ERROR_STATUSES.get(status.getCode().value()), ErrorPriorities.HTTP_SERVER_DECORATOR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ abstract class GrpcStreamingTest extends VersionedNamingTestBase {
"$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
"$Tags.RPC_SERVICE" "example.Greeter"
"status.code" "OK"
"grpc.status.code" "OK"
"request.type" "example.Helloworld\$Response"
"response.type" "example.Helloworld\$Response"
peerServiceFrom(Tags.RPC_SERVICE)
Expand Down Expand Up @@ -196,6 +197,7 @@ abstract class GrpcStreamingTest extends VersionedNamingTestBase {
"$Tags.COMPONENT" "grpc-server"
"$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER
"status.code" "OK"
"grpc.status.code" "OK"
defaultTags(true)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ abstract class GrpcTest extends VersionedNamingTestBase {
"$Tags.PEER_HOST_IPV4" "127.0.0.1"
"$Tags.PEER_PORT" server.port
"status.code" "OK"
"grpc.status.code" "OK"
"request.type" "example.Helloworld\$Request"
"response.type" "example.Helloworld\$Response"
if ({ isDataStreamsEnabled() }) {
Expand Down Expand Up @@ -209,6 +210,7 @@ abstract class GrpcTest extends VersionedNamingTestBase {
"$Tags.COMPONENT" "grpc-server"
"$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER
"status.code" "OK"
"grpc.status.code" "OK"
if ({ isDataStreamsEnabled() }) {
"$DDTags.PATHWAY_HASH" { String }
}
Expand Down Expand Up @@ -313,6 +315,7 @@ abstract class GrpcTest extends VersionedNamingTestBase {
"$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
"$Tags.RPC_SERVICE" "example.Greeter"
"status.code" "${status.code.name()}"
"grpc.status.code" "${status.code.name()}"
"status.description" description
"request.type" "example.Helloworld\$Request"
"response.type" "example.Helloworld\$Response"
Expand All @@ -336,6 +339,7 @@ abstract class GrpcTest extends VersionedNamingTestBase {
"$Tags.COMPONENT" "grpc-server"
"$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER
"status.code" "${status.code.name()}"
"grpc.status.code" "${status.code.name()}"
"status.description" description
if (status.cause != null) {
errorTags status.cause.class, status.cause.message
Expand Down Expand Up @@ -418,6 +422,7 @@ abstract class GrpcTest extends VersionedNamingTestBase {
"$Tags.PEER_HOST_IPV4" "127.0.0.1"
"$Tags.PEER_PORT" server.port
"status.code" "UNKNOWN"
"grpc.status.code" "UNKNOWN"
"request.type" "example.Helloworld\$Request"
"response.type" "example.Helloworld\$Response"
"status.description" { it == null || String}
Expand All @@ -441,6 +446,7 @@ abstract class GrpcTest extends VersionedNamingTestBase {
"$Tags.COMPONENT" "grpc-server"
"$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER
"status.code" "${status.code.name()}"
"grpc.status.code" "${status.code.name()}"
"status.description" { it == null || String}
errorTags error.class, error.message
if ({ isDataStreamsEnabled() }) {
Expand Down Expand Up @@ -546,6 +552,7 @@ abstract class GrpcTest extends VersionedNamingTestBase {
"$Tags.COMPONENT" "grpc-server"
"$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER
"status.code" "OK"
"grpc.status.code" "OK"
if ({ isDataStreamsEnabled() }) {
"$DDTags.PATHWAY_HASH" { String }
}
Expand Down Expand Up @@ -612,6 +619,7 @@ abstract class GrpcTest extends VersionedNamingTestBase {
"$Tags.SPAN_KIND" Tags.SPAN_KIND_CLIENT
"$Tags.RPC_SERVICE" "example.Greeter"
"status.code" "OK"
"grpc.status.code" "OK"
"request.type" "example.Helloworld\$Request"
"response.type" "example.Helloworld\$Response"
if ({ isDataStreamsEnabled() }) {
Expand Down