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

Pymongo instrumentation: Capturing statements for additional command types #1955

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

shkupferxom
Copy link

@shkupferxom shkupferxom commented Sep 14, 2023

Description

Adds full statement capturing for additional Mongo commands: findAndModify, aggregate, and createIndexes.

#1512 originally added statement capturing, but only captured statements for a few command types.

findAndModify (aka find_one_and_update in pymongo) has two attributes of interest, so COMMAND_TO_ATTRIBUTE_MAPPING was changed slightly.

Fixes #1951.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Added unit tests to test statement capturing for each additional command type.

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

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

@shkupferxom shkupferxom requested a review from a team September 14, 2023 21:36
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 14, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@shkupferxom shkupferxom changed the title Pymongo capture statement more commands Pymongo: Capturing statements for additional command types Sep 27, 2023
@shkupferxom shkupferxom changed the title Pymongo: Capturing statements for additional command types Pymongo instrumentation: Capturing statements for additional command types Sep 27, 2023
@shkupferxom
Copy link
Author

@shalevr @srikanthccv Tagging you both because you reviewed the PR that originally implemented this.

…tement-more-commands, fix CHANGELOG conflict
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.

capture_statement with pymongo instrumentor does not capture statements for all mongo command types
1 participant