DoctrineMongoDBBundle icon indicating copy to clipboard operation
DoctrineMongoDBBundle copied to clipboard

Some data collectors are gone

Open garak opened this issue 4 years ago • 14 comments

I see that version 4 dropped PrettyDataCollector and StandardDataCollector, and added CommandDataCollector. Unfortunately, I can't find any mention of this in CHANGELOG-4.0 nor in UPGRADE-4.0. What is the supposed upgrade path? Can we add some instructions?

garak avatar Dec 10 '19 09:12 garak

I apologise for the delayed response, this issue managed to hide in between my notifications.

The PrettyDataCollector previously attempted to reproduce commands to be used in the MongoDB shell for anything that was executed through doctrine/mongodb. With the new APM-based logging functionality, we're no longer looking at such operations, but only at commands (hence CommandDataCollector). These will always be run through db.runCommand(...) in the MongoDB shell, which is also why we've opted to not add a data collector that changes the output.

The CommandDataCollector prints the command document as it was sent to the server. You can copy that and directly paste it into the shell to reproduce its results.

It could very well be that I forgot to mention this in the documentation. I won't get to it until next week, but I'll gladly review and merge a PR to the 3.6 or 4.0 branch depending on where we introduced the upgrade files. Thanks for raising this issue!

alcaeus avatar Dec 12 '19 08:12 alcaeus

Im trying executing some profiling commands, but it fails, ie:

db.runCommand({"find":"Purchases","filter":{"_id":{"$in":[{"$oid":"5de92135ebd06910835a25c7"}]}}})

error: cannot nest $ under $in

or

db.runCommand({"find":"Purchases","filter":{"_id":{"$oid":"5de92135ebd06910835a25c7"}}})

error: unknown operator: $oid

Before PrettyDataCollector worked nice

markitosgv avatar Dec 18 '19 12:12 markitosgv

Ah. The $oid portion is how ObjectID is serialised. This won't work in the MongoDB shell and needs to be changed. I'll see what I can do there 👍

alcaeus avatar Dec 18 '19 13:12 alcaeus

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 17 '20 15:01 stale[bot]

Any new idea about this @alcaeus ?

markitosgv avatar Jan 17 '20 15:01 markitosgv

Sorry, I haven't gotten to it at all for now.

alcaeus avatar Jan 17 '20 15:01 alcaeus

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 16 '20 16:02 stale[bot]

any updates about change $oid? thanks!

markitosgv avatar Jun 14 '20 21:06 markitosgv

I'll reopen this for when @alcaeus is back

malarzm avatar Jun 14 '20 21:06 malarzm

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 15 '20 03:07 stale[bot]

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 15 '20 03:08 stale[bot]

Bad bot

malarzm avatar Aug 22 '20 08:08 malarzm

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 22 '20 13:09 stale[bot]

reopen please :)

markitosgv avatar Oct 19 '20 20:10 markitosgv