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

Enable optional SQL query capture for PostgreSQL #390

Merged
merged 1 commit into from
Apr 6, 2021

Conversation

tomekzar
Copy link
Contributor

@tomekzar tomekzar commented Mar 18, 2021

Issue #9

Description of changes:
Add an optional possibility to capture PostgreSQL SQL query and include it in subsegment data.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@willarmiros willarmiros left a comment

Choose a reason for hiding this comment

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

Sorry for the late response here. Generally looks good to me, thanks for your contribution! Could you also add a quick line of documentation here: https://github.com/aws/aws-xray-sdk-node/tree/master/packages/core#environment-variables

@@ -133,6 +133,9 @@ function createSqlData(connParams, query) {
var data = new SqlData(DATABASE_VERS, DRIVER_VERS, connParams.user,
connParams.host + ':' + connParams.port + '/' + connParams.database,
queryType);
if (process.env.ENABLE_SQL_QUERY_CAPTURE) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you change this to AWS_XRAY_COLLECT_SQL_QUERIES? To be consistent with our other SDKs that have this feature

@willarmiros
Copy link
Contributor

@tomekzar Can you address the comment? Happy to merge once it is addressed.

@tomekzar
Copy link
Contributor Author

tomekzar commented Apr 6, 2021

@willarmiros Sorry for the late response; the comment applied. Thanks for your review.

Copy link
Contributor

@willarmiros willarmiros left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

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.

2 participants