-
Notifications
You must be signed in to change notification settings - Fork 893
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
Convert RabbitMQ to Instrumenter #4463
Conversation
.../main/java/io/opentelemetry/javaagent/instrumentation/rabbitmq/TracedDelegatingConsumer.java
Show resolved
Hide resolved
@@ -199,14 +206,17 @@ public static void extractAndStartSpan( | |||
return; | |||
} | |||
|
|||
Context parentContext = Java8BytecodeBridge.currentContext(); | |||
ReceiveRequest request = | |||
ReceiveRequest.create(queue, startTime, response, channel.getConnection()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the response part of the request? Couldn't it be passed to the end()
Instrumenter call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
io.opentelemetry.javaagent.instrumentation.rabbitmq.RabbitReceiveAttributesExtractor#destination
uses response to get required information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's strange that we're using exchange name for messaging.destination
and queue name for span name - but I suppose that should be fixed in another PR; maybe once messaging conventions are stable.
...n/java/io/opentelemetry/javaagent/instrumentation/rabbitmq/RabbitChannelInstrumentation.java
Outdated
Show resolved
Hide resolved
...gent/src/main/java/io/opentelemetry/javaagent/instrumentation/rabbitmq/RabbitSingletons.java
Show resolved
Hide resolved
.../main/java/io/opentelemetry/javaagent/instrumentation/rabbitmq/RabbitInstrumenterHelper.java
Outdated
Show resolved
Hide resolved
...gent/src/main/java/io/opentelemetry/javaagent/instrumentation/rabbitmq/RabbitSingletons.java
Show resolved
Hide resolved
|
||
import java.time.Instant; | ||
|
||
public final class Timer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have a few of these now, should we move to instrumentation-api
(not in this PR)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logged issue to discuss #4514
* Convert RabbitMQ to Instrumenter * Polish
This is one strange instrumentation, which assigns attributes to span in arbitrary points of time from different methods...