Skip to content

Commit

Permalink
Remove messaging.operation 'send' according to the messaging specific…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
aaron-ai committed Oct 20, 2022
1 parent a2839d9 commit 2c182ed
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

package io.opentelemetry.javaagent.instrumentation.rocketmqclientjava.v5_0;

import static io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor.constant;
import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.MESSAGING_OPERATION;

import io.opentelemetry.api.OpenTelemetry;
import io.opentelemetry.api.trace.StatusCode;
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
Expand Down Expand Up @@ -43,7 +40,6 @@ public static Instrumenter<PublishingMessageImpl, SendReceiptImpl> createProduce
MessagingSpanNameExtractor.create(getter, operation))
.addAttributesExtractor(attributesExtractor)
.addAttributesExtractor(RocketMqProducerAttributeExtractor.INSTANCE)
.addAttributesExtractor(constant(MESSAGING_OPERATION, "send"))
.setSpanStatusExtractor(
(spanStatusBuilder, message, sendReceipt, error) -> {
if (null != error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.MESSAGING_DESTINATION_KIND;
import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.MESSAGING_MESSAGE_ID;
import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES;
import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.MESSAGING_OPERATION;
import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.MESSAGING_ROCKETMQ_MESSAGE_KEYS;
import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.MESSAGING_ROCKETMQ_MESSAGE_TAG;
import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.MESSAGING_ROCKETMQ_MESSAGE_TYPE;
Expand Down Expand Up @@ -95,7 +94,6 @@ public void testSendMessage() throws ClientException {
.hasAttribute(
MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES, (long) body.length)
.hasAttribute(MESSAGING_SYSTEM, "rocketmq")
.hasAttribute(MESSAGING_OPERATION, "send")
.hasAttribute(
MESSAGING_MESSAGE_ID, sendReceipt.getMessageId().toString())
.hasStatus(StatusData.unset())
Expand Down

0 comments on commit 2c182ed

Please sign in to comment.