-
Notifications
You must be signed in to change notification settings - Fork 910
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
Add process spans to aws2 sqs instrumentation #9778
Conversation
@@ -203,17 +207,18 @@ class S3TracingTest extends AgentInstrumentationSpecification { | |||
"rpc.system" "aws-api" | |||
"rpc.service" "AmazonSQS" | |||
"http.method" "POST" | |||
"http.status_code" 200 |
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.
should process spans have attributes that require response?
import java.util.Iterator; | ||
import javax.annotation.Nullable; | ||
|
||
class TracingIterator implements Iterator<Message> { |
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.
TracingIterator
and TracingList
are slightly modified copies from kafka instrumentation
|
||
public final class AwsSdkSingletons { | ||
|
||
private static final boolean CAPTURE_EXPERIMENTAL_SPAN_ATTRIBUTES = |
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.
This class is also used in the javaagent instrumentation. Perhaps this should be copied there so it could use InstrumentationConfig
?
This pr makes SQS instrumentation create similarly telemetry to kafka instrumentation, also support is added for the receive telemetry flag. Like in kafka instrumentation
process
span is created by placing messages in a custom list whose iterator creates span onnext
and closes it onhasNext
.Aws2 library instrumentation now requires an extra step, sqs client needs to be wrapped to support creating process spans.
Currently
process
spans has all the rpc/http client attributes besides the ones that use the response. This is a bit strange as thereceive
span also has them (also including the ones that use response). Should this be changed to remove these fromprocess
span whenreceive
is enabled? Or should we always put all of these (including the ones that use response) onprocess
span?