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

Use X-Ray propagator for aws sdk 1.1 instrumentation #2117

Merged
merged 5 commits into from
Jan 28, 2021

Conversation

anuraaga
Copy link
Contributor

@kubawach I know this overlaps a bit with yours, sorry! @pavolloffay asked me to look into an issue with request signing.

@pavolloffay I couldn't reproduce an issue here unfortunately - I was expecting the server.lastRequest.headers.get("traceparent") == null assertion to fail without a separate change but the apache instrumentation seems to not be messing with the signature.

@@ -80,8 +80,7 @@ public Context startSpan(
private void inject(Context context, CARRIER carrier) {
Setter<CARRIER> setter = getSetter();
if (setter == null) {
throw new IllegalStateException(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trask I think this stopped making sense when making all the startSpan return Context since there's no way to skip injection otherwise.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other options, just in case you like either of them better:

  • make this inject method protected so subclasses can override
  • create a separate (protected) getTextMapPropagator() method that returns the global, but can be overridden to return something else

though both of these options do increase the (protected) API surface

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protected inject seems nice yeah

@@ -80,8 +80,7 @@ public Context startSpan(
private void inject(Context context, CARRIER carrier) {
Setter<CARRIER> setter = getSetter();
if (setter == null) {
throw new IllegalStateException(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other options, just in case you like either of them better:

  • make this inject method protected so subclasses can override
  • create a separate (protected) getTextMapPropagator() method that returns the global, but can be overridden to return something else

though both of these options do increase the (protected) API surface

Anuraag Agrawal added 2 commits January 27, 2021 12:46
@iNikem
Copy link
Contributor

iNikem commented Jan 27, 2021

I am a little bit worried about this magic. I mean, we/user configure propagator and it works, but all of a sudden some instrumentations use another propagator. This may be very surprising. We at least have to document this loud and clear.

Anuraag Agrawal added 2 commits January 27, 2021 15:31
@anuraaga
Copy link
Contributor Author

@iNikem Oops yeah - copied over disclaimer from v2 README

@anuraaga anuraaga merged commit 6b13bcc into open-telemetry:main Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants