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

[mongodb-core] add support for any operation name and add missing query tag #353

Merged
merged 1 commit into from Nov 5, 2018

Conversation

rochdev
Copy link
Member

@rochdev rochdev commented Nov 5, 2018

This PR improves the MongoDB integration by adding support for any operation name and by adding the mongodb.query tag to make the query available in the UI. The previous version used a static list of operation name. Now we instead use the first key of the command object, which is the same behavior as the built-in APM events in new versions of the mongodb-core module.

Fixes #260

@rochdev rochdev added enhancement New feature or request integrations labels Nov 5, 2018
@rochdev rochdev added this to the 0.7.0 milestone Nov 5, 2018
Copy link
Member

@brettlangdon brettlangdon left a comment

Choose a reason for hiding this comment

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

for sanitize, what does it do with arrays?

it seems like:

{
  $or: [ {}, {} ]
}

would become

{
  $or: ?
}

// TODO: remove sanitization when implemented by the agent

// Reference https://docs.mongodb.com/v3.6/reference/command/
const DATABASE_COMMANDS = [
Copy link
Member

Choose a reason for hiding this comment

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

🔥 🔥 🔥

@brettlangdon
Copy link
Member

@rochdev
Copy link
Member Author

rochdev commented Nov 5, 2018

for sanitize, what does it do with arrays?

Right now it's stored as a single ?. The idea was that since every field can potentially be an array, and each array can be of variable size, this could lead to a lot of different resources.

@brettlangdon This behavior is the current behavior which this PR doesn't alter, so I would prefer to discuss this in another issue instead as it would introduce a breaking change to the resource name.

@brettlangdon
Copy link
Member

@brettlangdon This behavior is the current behavior which this PR doesn't alter, so I would prefer to discuss this in another issue instead as it would introduce a breaking change to the resource name.

👍

Copy link
Member

@brettlangdon brettlangdon left a comment

Choose a reason for hiding this comment

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

lgtm

@rochdev rochdev merged commit 57dfacd into v0.7.0 Nov 5, 2018
@rochdev rochdev deleted the fix-mongo-query branch November 5, 2018 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants