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

Consider supporting SQL annotations for Athena calls. #623

Open
kitsunde opened this issue Oct 25, 2023 · 1 comment
Open

Consider supporting SQL annotations for Athena calls. #623

kitsunde opened this issue Oct 25, 2023 · 1 comment

Comments

@kitsunde
Copy link

Hello,

I understand X-Ray currently only support MySQL and Postgres drivers. We use the Postgres annotation frequently to investigate issues, it would be nice if SQL annotations could be added for athena as well.

@jj22ee
Copy link
Contributor

jj22ee commented Nov 28, 2023

Hi, can you clarify what is your requirement?

If your goal is to add an XRay Annotation to an Athena subsegment (presumable made via AWS SDK), you can try the following code example to add an annotation to the last created subsegment. (referenced from docs)

/*
  Athena call via AWS SDK
*/

// Retrieve the most recently created subsegment
const subs = AWSXRay.getSegment().subsegments;

if (subs & & subs.length > 0) {
  var lastSubsegment = subs[subs.length - 1];
  lastSubsegment.addAnnotation("testKey", "testValue");
}

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

No branches or pull requests

2 participants