Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace "messaging.operation" with the constant #1457

Merged
merged 2 commits into from
Oct 23, 2020
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 @@ -8,6 +8,7 @@
import io.grpc.Context;
import io.opentelemetry.trace.Span;
import io.opentelemetry.trace.Tracer;
import io.opentelemetry.trace.attributes.SemanticAttributes;

public class MessagingConsumerSpan extends DelegatingSpan
implements MessagingConsumerSemanticConvention {
Expand Down Expand Up @@ -273,7 +274,7 @@ public MessagingConsumerSemanticConvention setNetTransport(String netTransport)
*/
@Override
public MessagingConsumerSemanticConvention setMessagingOperation(String messagingOperation) {
delegate.setAttribute("messaging.operation", messagingOperation);
delegate.setAttribute(SemanticAttributes.MESSAGING_OPERATION, messagingOperation);
return this;
}

Expand Down Expand Up @@ -515,7 +516,7 @@ public MessagingConsumerSpanBuilder setNetTransport(String netTransport) {
* this span describes.
*/
public MessagingConsumerSpanBuilder setMessagingOperation(String messagingOperation) {
internalBuilder.setAttribute("messaging.operation", messagingOperation);
internalBuilder.setAttribute(SemanticAttributes.MESSAGING_OPERATION, messagingOperation);
return this;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.grpc.Context;
import io.opentelemetry.trace.Span;
import io.opentelemetry.trace.Tracer;
import io.opentelemetry.trace.attributes.SemanticAttributes;

public class MessagingConsumerSynchronousSpan extends DelegatingSpan
implements MessagingConsumerSynchronousSemanticConvention {
Expand Down Expand Up @@ -280,7 +281,7 @@ public MessagingConsumerSynchronousSemanticConvention setNetTransport(String net
@Override
public MessagingConsumerSynchronousSemanticConvention setMessagingOperation(
String messagingOperation) {
delegate.setAttribute("messaging.operation", messagingOperation);
delegate.setAttribute(SemanticAttributes.MESSAGING_OPERATION, messagingOperation);
return this;
}

Expand Down Expand Up @@ -526,7 +527,7 @@ public MessagingConsumerSynchronousSpanBuilder setNetTransport(String netTranspo
*/
public MessagingConsumerSynchronousSpanBuilder setMessagingOperation(
String messagingOperation) {
internalBuilder.setAttribute("messaging.operation", messagingOperation);
internalBuilder.setAttribute(SemanticAttributes.MESSAGING_OPERATION, messagingOperation);
return this;
}
}
Expand Down