opentelemetry-python-contrib icon indicating copy to clipboard operation
opentelemetry-python-contrib copied to clipboard

Add botocore db.statement sanitization for dynamoDB

Open nemoshlag opened this issue 2 years ago • 2 comments
trafficstars

Description

Added an optional query sanitizer to the botocore dynamoDB instrumentation. Usage BotocoreInstrumentor().instrument(sanitize_query=True)

This will affect the DB_STATEMENT value to contain the original query or sanitized one.

Fixes open-telemetry/opentelemetry-specification#1544
Following the specification discussion here

Type of change

Please delete options that are not relevant.

  • [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [x] This change requires a documentation update

How Has This Been Tested?

  • [x] Test A db.statement has been sanitized
  • [x] Test B no side affects occurred on a query without a db.statement attribute

Does This PR Require a Core Repo Change?

  • [x] No.

Checklist:

  • [x] Followed the style guidelines of this project
  • [x] Changelogs have been updated
  • [x] Unit tests have been added
  • [x] Documentation has been updated

nemoshlag avatar Feb 12 '23 15:02 nemoshlag

@mariojonke approve if your comments are addressed or request changes to prevent the accidental merge.

srikanthccv avatar Feb 28 '23 14:02 srikanthccv

@nemoshlag are there any updates on the comments from @mariojonke?

ocelotl avatar Jul 12 '23 18:07 ocelotl