Skip to content

Conversation

@adrianna-chang-shopify
Copy link
Contributor

Shopify is planning to start migrating apps from Mysql2 to Trilogy as a SQL database client. Ensuring parity between OpenTelemetry instrumentation for Mysql2 and Trilogy is important before we move to Trilogy.

This PR ensures that invalid byte sequences are handled appropriately when obfuscating SQL, taking inspiration from #160. I also added some additional tests to the Trilogy spec around configuring db_statement via an environment variable.

I noticed the Mysql2 test around invalid byte encoding was removed in #265 when the enable_sql_obfuscation config went away, and I'm not sure if that was intentional. I've added a test to the Mysql2 spec to ensure there's coverage for an invalid byte sequence appearing in SQL.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 24, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@ericmustin
Copy link
Contributor

Hey @adrianna-chang-shopify just ack'ing this. This looks good to me but i'll admit i'm very out of touch with Trilogy at the moment, and would appreciate input from @arielvalentin on this. I will try to give this a closer look this evening but seems straightforward imo and appreciate you keeping this instrumentation in line with mysql2

Copy link
Contributor

@ericmustin ericmustin left a comment

Choose a reason for hiding this comment

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

lgtm pending @arielvalentin suggested change wrt error handling

Copy link
Contributor

@robertlaurin robertlaurin left a comment

Choose a reason for hiding this comment

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

LGTM

@adrianna-chang-shopify
Copy link
Contributor Author

Oops let me just update the CHANGELOG quickly

@robertlaurin
Copy link
Contributor

Oops let me just update the CHANGELOG quickly

The deploy robot will handle that for us, but if you've already updated it that's ok!

@adrianna-chang-shopify adrianna-chang-shopify changed the title Trilogy Instrumentation: Ensure encoding errors handled during SQL obfuscation fix: Ensure encoding errors handled during SQL obfuscation for Trilogy Feb 27, 2023
@arielvalentin arielvalentin merged commit 1a5972f into open-telemetry:main Feb 27, 2023
@adrianna-chang-shopify adrianna-chang-shopify deleted the ac-trilogy-encoding-errors branch February 27, 2023 23:43
@github-actions github-actions bot mentioned this pull request Jan 5, 2024
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.

4 participants