-
Notifications
You must be signed in to change notification settings - Fork 124
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 AwsAttributePropagatingSpanProcessor component to AWS X-Ray #777
Conversation
01455a7
to
410b08b
Compare
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 change LGTM and I support it being included in the X-Ray contrib repo.
@open-telemetry/java-instrumentation-approvers PTAL and merge when ready :)
aws-xray/src/main/java/io/opentelemetry/contrib/awsxray/RemoteAttributesSpanProcessor.java
Outdated
Show resolved
Hide resolved
410b08b
to
c5365ec
Compare
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 looks ok to me. Note to other reviews that this artifact is stable so please take a close look at the new API surface area.
aws-xray/src/main/java/io/opentelemetry/contrib/awsxray/RemoteAttributesSpanProcessor.java
Outdated
Show resolved
Hide resolved
c5365ec
to
3e91d01
Compare
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.
Additional changes LGTM! This can be merged whenever and thanks for the review @jack-berg
@open-telemetry/java-contrib-maintainers PTAL. |
Put this PR on hold as the component might need to extend its scope to cooperate with #789. |
c55671a
to
666462e
Compare
666462e
to
8ebe50e
Compare
Because the author of this PR is not currently available, I have created a new PR here: #856 Please close this PR if you are able. |
Context
AwsAttributePropagatingSpanProcessor
is designed to handle attributesaws.remote.application
,aws.remote.operation
andaws.local.operation
which will later be used to generate metrics under the background of #789.It has a prerequisite PR #800.
Description
AwsAttributePropagatingSpanProcessor
accomplishes two things:1. Propagating remote attributes.
The
aws.remote.application
andaws.remote.operation
attributes are designed to be set by users into local client spans through manual instrumentation. However, since client spans are mostly generated by auto-instrumentation libraries which make them unaccessible to application developers.OTEP-207 seems to be a general solution that could help address this requirement, but it hasn't been finalized yet. We took the idea from this comment which suggests to let SpanProcessor to do the propagation work.
AwsAttributePropagatingSpanProcessor
is used as an alternative solution that inheritaws.remote.application
andaws.remote.operation
attributes from parent span to the child spans if present.2. Setting and propagating local attributes.
SpanMetricsProcessor
from #789 requiresaws.local.operation
(the initial entry point of a execution) to be injected into the local client spans to generate metrics that can later be used for other correlations.AwsAttributePropagatingSpanProcessor
sets this attribute with the span name of the local root span if the request is from remote, and passes it to child spans.Testing
JUnit test is created for this new component in the package.
Documentation
It's an independent component that would require manual installation in the TracerProvider. We'll create a doc to describe the usage.
Outstanding items
NONE.