Skip to content

Conversation

@herin049
Copy link

Description

Fixes an issue where the Mongodb collection name attribute is occasionally incorrectly set to a non-string value for commands that do not operate on collections. The fix implemented is not able to perfectly identifying commands that operate on collections, but compared to the alternative of directly enumerating all collection-based commands, this fix should be adequate for the time being.

Fixes #3940

Type of change

Please delete options that are not relevant.

  • 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?

A unit test with several scenarios has been added to validate that only valid collection names are used for the collection name attribute.

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

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.

Invalid type dict in attribute 'db.mongodb.collection' value sequence. Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or None

1 participant