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

fix(redis): serialize non sensitive arguments into db.statement attribute #1299

Merged
merged 21 commits into from
Nov 27, 2022

Conversation

haddasbronfman
Copy link
Member

Which problem is this PR solving?

This issue: #1294

Short description of the changes

The code in ioredis that serialize the non-sensitive data (here: #1052) was exported to another new package (called "redis-common"), and now all redis instrumentations (redis, redis-4, ioredis) use this common code to serialize the db.statement attribute while considering the sensitive data.

@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Merging #1299 (a5b9397) into main (4cafe6b) will decrease coverage by 2.35%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1299      +/-   ##
==========================================
- Coverage   96.08%   93.72%   -2.36%     
==========================================
  Files          14       21       +7     
  Lines         893     1338     +445     
  Branches      191      263      +72     
==========================================
+ Hits          858     1254     +396     
- Misses         35       84      +49     
Impacted Files Coverage Δ
...opentelemetry-instrumentation-ioredis/src/utils.ts 100.00% <ø> (ø)
...opentelemetry-instrumentation-redis-4/src/utils.ts 100.00% <ø> (ø)
...try-instrumentation-ioredis/src/instrumentation.ts 91.86% <100.00%> (ø)
...try-instrumentation-redis-4/src/instrumentation.ts 81.72% <100.00%> (ø)
...e/opentelemetry-instrumentation-redis/src/utils.ts 93.10% <100.00%> (ø)
...metry-instrumentation-redis/src/instrumentation.ts 93.47% <0.00%> (ø)
...tapackages/auto-instrumentations-node/src/utils.ts 98.21% <0.00%> (ø)
... and 2 more

@haddasbronfman haddasbronfman marked this pull request as ready for review November 23, 2022 20:39
@haddasbronfman haddasbronfman requested a review from a team November 23, 2022 20:39
Copy link
Member

@blumamir blumamir left a comment

Choose a reason for hiding this comment

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

Great contribution as usual 🥇
Added a few minor comments

@blumamir blumamir changed the title fix(redis db.statement): only serialize non sensitive arguments in db.statement attribute fix(redis): serialize non sensitive arguments into db.statement attribute Nov 24, 2022
Copy link
Member

@blumamir blumamir left a comment

Choose a reason for hiding this comment

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

LGTM 💯

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.

3 participants