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 @@ -27,6 +27,16 @@ protected String spanType() {

public static final RabbitDecorator CONSUMER_DECORATE =
new RabbitDecorator() {
@Override
protected String service() {
/*
Use default service name. Common use-case here is to have consumer span parent
children spans in instrumented application. Since service name is inherited it makes
sense to default that to application service name rather than 'rabbitmq'.
*/
return null;
}

@Override
protected String spanKind() {
return Tags.SPAN_KIND_CONSUMER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,14 @@ class RabbitMQTest extends AgentTestRunner {
String errorMsg = null
) {
trace.span(index) {
serviceName "rabbitmq"
switch (span.tags["amqp.command"]) {
case "basic.get":
case "basic.deliver":
serviceName "unnamed-java-app"
break
default:
serviceName "rabbitmq"
}
operationName "amqp.command"
resourceName resource
switch (span.tags["amqp.command"]) {
Expand Down