I’m looking for a way to make reviewing the Atlas Profiler more useful by adding a CorrelationId to my collection queries. I’d like to be able to do something like this (using python):
db[“my_collection”].find({}, corr_id=“some_guid”)
Then, when looking at the profiler I’d like to be able to see this correlationId in the log:
{ "type": "command", "ns": "steel_command.inventory_props_cache", **"correlation_id": "some_id",** "command": { "getMore": 7276652552318456000, "collection": "inventory_props_cache", "lsid": { "id": { "$binary": { "base64": "G+3BvDN4SSif58z5vhG/sw==", "subType": "04" } }
Is there something like this already built into Mongo to allow us to more easily correlate a mongo log to an application-level event?
Thank you!
Matt