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

mongo db - fix db statement capturing #1512

Merged

Conversation

avzis
Copy link
Contributor

@avzis avzis commented Dec 20, 2022

Description

Fix capturing the DB_STATEMENT parameter correctly in mongo db.
Also added an optional value to enable capturing the database statement that is being executed.

Fixes #1462

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • the tests now validates the db.statement for every type of request: find, update, delete, insert
  • added a test that validates that db.statement is not being captured when 'capture_statement' is disabled

Does This PR Require a Core Repo Change?

  • No.

@avzis avzis marked this pull request as ready for review December 22, 2022 08:22
@avzis avzis requested a review from a team December 22, 2022 08:22
avzis and others added 3 commits January 12, 2023 19:08
# Conflicts:
#	CHANGELOG.md
#	instrumentation/opentelemetry-instrumentation-pymongo/src/opentelemetry/instrumentation/pymongo/__init__.py
#	tests/opentelemetry-docker-tests/tests/pymongo/test_pymongo_functional.py
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.

mongo DB instrumentation doesn't capture db.statement properly
3 participants